Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753494AbbGOS5p (ORCPT ); Wed, 15 Jul 2015 14:57:45 -0400 Received: from mail-by2on0057.outbound.protection.outlook.com ([207.46.100.57]:4800 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753269AbbGOS5o (ORCPT ); Wed, 15 Jul 2015 14:57:44 -0400 Authentication-Results: arm.com; dkim=none (message not signed) header.d=none; Message-ID: <55A6AD1F.902@caviumnetworks.com> Date: Wed, 15 Jul 2015 11:57:35 -0700 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Marc Zyngier CC: David Daney , , Catalin Marinas , Will Deacon , Bjorn Helgaas , , Thomas Gleixner , Jason Cooper , Robert Richter , , David Daney Subject: Re: [PATCH 4/5] irqchip: gic-v3: Add gic_get_irq_domain() to get the irqdomain of the GIC. References: <1436979285-8177-1-git-send-email-ddaney.cavm@gmail.com> <1436979285-8177-5-git-send-email-ddaney.cavm@gmail.com> <55A6947F.8070903@arm.com> In-Reply-To: <55A6947F.8070903@arm.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: SN1PR0701CA0063.namprd07.prod.outlook.com (25.163.126.31) To BLUPR0701MB1715.namprd07.prod.outlook.com (25.163.85.141) X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1715;2:6Yv8OZjw3maHSMJzYN+U4UNjDlHjwnph0831UGbDABfQED9NIXiAa8HkKON4lDyb;3:E4e0xVFu06A6du2MSjtQA+SM+ahs82nwfGudIyj99RW4FSzvA3FPqyriFMT75BpETn6rEBxrIx1Yw4O8HbEiJNUuCCTG0C0uLc9PctejRIi8eLP1GABNp6QJcRfRwmoUBF4BLpZ0QBjHPASjYnT2zA==;25:6nU5XSW8ZnNZ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2w+XUk5IPRcJGNmH/WJOqtpktUNHIBTQXFaqsEzScrHyhU4a+d7qKTHmQ3jEtMIPsbsTeTsqaiHKY4f8SiPPAfU6UeZRvP8zCaXsRZ14WiunJPrkE+pIZp5apvnRyskx9lDQHiOkdbC71wLRSqpBTVhYL4BQQjmDNqgRDNCd3iEK50ARDvW8yERLmIO/NiTuyDEA2Mh7D0CaQ= BLUPR0701MB1715: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BLUPR0701MB1715;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1715; X-Forefront-PRVS: 0638FD5066 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(479174004)(24454002)(377454003)(36756003)(83506001)(5001960100002)(189998001)(19580395003)(46102003)(122386002)(64126003)(110136002)(42186005)(4001350100001)(53416004)(40100003)(65956001)(87976001)(2950100001)(77096005)(19580405001)(92566002)(50466002)(66066001)(50986999)(65806001)(65816999)(23746002)(33656002)(54356999)(77156002)(76176999)(47776003)(62966003)(15583001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR0701MB1715;H:dl.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BLUPR0701MB1715;23:WEuzUY3Js6bykmGRi8Hd7hgizOP6bMAkX8H?= =?Windows-1252?Q?ojfvpAPJWPfmocvD0y9MkH9wibBIcPESuJ0cK5ZElYjXIklguTj0D5lw?= =?Windows-1252?Q?pOAqSXa+h3Glum/caK0aI5e0PQSWDFgeksrYKUJdlaGB39cjHcYLT2Q/?= =?Windows-1252?Q?Q8TRSrnVOF6a7rUdMlcSPWtXGPB2QOhbjFfunY/0v7w8Lenr/gd6mfPJ?= =?Windows-1252?Q?zr7BIVa1O0eE47dH8DFQZzsFPXDgkiIa+HNTDNK71bQHtcUaOEfB4zNO?= =?Windows-1252?Q?M+KFnjkDLoO4HORfH4HIxglyCzkA1Q/TOc6atb94B59zrzppU0hkNMr8?= =?Windows-1252?Q?QuIlhuWaBfYeWDV4MJ2kzW4J+SEwcZc2qRSqnQiuMwL6gomOPJIlDhYq?= =?Windows-1252?Q?Dwl9LC3S8Kye0b099iAsXKgYvA/BepAT/Qtbr1Pa1PruH7BA9NV5R3gs?= =?Windows-1252?Q?e30b7niNiKft6pIPz0m2GUHejfacqOgaffrn9klFu2eyuVke9jabsjMl?= =?Windows-1252?Q?CrYI5AZA4vQBm9Cja18/tLSGCbp77KnxYn9maGDO+PUvFv4geHgNx4yL?= =?Windows-1252?Q?uTtPaRTjltDDQRK+KHSUIbJ6+0eR5mzq4R7DmZADC2zcupC0jIG4SrCs?= =?Windows-1252?Q?6SYXlUAg5q78HpuXj2ZgaRP+hxyx/osv56Tvkn1JhOpnwGbMn/7Npn2y?= =?Windows-1252?Q?0X84I9oXzI1u7LgkQtjiLTcMqEGVSZ7EIXdFNMzIydVbfnCpGOALZTHN?= =?Windows-1252?Q?raFEpKWE3ial9HU+MrBNK6MljIZF4scPEqiNdFH0wgHQHIz+Y1Z8tplc?= =?Windows-1252?Q?L7sqKubPywrC/ANTGh4H2CDQROUm6+9JZVnc9Xdm6PzJ7eAP3BkNz1Ci?= =?Windows-1252?Q?nptqK1VXLyE/DnDJdLCx3AAF/9BesB0neNdwJokXThzOYdI+Rd8RdoSh?= =?Windows-1252?Q?M9mittEpgNNFa7LNIf8q9AZ/ohCW6GPhVY8Emb7N7CtxZRDLEUvhbRRE?= =?Windows-1252?Q?uE+Z7bTtGhdpBZvp3iGXN9oWojIsj0TwDk9HHL+YnA8WqBVtisw=3D?= =?Windows-1252?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR0701MB1715;5:QAtGCP7QIr+iREVl2lrBzOFFz5BZbIhTwbsvHB/b508r7wLuXULs1yEiPKN5NFebjWB93t15psyXPSKQHRs5GMGoIWA47zTLM6XYp8D4IeyIl09SxVbP1QRnpsny+KkNkXObboQkuXDq8jn2C4deAQ==;24:jbCAAzccXkOP49iSFoXL5qzNk3ayYptEMpRJbodkWMEWTz0rzHtz8DZijyRiV3+YSPT8yIsAzFPwea10kUpu941DWqsudOFPHg+AaIB7Hlk=;20:oGJsVHktnyKUYrHyoS4ErH2+qKXT5MTOVK6nvjkvAT9WfsYs1eV+NRLAVc9RdOc9Me2yfK7IOU/4Q/n6z6MUpA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2015 18:57:41.0844 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1715 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2015 Lines: 64 On 07/15/2015 10:12 AM, Marc Zyngier wrote: > On 15/07/15 17:54, David Daney wrote: >> From: David Daney >> >> Needed to map SPI interrupt sources. >> >> Signed-off-by: David Daney >> --- >> drivers/irqchip/irq-gic-v3.c | 5 +++++ >> include/linux/irqchip/arm-gic-v3.h | 1 + >> 2 files changed, 6 insertions(+) >> >> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c >> index c52f7ba..0019fed 100644 >> --- a/drivers/irqchip/irq-gic-v3.c >> +++ b/drivers/irqchip/irq-gic-v3.c >> @@ -58,6 +58,11 @@ static struct gic_chip_data gic_data __read_mostly; >> /* Our default, arbitrary priority value. Linux only uses one anyway. */ >> #define DEFAULT_PMR_VALUE 0xf0 >> >> +struct irq_domain *gic_get_irq_domain(void) >> +{ >> + return gic_data.domain; >> +} >> + >> static inline unsigned int gic_irq(struct irq_data *d) >> { >> return d->hwirq; >> diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h >> index 18e3757..5992224 100644 >> --- a/include/linux/irqchip/arm-gic-v3.h >> +++ b/include/linux/irqchip/arm-gic-v3.h >> @@ -391,6 +391,7 @@ int its_init(struct device_node *node, struct rdists *rdists, >> >> typedef u32 (*its_pci_requester_id_t)(struct pci_dev *, u16); >> void set_its_pci_requester_id(its_pci_requester_id_t fn); >> +struct irq_domain *gic_get_irq_domain(void); >> #endif >> >> #endif >> > > Hmmmffff... You need the domain for SPIs?? > > What is wrong with putting these interrupts in your device tree? > There is no device tree node for ECAM based "PCIe" devices, they are discovered in the PCI bus scan, yet they still need to use SPI interrupts. We need a way to be able to map these. David Daney > M. > -- 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/