From patchwork Mon May 24 22:41:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 1483137 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=sY8nVK9r; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fpz5T0fCWz9sT6 for ; Tue, 25 May 2021 12:47:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/h0BdqqM1uqWXPk5z57i8Xop2dMxlOl5Z7xAq4c/HsQ=; b=sY8nVK9rpUcG5k zZP2XnRrjyrunx8JZer1N+eRhBqkwcuVOwlJ8CuBgMoAB7P998/amSFrKtfSv90XxembAHKUJ+3rT fyfB/54aZmc5OMUO6WpSrHjWzYN3rUkJbMyEHw/ZoScMocfamtTlfJkzSoCvu8vFymfdi2d8lHi+n uknNSWnJ9VeQv4UGKBtUaq5MZZLrKI+agU+1WYOkjTeUnqDJNddseI3CMyyfodv5fyndOxQCunXgm O8O0ztKZA0WbZo/iBJObr8rERKW0RdNpqJYGT6FRSe9KJDp0dkfvWCc6EW64UxsZZ7lNjmJ9AM82R k9niuHHLlNv2GDPQOQhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1llN6P-002zIz-BW; Tue, 25 May 2021 02:47:29 +0000 Received: from [2601:1c0:6280:3f0::7376] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1llJGi-002B2q-Cf; Mon, 24 May 2021 22:41:52 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Johannes Berg , Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.org, Julian Braha , linux-arch@vger.kernel.org Subject: [PATCH v2] LOCKDEP: reduce LOCKDEP dependency list Date: Mon, 24 May 2021 15:41:50 -0700 Message-Id: <20210524224150.8009-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Some arches (um, sparc64, riscv, xtensa) cause a Kconfig warning for LOCKDEP. These arch-es select LOCKDEP_SUPPORT but they are not listed as one of the arch-es that LOCKDEP depends on. Since (16) arch-es define the Kconfig symbol LOCKDEP_SUPPORT if they intend to have LOCKDEP support, replace the awkward list of arch-es that LOCKDEP depends on with the LOCKDEP_SUPPORT symbol. But wait. LOCKDEP_SUPPORT is included in LOCK_DEBUGGING_SUPPORT, which is already a dependency here, so LOCKDEP_SUPPORT is redundant and not needed. That leaves the FRAME_POINTER dependency, but it is part of an expression like this: depends on (A && B) && (FRAME_POINTER || B') where B' is a dependency of B so if B is true then B' is true and the value of FRAME_POINTER does not matter. Thus we can also delete the FRAME_POINTER dependency. Fixes this kconfig warning: (for um, sparc64, riscv, xtensa) WARNING: unmet direct dependencies detected for LOCKDEP Depends on [n]: DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y] && (FRAME_POINTER [=n] || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86) Selected by [y]: - PROVE_LOCKING [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y] - LOCK_STAT [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y] - DEBUG_LOCK_ALLOC [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y] Link to v1: https://lore.kernel.org/lkml/20210517034430.9569-1-rdunlap@infradead.org/ Fixes: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS") Signed-off-by: Randy Dunlap Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Cc: Johannes Berg Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Cc: Julian Braha Cc: linux-arch@vger.kernel.org Acked-by: Waiman Long --- @Julian: please take a look. I'm a little concerned about the FRAME_POINTER dependency going away when our 2 patches are combined. v2: drop depends on LOCKDEP_SUPPORT for LOCKDEP; the use of LOCK_DEBUGGING_SUPPORT already covers that dependency; drop FRAME_POINTER dependency (thanks to Waiman Long for both of these suggestions) v2: add CC: to linux-arch lib/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) --- linux-next-20210524.orig/lib/Kconfig.debug +++ linux-next-20210524/lib/Kconfig.debug @@ -1383,7 +1383,6 @@ config LOCKDEP bool depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT select STACKTRACE - depends on FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86 select KALLSYMS select KALLSYMS_ALL