Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753914AbbG0N6Z (ORCPT ); Mon, 27 Jul 2015 09:58:25 -0400 Received: from mail-bn1on0132.outbound.protection.outlook.com ([157.56.110.132]:37914 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753380AbbG0N6U (ORCPT ); Mon, 27 Jul 2015 09:58:20 -0400 From: Shenwei Wang To: Thomas Gleixner CC: "shawn.guo@linaro.org" , "jason@lakedaemon.net" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Huang Anson Subject: RE: [PATCH v6 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources Thread-Topic: [PATCH v6 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources Thread-Index: AQHQxKFBE7T9qugVyk2pPJOxP2xAkJ3tqJiAgAG1QhA= Date: Mon, 27 Jul 2015 13:58:17 +0000 Message-ID: References: <1437584859-64203-1-git-send-email-shenwei.wang@freescale.com> <1437584859-64203-2-git-send-email-shenwei.wang@freescale.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linutronix.de; dkim=none (message not signed) header.d=none; x-originating-ip: [192.88.168.50] x-microsoft-exchange-diagnostics: 1;BY1PR03MB1371;5:nyTL2V5vaqnNtgHktDuNfnFggGYG639ddLlMn6jnFVowV8IHGIdndeS6XSzEgItkhsfCfx1LRdstgcpfMEpOyFwXBpUNryV04ABfzpwcXDLyEcXwzFpOIsLX7kJDhJigskLNflqAg54kcMJW1yfUfg==;24:8KKe4GliND+qNK5ZSIyH3u7apCAZnKzfND7Hr+Aen+K8tc6m3xbKGPVcuxcr4Q0l9u+HkVjec4PkvEIiFyWhH5DxwVWwzG8X2kNzTkxKeNk=;20:zKlRW44ihti2mSrAb1ZSUWbt1iCeTYh5zBJBlR3U3qbcX00inS+zoRmNTdz6yXyRS8IzoApuAm4vQghFYyBktQ== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1371; by1pr03mb1371: 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:BY1PR03MB1371;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1371; x-forefront-prvs: 0650714AAA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(164054003)(24454002)(33656002)(19580395003)(2656002)(2900100001)(106116001)(107886002)(5001960100002)(87936001)(86362001)(77156002)(92566002)(40100003)(99286002)(110136002)(5002640100001)(19580405001)(50986999)(189998001)(62966003)(66066001)(54356999)(122556002)(46102003)(76576001)(2950100001)(77096005)(5003600100002)(102836002)(76176999)(74316001)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR03MB1371;H:CY1PR0301MB0843.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="gb2312" MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jul 2015 13:58:17.3286 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1371 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t6RDwTWH009261 Content-Length: 1170 Lines: 31 > -----Original Message----- > From: Thomas Gleixner [mailto:tglx@linutronix.de] > Sent: 2015??7??26?? 6:48 > To: Wang Shenwei-B38339 > Cc: shawn.guo@linaro.org; jason@lakedaemon.net; > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; Huang > Yongcai-B20788 > Subject: Re: [PATCH v6 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup > sources > > On Wed, 22 Jul 2015, Shenwei Wang wrote: > > +static int imx_gpcv2_irq_set_wake(struct irq_data *d, unsigned int > > +on) { > > + struct imx_gpcv2_irq *cd = d->chip_data; > > + unsigned int idx = d->hwirq / 32; > > + unsigned long flags; > > + void __iomem *reg; > > + u32 mask, val; > > + > > + raw_spin_lock_irqsave(&cd->lock.rlock, flags); > > Oh no. You need to make cd->lock a raw_spinlock and then use > raw_spin_lock_irqsave() on it. How on earth did you come up with this hackery? I was thinking to use one spin_lock between the current two modules. But it should be okay to use a dedicate one for irqchip. > Thanks, > > tglx ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?