Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754345AbbKGUwR (ORCPT ); Sat, 7 Nov 2015 15:52:17 -0500 Received: from mail-am1on0080.outbound.protection.outlook.com ([157.56.112.80]:51099 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752998AbbKGUwO convert rfc822-to-8bit (ORCPT ); Sat, 7 Nov 2015 15:52:14 -0500 From: Noam Camus To: Thomas Gleixner CC: "linux-snps-arc@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Tal Zilcer , Gil Fruchter , Chris Metcalf , Jason Cooper , Marc Zyngier Subject: Re: [PATCH v2 04/19] irqchip: add nps Internal and external irqchips Thread-Topic: [PATCH v2 04/19] irqchip: add nps Internal and external irqchips Thread-Index: AQHRGUrEmVVkCk4S7Ei6+c/JT/0u0Z6QbwOAgACYuVE= Date: Sat, 7 Nov 2015 20:52:10 +0000 Message-ID: References: <1446297327-16298-1-git-send-email-noamc@ezchip.com> <1446893557-29748-5-git-send-email-noamc@ezchip.com>, In-Reply-To: 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: [212.179.42.66] x-microsoft-exchange-diagnostics: 1;DB5PR02MB1144;5:K9U9I+qmZ6HAq80C9dXFwTQbEtsL0+Jeso2bAKj6j13kx72X199HUvaTffo3q3fUEex4CYxaDKi9Qh/55+uRu06XT7maTVuUnJJ+DwFt8Anrqqce2zhjqq2XVtonLFaiw7xXaTbYf2F+dNHCIikdwQ==;24:p8gawy1hY6IjXTbupN+1amiMsnVHHkQWSv50NgWKIE5J7SjkBqcgAxidn3Qyb5qzNTTQMZOHNlcvIsl1qu+Cri1ZzLnXCaMVbPv7DZezoOc=;20:JuNAxb3A67Hg8ZmWDBYVb2ugVOy7mEUtfay6te/GTh/2SDOcQaOx0+HXLgAvfOGStyZFe1HXE6QpRBbAx5dYOQ== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR02MB1144; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001);SRVR:DB5PR02MB1144;BCL:0;PCL:0;RULEID:;SRVR:DB5PR02MB1144; x-forefront-prvs: 0753EA505A x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(199003)(164054003)(189002)(377454003)(5001960100002)(5007970100001)(50986999)(92566002)(76176999)(86362001)(40100003)(102836002)(76576001)(2950100001)(101416001)(122556002)(2900100001)(54356999)(5004730100002)(19580395003)(19580405001)(81156007)(97736004)(5001920100001)(106116001)(66066001)(74316001)(105586002)(110136002)(5008740100001)(11100500001)(10400500002)(5002640100001)(33656002)(77096005)(189998001)(87936001)(5003600100002)(106356001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB5PR02MB1144;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: 7BIT MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Nov 2015 20:52:10.5728 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR02MB1144 X-Microsoft-Exchange-Diagnostics: 1;DB5PR02MB0840;2:XnVUlBhRXAjNbISYcBALKAFsfXtbt1Ny2VHfgqDADxPoTzDTHcahMOB16+R5yhk6J53G/b8TrCPg/VkN9+Ojw/cDaREu4+u0nZDnq6Q02CFFYxUQV4UVms1PEyQxTbj18EdxysbgDRBPWuz0ePJbDFmclsJ3b9ijuN/I3Cos4jY=;23:PD571p75y+ZNIFh0/uZKQHJMHmw/hR3qBFN521k8ReyCKu0YR+vaQHtaWqWW0yzAI3dcslq+5o2AP6Hdp/8gGewdQc1WjiqHCkat40TaqSnZfzFRFzRCwYURzV541xkNhNDwExau4+x6C/6rAM5O0DRiWEznSzWTUsGhldgKhOPPdFJeQzkOrSda5D00XwM2 X-OriginatorOrg: ezchip.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1268 Lines: 36 >From: Thomas Gleixner >Sent: Saturday, November 7, 2015 1:38 PM >> + /* >> + * GIM interrupt select type for >> + * dbg_lan TX and RX interrupts >> + * should be type 1 >> + * type 0 = IRQ line 6 >> + * type 1 = IRQ line 7 >> + */ >> + gim_p_int_dst.is = 1; >More magic structs to set a single bit, right? I will replace all such magic with macros. >> + ienb &= ~(1 << data->irq); >You should not rely on data->irq ever. It's the Linux interrupt number >and it does not necessarily have a 1:1 mapping to the hardware >nterrupt number. Its working for legacy domains, but there >data->hwirq is set up for you as well. Thanks, I will use data->hwirq instead of data->irq. >> + write_aux_reg(AUX_IENABLE, ienb); >I can see how that works for per cpu interrupts, but what happens if >two cpus run that concurrent for two different interrupts? Each CPU got its own HW copy of auxiliary register IENABLE, so concurrent access won't be a trouble. -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/