Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp264947ybx; Wed, 30 Oct 2019 14:49:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzS87+xQNVzhKPjyhZFanTmIsUPDqFOVYvB61SWBGSBngTL5B6fO0T20wQO/zMQ3odhE4c0 X-Received: by 2002:aa7:d6ca:: with SMTP id x10mr2224599edr.27.1572472147522; Wed, 30 Oct 2019 14:49:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572472147; cv=none; d=google.com; s=arc-20160816; b=ALVGOUGlCAdu7IctVpG6ZWIjcf84ZQwHALi2snsHoDjmXpxYQtn7xEqvoAs4gkZ4R0 WTDbJWYbpQV3s2NOM7kgTyL+hSoFsSs3iIv24bWXmCV08tb6PtIFnVManTNNJKDeZKbj seUalBnCXrzFDNQ4eFM5c1fN9jJjUpaSudZDdYvMKHrh7pt6R4sK2X0Wb588CIFKufK7 hVNp44x1Lj7gMClhNiVI4pBXzP6OBpJVFW8URck6y/8upBdefFP0rDbY9uXs/Oo1qavj ef+yS8SZVWVCHwRv6WiSIjc46HtYSlAeg73OP8Y/Tb+GMtM8OGGWAllyagwUEgCtAmkq ajsw== 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; bh=5D45zdPgzpjQNOnSx9aM0/fseA7MNMJnB+IytBClieU=; b=H0Da75jiYJqY8kjgHynoAipTd21nXZrFDQfvGG8o2rbNnKXoTKq965EGC5oex3yJqz PIVfFRaM7xZq1zWGzzxN7dY1v2wdNi+gpm6BypPGGmTDxvdg/nwLsP4aHr9+JaqBosR+ RPNzXiXHNqGPhK7dNKF1WBe/zquekGqiKFkTciMzM+CSXwTFhFn4KG3XZF0GlXuVk9UT hUOty6zsm28MtE4U/A3bDX7cAbLwPQgpa8q0Mu8ejFQsqJhWlYiyrs64mGPJ/OqXEthD 6xIX04g3ey1Zi6YReNDqUsGkJSsl6etL/ocZIQlMFVXKq80Tn6jFnWjxxvVErogPOxyE XXQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=J6LQ7VfS; 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 q8si2683652edi.445.2019.10.30.14.48.41; Wed, 30 Oct 2019 14:49:07 -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=J6LQ7VfS; 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 S1727240AbfJ3Vpu (ORCPT + 99 others); Wed, 30 Oct 2019 17:45:50 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:40582 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbfJ3Vpu (ORCPT ); Wed, 30 Oct 2019 17:45:50 -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=5D45zdPgzpjQNOnSx9aM0/fseA7MNMJnB+IytBClieU=; b=J6LQ7VfSbXoLVh2AfMxxcO5Ev jMDlrS4Ga6c/bK5wkesrM/ljWY1/1S5YWScBxAN2ddfoZzb2UAa1+vfsYmLJHpKW5LMmMFnQg4O1t jcwa01gjs5mPo+dmI7jZ+KaiMmeqraf9LHhGdbSWN81n+7Ftl5/XFyFPluIdrhfXeP9f1SftrZcMr 32kIDpWcXB66sykrfrNRquYu7JVjRfOlh5GWXj7BPLnQwtqA+bVyuQTPurT0PxttnT/iVJH5xcYkU S/1YcFyQceL8gp6n7NNZmcy74XDc8aWurib+AgQxIRdiwwJD5M9qztlbyM8Uf1Fl+FV6i8zz4BQsb l4VnhbfnQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iPvmm-0003lk-5A; Wed, 30 Oct 2019 21:45:48 +0000 Date: Wed, 30 Oct 2019 14:45:48 -0700 From: Christoph Hellwig To: Nicolas Saenz Julienne Cc: rubini@gnudd.com, hch@infradead.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Bjorn Helgaas , helgaas@kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v2 2/2] x86/PCI: sta2x11: use default DMA address translation Message-ID: <20191030214548.GC25515@infradead.org> References: <20191018110044.22062-1-nsaenzjulienne@suse.de> <20191018110044.22062-3-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191018110044.22062-3-nsaenzjulienne@suse.de> User-Agent: Mutt/1.12.1 (2019-06-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, Oct 18, 2019 at 01:00:44PM +0200, Nicolas Saenz Julienne wrote: > The devices found behind this PCIe chip have unusual DMA mapping > constraints as there is an AMBA interconnect placed in between them and > the different PCI endpoints. The offset between physical memory > addresses and AMBA's view is provided by reading a PCI config register, > which is saved and used whenever DMA mapping is needed. > > It turns out that this DMA setup can be represented by properly setting > 'dma_pfn_offset', 'dma_bus_mask' and 'dma_mask' during the PCI device > enable fixup. And ultimately allows us to get rid of this device's > custom DMA functions. > > Aside from the code deletion and DMA setup, sta2x11_pdev_to_mapping() is > moved to avoid warnings whenever CONFIG_PM is not enabled. Looks sensible to me: Reviewed-by: Christoph Hellwig But I can't tested it either, and kinda wonder if this code is actually still used by anyone..