From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933350Ab3GCUTj (ORCPT ); Wed, 3 Jul 2013 16:19:39 -0400 Received: from g1t0028.austin.hp.com ([15.216.28.35]:16792 "EHLO g1t0028.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932841Ab3GCUTg (ORCPT ); Wed, 3 Jul 2013 16:19:36 -0400 From: Waiman Long 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" Subject: [PATCH v3 02/25] spinlock: Enable x86 architecture to do lockless refcount update Date: Wed, 3 Jul 2013 16:19:00 -0400 Message-Id: <1372882741-22563-3-git-send-email-Waiman.Long@hp.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1372882741-22563-1-git-send-email-Waiman.Long@hp.com> References: <1372882741-22563-1-git-send-email-Waiman.Long@hp.com> To: Alexander Viro , Jeff Layton , Miklos Szeredi , Ingo Molnar , Thomas Gleixner Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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