From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756767AbcAHV5i (ORCPT ); Fri, 8 Jan 2016 16:57:38 -0500 Received: from mail-bl2on0102.outbound.protection.outlook.com ([65.55.169.102]:54401 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755758AbcAHV5L convert rfc822-to-8bit (ORCPT ); Fri, 8 Jan 2016 16:57:11 -0500 From: Jake Oshins To: "gregkh@linuxfoundation.org" , KY Srinivasan , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "olaf@aepfle.de" , "apw@canonical.com" , "vkuznets@redhat.com" , "tglx@linutronix.de" , "Haiyang Zhang" , "marc.zyngier@arm.com" , "bhelgaas@google.com" , "linux-pci@vger.kernel.org" Subject: RE: [PATCH v9 4/7] PCI: Add fwnode_handle to pci_sysdata Thread-Topic: [PATCH v9 4/7] PCI: Add fwnode_handle to pci_sysdata Thread-Index: AQHRMtSznmLs9K1alk6VpaqPoIzIB57yWIcA Date: Fri, 8 Jan 2016 21:57:04 +0000 Message-ID: References: <1449701697-6366-1-git-send-email-jakeo@microsoft.com> <1449701697-6366-5-git-send-email-jakeo@microsoft.com> In-Reply-To: <1449701697-6366-5-git-send-email-jakeo@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=jakeo@microsoft.com; x-originating-ip: [2001:4898:80e8:4::25e] x-microsoft-exchange-diagnostics: 1;DM2PR0301MB0781;5:k6MxXkKITRqlGN55lLHNKXy11vEB8m9jlU/GYW+MEQnX6QBdDvniQGhHC6NEoLXGo5BdL7Yx8BFHAdFJ0F8qeT9bxVQ5aqXU9gN13ElfOaKi72TrcHYi02B7lfSwDEwI85sO2hxCh85Fms413gaU0A==;24:Wk/4OpRUbixgwlUWxP5N0mpUqPj8uDjOJsZMG+M7V0QCFrIspCysKo4GMV9p4tPLVE2E/+nBbmvWBx580E9a4+PYsdfvGnMvUAgo6HNhCpQ= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0781; x-ms-office365-filtering-correlation-id: 78857ef2-db6c-4bb4-872d-08d31876a5a9 x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(10201501046)(61426038)(61427038);SRVR:DM2PR0301MB0781;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0781; x-forefront-prvs: 0815F8251E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(78114003)(13464003)(199003)(164054003)(189002)(377454003)(99286002)(5003600100002)(33656002)(105586002)(40100003)(2561002)(101416001)(8990500004)(5004730100002)(6116002)(5001770100001)(5002640100001)(2906002)(122556002)(76576001)(11100500001)(54356999)(107886002)(10400500002)(76176999)(86362001)(97736004)(106116001)(106356001)(2201001)(2501003)(5005710100001)(10090500001)(2900100001)(86612001)(10290500002)(77096005)(1511001)(81156007)(2950100001)(189998001)(5001960100002)(1096002)(74316001)(19580395003)(19580405001)(2421001)(92566002)(5008740100001)(87936001)(50986999)(586003)(1220700001)(102836003)(921003)(3826002)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB0781;H:DM2PR0301MB1232.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2016 21:57:04.6898 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0781 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: jakeo@microsoft.com [mailto:jakeo@microsoft.com] > Sent: Wednesday, December 9, 2015 2:55 PM > To: gregkh@linuxfoundation.org; KY Srinivasan ; linux- > kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de; > apw@canonical.com; vkuznets@redhat.com; tglx@linutronix.de; Haiyang > Zhang ; marc.zyngier@arm.com; > bhelgaas@google.com; linux-pci@vger.kernel.org > Cc: Jake Oshins > Subject: [PATCH v9 4/7] PCI: Add fwnode_handle to pci_sysdata > > From: Jake Oshins > > This patch adds an fwnode_handle to struct pci_sysdata, which is > used by the next patch in the series when trying to locate an > IRQ domain associated with a root PCI bus. > > Signed-off-by: Jake Oshins > --- > arch/x86/include/asm/pci.h | 15 +++++++++++++++ > drivers/pci/probe.c | 1 + > include/linux/pci.h | 4 ++++ > 3 files changed, 20 insertions(+) > > diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h > index 4625943..6fc3c7c 100644 > --- a/arch/x86/include/asm/pci.h > +++ b/arch/x86/include/asm/pci.h > @@ -20,6 +20,9 @@ struct pci_sysdata { > #ifdef CONFIG_X86_64 > void *iommu; /* IOMMU private data */ > #endif > +#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN > + void *fwnode; /* IRQ domain for MSI assignment */ > +#endif > }; > > extern int pci_routeirq; > @@ -32,6 +35,7 @@ extern int noioapicreroute; > static inline int pci_domain_nr(struct pci_bus *bus) > { > struct pci_sysdata *sd = bus->sysdata; > + > return sd->domain; > } > > @@ -41,6 +45,17 @@ static inline int pci_proc_domain(struct pci_bus *bus) > } > #endif > > +#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN > +static inline void *_pci_root_bus_fwnode(struct pci_bus *bus) > +{ > + struct pci_sysdata *sd = bus->sysdata; > + > + return sd->fwnode; > +} > + > +#define pci_root_bus_fwnode _pci_root_bus_fwnode > +#endif > + > /* Can be used to override the logic in pci_scan_bus for skipping > already-configured bus numbers - to be used for buggy BIOSes > or architectures with incomplete PCI setup by the loader */ > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index edb1984..750f907 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > #include > #include "pci.h" > > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 6ae25aa..b414422 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -1517,6 +1517,10 @@ static inline int pci_get_new_domain_nr(void) { > return -ENOSYS; } > > #include > > +#ifndef pci_root_bus_fwnode > +#define pci_root_bus_fwnode(bus) ((void)(bus), NULL) > +#endif > + > /* these helpers provide future and backwards compatibility > * for accessing popular PCI BAR info */ > #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start) > -- > 1.9.1 Bjorn, are you willing to take this patch and the next one in the series through your tree? The other patches in this series have already been taken into linux-next by either Greg K-H or Thomas Gleixner, or they're dependent on these two. Thomas has suggested that the PCI tree would be the right one to incorporate them. Thanks, Jake Oshins