From patchwork Thu Jan 14 13:44:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Graeme Gregory X-Patchwork-Id: 8032011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2B7A0BEEE5 for ; Thu, 14 Jan 2016 13:46:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3027B20434 for ; Thu, 14 Jan 2016 13:46:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B9A720439 for ; Thu, 14 Jan 2016 13:46:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aJiD7-0006NE-LN; Thu, 14 Jan 2016 13:45:09 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aJiD4-0005Bf-HX for linux-arm-kernel@lists.infradead.org; Thu, 14 Jan 2016 13:45:07 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 9ACE220A97 for ; Thu, 14 Jan 2016 08:44:43 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Thu, 14 Jan 2016 08:44:43 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=slimlogic.co.uk; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=crSL1 2y4iGrl0xiajextRkUKzTA=; b=0OZZIKDIgvunLz0AruRed9f/PzMsJEd33QkG6 prEGRxPn/cJKldVyy6h0CtHwKtaqEbd92H7rMHSMsFhZi6/f/wtxqAltoCbSiZju hBh35FrAfHDryxmY/H8R1Xd5Tuxzs7yGGETytbc5Er04wnpk+LImrBjcxzfB7rbt 1bwJ3M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=crSL12y4iGrl0xiajextRkUKzTA=; b=IEPP1 NldADj5JcOV2ept6Zj1jsVsetp5lj56kTPF7QPkVTZUkp1bCV5XRQySmhx9+P4Yx kHiPdEy8nzrk7o1n4FwXf36xybi8blRHgk3L5CzmkqU2cSL1zATmumxSW1Iy/u2L SrwDLBNxNxJar4Vy3JZEq667isWYO/A29jGe88= X-Sasl-enc: 4b86LOCwzEdtjE6ql75h6t6JZ34X75GJhXNnJxfABY5J 1452779083 Received: from localhost (79-66-3-221.dynamic.dsl.as9105.com [79.66.3.221]) by mail.messagingengine.com (Postfix) with ESMTPA id E362AC013FE; Thu, 14 Jan 2016 08:44:42 -0500 (EST) Date: Thu, 14 Jan 2016 13:44:40 +0000 From: Graeme Gregory To: Tomasz Nowicki Subject: Re: [PATCH V3 00/21] MMCONFIG refactoring and support for ARM64 PCI hostbridge init based on ACPI Message-ID: <20160114134440.GA8520@xora-haswell.xora.org.uk> References: <1452691267-32240-1-git-send-email-tn@semihalf.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1452691267-32240-1-git-send-email-tn@semihalf.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160114_054506_785477_AAFCCBC1 X-CRM114-Status: GOOD ( 12.02 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linaro-acpi@lists.linaro.org, linux-pci@vger.kernel.org, will.deacon@arm.com, okaya@codeaurora.org, wangyijing@huawei.com, Lorenzo.Pieralisi@arm.com, ddaney@caviumnetworks.com, linux-acpi@vger.kernel.org, robert.richter@caviumnetworks.com, catalin.marinas@arm.com, jcm@redhat.com, arnd@arndb.de, Stefano.Stabellini@eu.citrix.com, Liviu.Dudau@arm.com, msalter@redhat.com, bhelgaas@google.com, tglx@linutronix.de, mw@semihalf.com, linux-arm-kernel@lists.infradead.org, jchandra@broadcom.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, hanjun.guo@linaro.org, Suravee.Suthikulpanit@amd.com, jiang.liu@linux.intel.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Jan 13, 2016 at 02:20:46PM +0100, Tomasz Nowicki wrote: > From the functionality point of view this series might be split into the > following logic parts: > 1. Make MMCONFIG code arch-agnostic which allows all architectures to collect > PCI config regions and used when necessary. > 2. Move non-arch specific bits to the core code. > 3. Use MMCONFIG code and implement generic ACPI based PCI host controller driver. > 4. Enable above driver on ARM64 > > Patches has been built on top of 4.4 and can be found here: > git@github.com:semihalf-nowicki-tomasz/linux.git (pci-acpi-v3) > > NOTE, this patch set depends on Matthew's patches: > http://www.spinics.net/lists/linux-pci/msg45950.html > https://github.com/Vality/linux/tree/pci-fixes > > This has been tested on Cavium ThunderX server and QEMU. > Any help in reviewing and testing is very appreciated. I have tested this on my AMD Overdrive so Tested-by: Graeme Gregory But to actually get my r8169 network card working I also need the following patch. I suspect we need to set coherent_dma_mask somewhere in the platform but I do not know where this should happen. Hopefully an ARM64 expert can help. Graeme diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 2fbf840..40e24e2 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1717,7 +1717,7 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus) set_dev_node(&dev->dev, pcibus_to_node(bus)); dev->dev.dma_mask = &dev->dma_mask; dev->dev.dma_parms = &dev->dma_parms; - dev->dev.coherent_dma_mask = 0xffffffffull; + dev->dev.coherent_dma_mask = DMA_BIT_MASK(64); pci_dma_configure(dev); pci_set_dma_max_seg_size(dev, 65536);