From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754696AbcB2LW6 (ORCPT ); Mon, 29 Feb 2016 06:22:58 -0500 Received: from torg.zytor.com ([198.137.202.12]:54804 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752304AbcB2LWw (ORCPT ); Mon, 29 Feb 2016 06:22:52 -0500 Date: Mon, 29 Feb 2016 03:22:11 -0800 From: tip-bot for Dan Streetman Message-ID: Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, arnd@arndb.de, peterz@infradead.org, ddstreet@ieee.org, torvalds@linux-foundation.org, mingo@kernel.org, dan.streetman@canonical.com, hpa@zytor.com, paulmck@linux.vnet.ibm.com, tglx@linutronix.de, Waiman.Long@hpe.com Reply-To: arnd@arndb.de, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, mingo@kernel.org, torvalds@linux-foundation.org, ddstreet@ieee.org, peterz@infradead.org, dan.streetman@canonical.com, tglx@linutronix.de, Waiman.Long@hpe.com, paulmck@linux.vnet.ibm.com, hpa@zytor.com In-Reply-To: <1455907767-17821-1-git-send-email-dan.streetman@canonical.com> References: <1455907767-17821-1-git-send-email-dan.streetman@canonical.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] locking/qspinlock: Move __ARCH_SPIN_LOCK_UNLOCKED to qspinlock_types.h Git-Commit-ID: b82e530290a0437522720becaf4abdf8ca4cb7d2 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b82e530290a0437522720becaf4abdf8ca4cb7d2 Gitweb: http://git.kernel.org/tip/b82e530290a0437522720becaf4abdf8ca4cb7d2 Author: Dan Streetman AuthorDate: Fri, 19 Feb 2016 13:49:27 -0500 Committer: Ingo Molnar CommitDate: Mon, 29 Feb 2016 10:02:43 +0100 locking/qspinlock: Move __ARCH_SPIN_LOCK_UNLOCKED to qspinlock_types.h Move the __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=y, 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 Signed-off-by: Peter Zijlstra (Intel) Acked-by: Waiman Long Cc: Andrew Morton Cc: Arnd Bergmann Cc: Dan Streetman Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1455907767-17821-1-git-send-email-dan.streetman@canonical.com Signed-off-by: Ingo Molnar --- 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