From patchwork Wed Nov 7 15:30:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10672569 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 75F4215E9 for ; Wed, 7 Nov 2018 15:30:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64F582C67C for ; Wed, 7 Nov 2018 15:30:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 632E12C69B; Wed, 7 Nov 2018 15:30:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E78872C67C for ; Wed, 7 Nov 2018 15:30:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 372BD6E1AF; Wed, 7 Nov 2018 15:30:37 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 053C26E1A5 for ; Wed, 7 Nov 2018 15:30:32 +0000 (UTC) Received: by mail-ed1-x541.google.com with SMTP id e18-v6so2357532eds.2 for ; Wed, 07 Nov 2018 07:30:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UVmuNnmo8clMSmTZZapRghg8syPk6YswOfITuDcKZaw=; b=HnyKj7S1TutKao1ARmdXUMMMGZmT/lAKh1iMMcto3N3S/1u8Wnlj5w4KN0R/IcFWS1 KFS+iX5+Zfhn6h0Sih41BEHZ7/rdUXFPMT9cFiM7Tyi6t1YsrwJ0tzMdKMz1fBLvieJz otAFu1O2VqNYO+0yxgliBRV5eA3ht4drH4TnX9HWGJ4Mx9L4/ORkgPkLa3DTDTcO4AkH IaKFnwLcBtGBNjoF43GtewHUZJY5n8at9nhdf/qlWncGabPoV1jHm+hk+6J5s+hzJ7ZR xjlvrpNSl/2loCzU5PZLvfI32vPXZeKMM9yQiVULdBJPIwRbI79hwnqg/j8qdGcE03lD woEg== X-Gm-Message-State: AGRZ1gKgwxiaCwJ12AQlVzZrxUUebmfe1s+v4HEa+z867MJAaPjYxllU CkhT94krmDi+0uRt6GqdeCVSmkuB3Mw= X-Google-Smtp-Source: AJdET5fuC5M4ixOY3eX4BQ3TkKOwG5zGqOvhRTLI58LjXBaM/p5HqaEljyezgy5Vom65dLXfyx/QrQ== X-Received: by 2002:a50:9fa9:: with SMTP id c38-v6mr543534edf.33.1541604630261; Wed, 07 Nov 2018 07:30:30 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id b48-v6sm322425edb.27.2018.11.07.07.30.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 07:30:29 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 7 Nov 2018 16:30:10 +0100 Message-Id: <20181107153019.26401-4-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181107153019.26401-1-daniel.vetter@ffwll.ch> References: <20181107153019.26401-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 04/13] kernel/lockdep: Make cross-release a config option X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP cross-release annotations will need some serious amounts of vetting before they can be enabled by default, or we'll just annoy everyone. Instead split it into a separate option, which for now stays disabled by default even if you enable overall lockdep. Cc: Andrew Morton Cc: Ingo Molnar Cc: Masahiro Yamada Cc: Arnd Bergmann Cc: Randy Dunlap Cc: Daniel Vetter Cc: Waiman Long Cc: Masami Hiramatsu Cc: Yury Norov Cc: Mikulas Patocka Cc: Robin Murphy Cc: Andy Shevchenko Signed-off-by: Daniel Vetter --- lib/Kconfig.debug | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index f3d7bff6fa3c..6074fa3463ac 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1055,8 +1055,6 @@ config PROVE_LOCKING select DEBUG_RWSEMS if RWSEM_SPIN_ON_OWNER select DEBUG_WW_MUTEX_SLOWPATH select DEBUG_LOCK_ALLOC - select LOCKDEP_CROSSRELEASE - select LOCKDEP_COMPLETIONS select TRACE_IRQFLAGS default n help @@ -1093,6 +1091,18 @@ config PROVE_LOCKING For more details, see Documentation/locking/lockdep-design.txt. +config LOCKDEP_CROSSRELEASE + bool "Enable cross-release checking" + depends on PROVE_LOCKING + select LOCKDEP_COMPLETIONS + help + This makes lockdep work for crosslock which is a lock allowed to + be released in a different context from the acquisition context. + Normally a lock must be released in the context acquiring the lock. + However, relexing this constraint helps synchronization primitives + such as page locks or completions can use the lock correctness + detector, lockdep. + config LOCK_STAT bool "Lock usage statistics" depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT @@ -1189,16 +1199,6 @@ config LOCKDEP config LOCKDEP_SMALL bool -config LOCKDEP_CROSSRELEASE - bool - help - This makes lockdep work for crosslock which is a lock allowed to - be released in a different context from the acquisition context. - Normally a lock must be released in the context acquiring the lock. - However, relexing this constraint helps synchronization primitives - such as page locks or completions can use the lock correctness - detector, lockdep. - config LOCKDEP_COMPLETIONS bool help