From patchwork Thu Feb 22 15:05:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Waiman Long X-Patchwork-Id: 204813 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3153dyb; Thu, 22 Feb 2024 07:07:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUDmY/7Ck0Km4yBANkMpHK2dakdYojskPHoROimLEl4dbfnnChYfzn3KCQ1zXNT8guocefOfo4KqLtLPRurvhdkwCNrOg== X-Google-Smtp-Source: AGHT+IFq4guzqr91nJLPD1W8fbfJrLwcyaMsNplpFEZV1t2KCpxIHDOizXlno+ffIP6C/X4MK2Tr X-Received: by 2002:a17:903:11c8:b0:1d9:a91b:778 with SMTP id q8-20020a17090311c800b001d9a91b0778mr24000542plh.30.1708614436581; Thu, 22 Feb 2024 07:07:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708614436; cv=pass; d=google.com; s=arc-20160816; b=xPZ2DbgUsFarvl0ABGmPSvvwbHXCS6X+IHPbHRTIhYI9UyS3eDzH4/0wdA+sjNcc1f 9VM+crRtjZvrXrdnflypWloFkocwj8WoWW9Eub+3U8laEDR+wrmoOGdmMh4cV0aeJjp4 guxK22FRTPL9bTI/Cn+uSWe2peudeQ5sjPRaIiN2nIbNPJnnCTVD5oUqVGo8EUjbXt02 Ee7TE8EcmcnFczAIvVsa3VuxHAs0eX72QcRjLp0QmsyL0JoDvRSCtPNiDo8cfojPimGC VFT0plf8yPmQ11fPuizl4wGWevQnGre2dLi2CaNaFUh3o5AKzxNRMpuP+je9L/V5WW0I gh+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=YwAU1bVRiWDpl3C11z2EMbgNyQd13w59+mKdZ8PW7BM=; fh=c25v70+ehGE+SiLl84UT2m6flxwHxsFK+3J6BVG3azM=; b=0LU0eP2i3euk7lk0T96LLGNoKDhbtYgV9cFOJ5UIWoTGZy5b4AhhzG9EDrnTZafWyB iNCudiSVFdMnTVJuX6D6qBnXlrO6H1W+qC5cB9I4UevO60rulzNRH4a4F3u4a5txB+Rb 9KEcMfoYWenkP9tUPr09V1UKj8uo14phjMGrLVNZ4sjSWlTA84mmy7V4A41+yv1cqCkO JdGceBkKg+z68FsFR+4mXuL+S0zeIqrUKePsYNSxa9+/S6XKaO7EojO4VqddXDva7J8n sigY1q282cT/qTRls1EiMjNh34VFA5mjhaQ4dRSX1i5vUCivqmilWS33jPWmbyGJ6hZq wZxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NgHKYPFT; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-76746-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76746-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w16-20020a1709029a9000b001db56097a9asi9835229plp.638.2024.02.22.07.07.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 07:07:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76746-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NgHKYPFT; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-76746-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76746-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CA70B287FF8 for ; Thu, 22 Feb 2024 15:07:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1114615098A; Thu, 22 Feb 2024 15:06:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NgHKYPFT" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 089E914C588 for ; Thu, 22 Feb 2024 15:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708614365; cv=none; b=Hxot6Lxxhe8TUIptsf2k5Inxcd76JrIaf6kksJSfNAciZB0c/CQUw8l14pCypICJpOaziJUkwb4HtOe83cAjjPIKo7e6FEBwJb8VF9eqd/rpvmdEKCxt2hDubaB/aGYkxdNgAoK5MrhqFXFPQOIAn+35OtD2tU+o0QxVVO3efzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708614365; c=relaxed/simple; bh=+AQtJf5/TvyBdLCUnBNNQA5gg3qQ4hhhj1LJzSNraEg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FI0lUsEn7Qx1/JofFpPwRMDV96K1NNezRvVmqaLt2MDZfIHVYj863jnQ650/SrcleaIVnVUTf1wrtC5YArQHOiB5d70iInGY1QzvLxl6WPh3qp/fYgEe+CJiRe7LIRF0z1xvuiuadFOcwXBfu5fDG722J5Pr7xNmxdk8ovSdA2Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NgHKYPFT; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708614362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YwAU1bVRiWDpl3C11z2EMbgNyQd13w59+mKdZ8PW7BM=; b=NgHKYPFT9r0lOI8X4TIAS9mrqzlfkYroWInVX9fjBbeH4Ig3+WcDtmKFYr2ZN1g4fvsaLi Y8A6/Sh4iFIw9o0rixtPRveKz6AC/AOEG3x6yisOGS/uBDUuyBjPLlngXssdHfJTFqyoV6 SgI8Gxy29YBkdeCH6WrJRztijs/JcpY= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-269-5jPZbsV8P0GUuj6YG1SU7g-1; Thu, 22 Feb 2024 10:05:58 -0500 X-MC-Unique: 5jPZbsV8P0GUuj6YG1SU7g-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3CF42825BA9; Thu, 22 Feb 2024 15:05:57 +0000 (UTC) Received: from llong.com (unknown [10.22.33.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C8A7111D3D9; Thu, 22 Feb 2024 15:05:57 +0000 (UTC) From: Waiman Long To: Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , Andrew Morton Cc: linux-kernel@vger.kernel.org, George Stark , Waiman Long Subject: [PATCH v2 4/4] locking/rwsem: Make DEBUG_RWSEMS and PREEMPT_RT mutually exclusive Date: Thu, 22 Feb 2024 10:05:40 -0500 Message-Id: <20240222150540.79981-5-longman@redhat.com> In-Reply-To: <20240222150540.79981-1-longman@redhat.com> References: <20240222150540.79981-1-longman@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791612091575630152 X-GMAIL-MSGID: 1791612091575630152 The debugging code enabled by CONFIG_DEBUG_RWSEMS will only be compiled in when CONFIG_PREEMPT_RT isn't set. There is no point to allow CONFIG_DEBUG_RWSEMS to be set in a kernel configuration where CONFIG_PREEMPT_RT is also set. Make them mutually exclusive. Signed-off-by: Waiman Long Reviewed-by: Boqun Feng --- lib/Kconfig.debug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 975a07f9f1cc..cb695bc76d30 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1303,7 +1303,7 @@ config PROVE_LOCKING select DEBUG_SPINLOCK select DEBUG_MUTEXES if !PREEMPT_RT select DEBUG_RT_MUTEXES if RT_MUTEXES - select DEBUG_RWSEMS + select DEBUG_RWSEMS if !PREEMPT_RT select DEBUG_WW_MUTEX_SLOWPATH select DEBUG_LOCK_ALLOC select PREEMPT_COUNT if !ARCH_NO_PREEMPT @@ -1426,7 +1426,7 @@ config DEBUG_WW_MUTEX_SLOWPATH config DEBUG_RWSEMS bool "RW Semaphore debugging: basic checks" - depends on DEBUG_KERNEL + depends on DEBUG_KERNEL && !PREEMPT_RT help This debugging feature allows mismatched rw semaphore locks and unlocks to be detected and reported.