Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5581620imm; Mon, 27 Aug 2018 00:00:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ3Wn4b6RwuPpwxD+HsoMeVhnnQdOwL9jZSczh2fTXt95iEVpdLWVTW8KkSxxbVi1+gr1Y7 X-Received: by 2002:a63:904a:: with SMTP id a71-v6mr9358273pge.339.1535353213476; Mon, 27 Aug 2018 00:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535353213; cv=none; d=google.com; s=arc-20160816; b=wVp3y6ge2TEfOYF7ohyVoSWSCoOe187gsTXtr8yod72vn2NvNXyaNbdPSEeTJjBa6X 8bv2Y5VSqtY/WQFSSBmJhXwn+v4HHHS2wd97r/GpKN6c40pkFWv3Woy5v1wntFe0ykSH 0kvhmpKLKEjbjCWrfL1fSF3b7jQ6hbVDcGrt2q+l0534tTbGZuS6Qg5wJtDD9WuQGQRJ evHDhn8R9C1W8EHGbjbFnBtabPkbwmoTEQCCM/e5kLPTxIKDzMkXtdFjsE0qC8vNexKl v3YjWHM8LClwiOShXHT2XToUV5jenFvsRyr/2TFph8IKIzfjYfw5Vq37mivRC4kBg2Rx 2/kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=GVWf/+w/sCO2UegASIQHlyTIjUUIEMdy03Or94LtLgk=; b=kRd0DFeN8qI3Q21geLrNmIiWn2yjKHsCV8hFa31qS8ajV8PLntbuywXUoJ/IhNkjEj VDKt1GFjnJdsNwRdKjUO1qNphRK1Ex0Ktw9fjacxV7bMMATq5mxpwRyeDUSzQNcUrQIU JWqAmtITscHv3QgjdhhOJMESttj+QM7fuYG3G3c8CX4RvWDHJZnVYVLqFH3euKc8Sd4N 7eQ9pdsbVXuOxWA4uoAdzk4LBk9pfZCbBO7+nsYUd7Zb/iAWDILCfgX6W+sDcJziSPPE fnOncmJwEikNGstZyROBsvOs2cdbMcDOJIigDz4o2zAUcErwSSi65ZsSDOYun5MkcGow CB7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=FaBm3P8T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4-v6si13140014pgs.559.2018.08.26.23.59.57; Mon, 27 Aug 2018 00:00:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=FaBm3P8T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727058AbeH0KoF (ORCPT + 99 others); Mon, 27 Aug 2018 06:44:05 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:40362 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726875AbeH0KoE (ORCPT ); Mon, 27 Aug 2018 06:44:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GVWf/+w/sCO2UegASIQHlyTIjUUIEMdy03Or94LtLgk=; b=FaBm3P8TfeAXZTVSWNkGfO3uY Pr3p71rd2iqF6xu1UHTJ6nQQRydb/unVZRz23rnOLgn+DQZTELlf0iX78GtEwjLqAT4w8gDP6vDXs IExfz6y0AFpcdKNeHQ69FkZH+f0XeQabdP5OhwrHX7n7N/2CbHb2aVzrLtmnXGMU6qv+y9DVr3gqZ 8K+ZCdzOKejz3CBaSNn33pVkz8cKyjPEM3ujTuZPYj+aDk/sVeqrSNdEgX8du8Fr+x3SFkC4kB7ig F2+VkNTHmOdRZHRe00DVPTg3z7PAkcFYSC+Nj2IEhvAd2eWUgf9uSMcV0OBcFSjNxBUGk7+jQtfx2 GRaTsEwFA==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuBU1-0005fh-RB; Mon, 27 Aug 2018 06:58:41 +0000 Date: Sun, 26 Aug 2018 23:58:41 -0700 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , murphyt7@tcd.ie, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Changing the AMD IOMMU API path to work in an atomic context which is necessary for any custom drivers using the IOMMU API while holding a spinlock. Message-ID: <20180827065841.GA7053@infradead.org> References: <1535120929-5693-1-git-send-email-murphyt7@tcd.ie> <20180824145328.GA7996@infradead.org> <24d3f04a-e6e2-ed8f-e2bd-b38144f33f26@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24d3f04a-e6e2-ed8f-e2bd-b38144f33f26@arm.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 24, 2018 at 04:24:49PM +0100, Robin Murphy wrote: > Although IIRC the AMD driver is in fact the only one whose map/unmap > callbacks aren't already spinlock-safe (or at least it was last time I was > looking). Stuff like iommu-dma is already relying on this in order to > implement streaming DMA API calls (which may be in atomic context) on top of > the corresponding IOMMU API operations. True. That should be mentioned in the spinlock, though - and once it is done the calling conventions should be documented.