From mboxrd@z Thu Jan 1 00:00:00 1970 From: Waiman Long Subject: [PATCH v5 02/12] spinlock: Enable x86 architecture to do lockless refcount update Date: Fri, 5 Jul 2013 10:47:35 -0400 Message-ID: <1373035656-40600-3-git-send-email-Waiman.Long@hp.com> References: <1373035656-40600-1-git-send-email-Waiman.Long@hp.com> Cc: Waiman Long , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Steven Rostedt , Linus Torvalds , Benjamin Herrenschmidt , Andi Kleen , "Chandramouleeswaran, Aswin" , "Norton, Scott J" To: Alexander Viro , Jeff Layton , Miklos Szeredi , Ingo Molnar , Thomas Gleixner Return-path: Received: from g6t0185.atlanta.hp.com ([15.193.32.62]:32707 "EHLO g6t0185.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757475Ab3GEOsF (ORCPT ); Fri, 5 Jul 2013 10:48:05 -0400 In-Reply-To: <1373035656-40600-1-git-send-email-Waiman.Long@hp.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: There are two steps to enable each architecture to do lockless reference count update: 1. Define the ARCH_SPINLOCK_REFCOUNT config parameter in its Kconfig file. 2. Add a architecture specific header file. This is done for the x86 architecture to use the generic version available. Signed-off-by: Waiman Long --- arch/x86/Kconfig | 3 +++ arch/x86/include/asm/spinlock_refcount.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) create mode 100644 arch/x86/include/asm/spinlock_refcount.h diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index fe120da..649ed4b 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -253,6 +253,9 @@ config ARCH_CPU_PROBE_RELEASE config ARCH_SUPPORTS_UPROBES def_bool y +config ARCH_SPINLOCK_REFCOUNT + def_bool y + source "init/Kconfig" source "kernel/Kconfig.freezer" diff --git a/arch/x86/include/asm/spinlock_refcount.h b/arch/x86/include/asm/spinlock_refcount.h new file mode 100644 index 0000000..ab6224f --- /dev/null +++ b/arch/x86/include/asm/spinlock_refcount.h @@ -0,0 +1 @@ +#include -- 1.7.1