Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751894AbbLRKhL (ORCPT ); Fri, 18 Dec 2015 05:37:11 -0500 Received: from mail-db3on0070.outbound.protection.outlook.com ([157.55.234.70]:7040 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751172AbbLRKhH convert rfc822-to-8bit (ORCPT ); Fri, 18 Dec 2015 05:37:07 -0500 From: Noam Camus To: Marc Zyngier , "linux-snps-arc@lists.infradead.org" CC: "linux-kernel@vger.kernel.org" , "Chris Metcalf" , "daniel.lezcano@linaro.org" , Thomas Gleixner , "Jason Cooper" Subject: RE: [PATCH v4 05/19] irqchip: add nps Internal and external irqchips Thread-Topic: [PATCH v4 05/19] irqchip: add nps Internal and external irqchips Thread-Index: AQHRN57T6z+6xXe8LkyllNMp2B1hJ57NWbAAgAGP8MA= Date: Fri, 18 Dec 2015 10:37:03 +0000 Message-ID: References: <1450228238-4499-1-git-send-email-noamc@ezchip.com> <1450228238-4499-6-git-send-email-noamc@ezchip.com> <56712F50.6050404@arm.com> In-Reply-To: <56712F50.6050404@arm.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=noamc@ezchip.com; x-originating-ip: [85.64.158.114] x-microsoft-exchange-diagnostics: 1;AMSPR02MB120;5:lF0cVloMU0qo8fVWDz6irjmHCSqiYFTdak1AaRWbwwzVFgvgmQroD8rKlYdpeQLognz+NlfEYVNgVyq+bxqw333HpW/5gyYPuv15a+Kh7Dn7VxGGOaZibFpcd/nLk6/2bI+prZ+8e2pLv6+I3Rcckw==;24:KPMgsWGiAgyYzeqebFNhUgD2w2ySUPurhdiv+1J0Ndf4GFfasgAQVdlISVwwIa9rOMUhC/OEe35CYcY5hlBA727sM9IJaje7pTn/eJhPaN0= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AMSPR02MB120; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001);SRVR:AMSPR02MB120;BCL:0;PCL:0;RULEID:;SRVR:AMSPR02MB120; x-forefront-prvs: 07943272E1 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(377454003)(55674003)(199003)(189002)(19580405001)(87936001)(86362001)(81156007)(77096005)(6116002)(10400500002)(76576001)(586003)(33656002)(101416001)(5001770100001)(106356001)(2950100001)(15975445007)(189998001)(2501003)(5008740100001)(11100500001)(5004730100002)(3846002)(40100003)(1096002)(92566002)(5003600100002)(1220700001)(97736004)(5002640100001)(102836003)(54356999)(19580395003)(2900100001)(74316001)(122556002)(66066001)(5001960100002)(50986999)(76176999)(106116001)(105586002);DIR:OUT;SFP:1101;SCL:1;SRVR:AMSPR02MB120;H:DB5PR02MB1141.eurprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Dec 2015 10:37:03.1395 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AMSPR02MB120 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2128 Lines: 49 From: Marc Zyngier [mailto:marc.zyngier@arm.com] Sent: Wednesday, December 16, 2015 11:31 AM >> +static int __init nps400_of_init(struct device_node *node, >> + struct device_node *parent) >> +{ >> + if (parent) >> + panic("DeviceTree incore ic not a root irq controller\n"); >> + >> + nps400_root_domain = irq_domain_add_linear(node, NR_CPU_IRQS, >> + &nps400_irq_ops, NULL); >> + >> + if (!nps400_root_domain) >> + panic("nps400 root irq domain not avail\n"); >> + >> + /* with this we don't need to export nps400_root_domain */ >> + irq_set_default_host(nps400_root_domain); >Why do you need this? Devices should have their interrupt-parent pointing to this node, and irq_find_host should sort it >out. I must be missing some information (only being CC'd on this single patch). Sorry, I will CC you by my next version, in the meantime please refer to: https://lkml.org/lkml/2015/12/15/864 I need this for my per CPU irqs such timer and IPI which do not come from some external device but from CPUs. For these IRQs I am calling to irq_create_mapping() from my platform at arch/arc and at that point I got no irqdomain and using irq_find_host() is not good since I got no device_node (at most I can have DT root). Is there device_node for DT root? Please advise what to do? >> + >> + return 0; >> +} >> +IRQCHIP_DECLARE(ezchip_nps400_ic, "ezchip,nps400-ic", >> +nps400_of_init); >> >Another thing I'm not seeing here is where is the interrupt actually taken. This code only contains the EOI part, but not the ACK side, as well as the reverse lookup hwirq -> irq). Where is that code? ACK is an optional handler and is not needed by my platform. I will add comment that since my IRQs are EOI based I do not need an ACK. I do not understand reverse lookup remark, where is it missing? Could you point me to an example for such reverse lookup? Regards, Noam -- 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/