Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932930AbbLVOs4 (ORCPT ); Tue, 22 Dec 2015 09:48:56 -0500 Received: from lhrrgout.huawei.com ([194.213.3.17]:29239 "EHLO lhrrgout.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932749AbbLVOsy convert rfc822-to-8bit (ORCPT ); Tue, 22 Dec 2015 09:48:54 -0500 From: Gabriele Paoloni To: Tomasz Nowicki , "bhelgaas@google.com" , "arnd@arndb.de" , "will.deacon@arm.com" , "catalin.marinas@arm.com" , "rjw@rjwysocki.net" , "hanjun.guo@linaro.org" , "Lorenzo.Pieralisi@arm.com" , "okaya@codeaurora.org" , "jiang.liu@linux.intel.com" , "Stefano.Stabellini@eu.citrix.com" , "liudongdong (C)" CC: "robert.richter@caviumnetworks.com" , "mw@semihalf.com" , "Liviu.Dudau@arm.com" , "ddaney@caviumnetworks.com" , "tglx@linutronix.de" , Wangyijing , "Suravee.Suthikulpanit@amd.com" , "msalter@redhat.com" , "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linaro-acpi@lists.linaro.org" , "jchandra@broadcom.com" , "jcm@redhat.com" Subject: RE: [PATCH V2 22/23] pci, acpi: Match PCI config space accessors against platfrom specific quirks. Thread-Topic: [PATCH V2 22/23] pci, acpi: Match PCI config space accessors against platfrom specific quirks. Thread-Index: AQHROBUgIukhjYkQJEW918qA+7ssUp7VRxqQgAGNXgCAAEo58A== Date: Tue, 22 Dec 2015 14:48:05 +0000 Message-ID: References: <1450278993-12664-1-git-send-email-tn@semihalf.com> <1450278993-12664-23-git-send-email-tn@semihalf.com> <567923D2.2010202@semihalf.com> In-Reply-To: <567923D2.2010202@semihalf.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.210.142.221] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.567962B7.0144,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 5e4f2426466c2a86740e8e0aae610cfa Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3310 Lines: 93 Hi Tomasz > -----Original Message----- > From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel- > owner@vger.kernel.org] On Behalf Of Tomasz Nowicki > Sent: 22 December 2015 10:20 > To: Gabriele Paoloni; bhelgaas@google.com; arnd@arndb.de; > will.deacon@arm.com; catalin.marinas@arm.com; rjw@rjwysocki.net; > hanjun.guo@linaro.org; Lorenzo.Pieralisi@arm.com; okaya@codeaurora.org; > jiang.liu@linux.intel.com; Stefano.Stabellini@eu.citrix.com > Cc: robert.richter@caviumnetworks.com; mw@semihalf.com; > Liviu.Dudau@arm.com; ddaney@caviumnetworks.com; tglx@linutronix.de; > Wangyijing; Suravee.Suthikulpanit@amd.com; msalter@redhat.com; linux- > pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux- > acpi@vger.kernel.org; linux-kernel@vger.kernel.org; linaro- > acpi@lists.linaro.org; jchandra@broadcom.com; jcm@redhat.com > Subject: Re: [PATCH V2 22/23] pci, acpi: Match PCI config space > accessors against platfrom specific quirks. > > On 21.12.2015 12:47, Gabriele Paoloni wrote: > > 2) In the quirk mechanism you proposed, I see that the callback > function > > allows to do some preparation work for the host bridge. For > example in > > Hisilicon hip05 case we would need to read some values from the > ACPI > > table (see acpi_pci_root_hisi_add() function in > > https://lkml.org/lkml/2015/12/3/426). > > I am quite new to ACPI and I wonder if it is OK to add such > "Packages" > > to the PCI host bridge ACPI device...or maybe we need to declare > a new > > one...? > > I may miss sth so please correct me in that case. > > https://lkml.org/lkml/2015/12/3/426 shows that you need special > handling for root->secondary.start bus number only, right? So how about > creating special MCFG region only for > . > Like that: > > [0008] Base Address : > [0002] Segment Group Number : > [0001] Start Bus Number : secondary.start> > [0001] End Bus Number : secondary.start> > [0004] Reserved : 00000000 > > > static const struct dmi_system_id hisi_quirk[] = { > { > .ident = "HiSi...", > .matches = { > DMI_MATCH(), > }, > }, > { } > }; > > static struct pci_ops hisi_ecam_pci_ops = { > .map_bus = pci_mcfg_dev_base, > .read = hisi_pcie_cfg_read, > .write = hisi_pcie_cfg_write, > }; > > DECLARE_ACPI_MCFG_FIXUP(hisi_quirk, &hisi_ecam_pci_ops, > , ); > > With above code you can use your custom PCI config accessor only for > that region. > > Let me know if that is not enough for you. In principle I think it can work... Liudongdong, Guo Hanjun what is your opinion about? Thanks Gab > > Tomasz > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" > in the body of a message to majordomo@vger.kernel.org More majordomo > info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/