From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752079Ab0AGKkz (ORCPT ); Thu, 7 Jan 2010 05:40:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752012Ab0AGKkH (ORCPT ); Thu, 7 Jan 2010 05:40:07 -0500 Received: from ns.dcl.info.waseda.ac.jp ([133.9.216.194]:52179 "EHLO ns.dcl.info.waseda.ac.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751681Ab0AGKkE (ORCPT ); Thu, 7 Jan 2010 05:40:04 -0500 From: Hitoshi Mitake To: mingo@elte.hu Cc: linux-kernel@vger.kernel.org, Hitoshi Mitake , Peter Zijlstra , Paul Mackerras , Frederic Weisbecker , Thomas Gleixner Subject: [PATCH 3/5] lockdep: Add file and line to initialize sequence of rwsem Date: Thu, 7 Jan 2010 19:39:53 +0900 Message-Id: <1262860795-5745-4-git-send-email-mitake@dcl.info.waseda.ac.jp> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <4B45B9C1.2040900@dcl.info.waseda.ac.jp> References: <4B45B9C1.2040900@dcl.info.waseda.ac.jp> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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