Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753767Ab0AVNlc (ORCPT ); Fri, 22 Jan 2010 08:41:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753813Ab0AVNlZ (ORCPT ); Fri, 22 Jan 2010 08:41:25 -0500 Received: from ns.dcl.info.waseda.ac.jp ([133.9.216.194]:62790 "EHLO ns.dcl.info.waseda.ac.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750931Ab0AVNjW (ORCPT ); Fri, 22 Jan 2010 08:39:22 -0500 From: Hitoshi Mitake To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Hitoshi Mitake , Peter Zijlstra , Paul Mackerras , Frederic Weisbecker , Thomas Gleixner Subject: [PATCH 07/12] lockdep: Add file and line to initialize sequence of rwsem (x86) Date: Fri, 22 Jan 2010 22:39:08 +0900 Message-Id: <1264167553-6510-8-git-send-email-mitake@dcl.info.waseda.ac.jp> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1264167553-6510-1-git-send-email-mitake@dcl.info.waseda.ac.jp> References: <1264167553-6510-1-git-send-email-mitake@dcl.info.waseda.ac.jp> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1702 Lines: 51 This patch adds __FILE__ and __LINE__ to lockdep_map of rw_semaphore. This patch only affects to x86 architecture dependent rwsem. If this patch is accepted, I'll prepare and send the patch adds __FILE__ and __LINE__ to rw_semaphore of other architectures which provides architecture dependent rwsem.h . Signed-off-by: Hitoshi Mitake Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Frederic Weisbecker Cc: Thomas Gleixner --- arch/x86/include/asm/rwsem.h | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h index ca7517d..24cbe3a 100644 --- a/arch/x86/include/asm/rwsem.h +++ b/arch/x86/include/asm/rwsem.h @@ -74,7 +74,12 @@ struct rw_semaphore { }; #ifdef CONFIG_DEBUG_LOCK_ALLOC -# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname } +# define __RWSEM_DEP_MAP_INIT(lockname) \ + , .dep_map = { \ + .file = __FILE__, \ + .line = __LINE__, \ + .name = #lockname, \ + } #else # define __RWSEM_DEP_MAP_INIT(lockname) #endif @@ -96,7 +101,7 @@ extern void __init_rwsem(struct rw_semaphore *sem, const char *name, do { \ static struct lock_class_key __key; \ \ - __init_rwsem((sem), #sem, &__key); \ + __init_rwsem((sem), #sem, &__key, __FILE__, __LINE__); \ } while (0) /* -- 1.6.5.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/