From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2993827AbcBSVJU (ORCPT ); Fri, 19 Feb 2016 16:09:20 -0500 Received: from mail-bn1bon0134.outbound.protection.outlook.com ([157.56.111.134]:2209 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2992692AbcBSVJT convert rfc822-to-8bit (ORCPT ); Fri, 19 Feb 2016 16:09:19 -0500 From: "Long, Wai Man" To: Dan Streetman CC: Peter Zijlstra , Arnd Bergmann , "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Dan Streetman Subject: Re: [PATCH] locking/qspinlock: move __ARCH_SPIN_LOCK_UNLOCKED to qspinlock_types.h Thread-Topic: [PATCH] locking/qspinlock: move __ARCH_SPIN_LOCK_UNLOCKED to qspinlock_types.h Thread-Index: AQHRa0anmY8xqxWhrkGl6OybnONND58ziRsA Date: Fri, 19 Feb 2016 21:09:16 +0000 Message-ID: References: <1455907767-17821-1-git-send-email-dan.streetman@canonical.com> In-Reply-To: <1455907767-17821-1-git-send-email-dan.streetman@canonical.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-imapappendstamp: DF4PR84MB0138.NAMPRD84.PROD.OUTLOOK.COM (15.01.0409.017) user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 x-identity-key: id1 fcc: imap://waiman.long@webmail.hp.com/Sent x-mozilla-draft-info: internal/draft; vcard=0; receipt=0; DSN=0; uuencode=0 authentication-results: canonical.com; dkim=none (message not signed) header.d=none;canonical.com; dmarc=none action=none header.from=hpe.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [72.71.243.32] x-microsoft-exchange-diagnostics: 1;DF4PR84MB0139;5:nSFhKYQTFqQrymN375KHGmWGu5ejyo9Aqej1P0cSakMfc9/KZLQ9nytlFstvvGQrB2AH6T/8FZg0/FWgVGeY3Pmn8lb/vAdRSa/627YSY13Cil1fF8qDP1nx7luE+qIYfoujW7/ji7w5VjK9610g3Q==;24:ref6FIic3m/b+XUHNtIRPumEhyQTNp0mZzeyDQWQgOBt3hBVE0JDu4oWMVT+wD3W3Jsig+S/CW6faoFpX7Q1zfuXa5rWTA4DkRUgydVbCTQ= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DF4PR84MB0139; x-ms-office365-filtering-correlation-id: bc5d72c3-bf91-4d44-ffb0-08d33970ed3d x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:DF4PR84MB0139;BCL:0;PCL:0;RULEID:;SRVR:DF4PR84MB0139; x-forefront-prvs: 08572BD77F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(479174004)(24454002)(377454003)(586003)(102836003)(5004730100002)(19580395003)(86362001)(33656002)(2950100001)(87936001)(1220700001)(19580405001)(5002640100001)(2900100001)(77096005)(5003600100002)(3846002)(5008740100001)(40100003)(99286002)(122556002)(54356999)(1096002)(50986999)(4326007)(106116001)(110136002)(3660700001)(189998001)(10400500002)(5001960100002)(65956001)(92566002)(76176999)(66066001)(3280700002)(2906002)(65826006);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR84MB0139;H:DF4PR84MB0138.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <5E9DC8A92C6ED44DAEEDD20F9C95289F@HPEnterprise.onmicrosoft.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Feb 2016 21:09:16.7444 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0139 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/19/2016 01:49 PM, Dan Streetman wrote: > Move __ARCH_SPIN_LOCK_UNLOCKED definition from qspinlock.h into > qspinlock_types.h. > > The definition of __ARCH_SPIN_LOCK_UNLOCKED comes from the build arch's > include files; but on x86 when CONFIG_QUEUED_SPINLOCKS is set, it just > it's defined in asm-generic/qspinlock.h. In most cases, this doesn't > matter because linux/spinlock.h includes asm/spinlock.h, which for x86 > includes asm-generic/qspinlock.h. However, any code that only includes > linux/mutex.h will break, because it only includes asm/spinlock_types.h. > > For example, this breaks systemtap, which only includes mutex.h. > > Signed-off-by: Dan Streetman > Cc: Dan Streetman > --- > include/asm-generic/qspinlock.h | 5 ----- > include/asm-generic/qspinlock_types.h | 5 +++++ > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/include/asm-generic/qspinlock.h b/include/asm-generic/qspinlock.h > index 39e1cb2..35a52a8 100644 > --- a/include/asm-generic/qspinlock.h > +++ b/include/asm-generic/qspinlock.h > @@ -120,11 +120,6 @@ static __always_inline bool virt_spin_lock(struct qspinlock *lock) > #endif > > /* > - * Initializier > - */ > -#define __ARCH_SPIN_LOCK_UNLOCKED { ATOMIC_INIT(0) } > - > -/* > * Remapping spinlock architecture specific functions to the corresponding > * queued spinlock functions. > */ > diff --git a/include/asm-generic/qspinlock_types.h b/include/asm-generic/qspinlock_types.h > index 85f888e..034acd0 100644 > --- a/include/asm-generic/qspinlock_types.h > +++ b/include/asm-generic/qspinlock_types.h > @@ -33,6 +33,11 @@ typedef struct qspinlock { > } arch_spinlock_t; > > /* > + * Initializier > + */ > +#define __ARCH_SPIN_LOCK_UNLOCKED { ATOMIC_INIT(0) } > + > +/* > * Bitfields in the atomic value: > * > * When NR_CPUS< 16K Acked-by: Waiman Long