Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1656542pxm; Fri, 4 Mar 2022 00:34:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXQOLR3wKlidQpvI9mc94UT/w6Z+Me9tUurg+wIuczIf6YCf26CeW8JrQwHqos8W7lsBba X-Received: by 2002:a05:6402:40cf:b0:408:3655:812f with SMTP id z15-20020a05640240cf00b004083655812fmr11105789edb.108.1646382864861; Fri, 04 Mar 2022 00:34:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646382864; cv=none; d=google.com; s=arc-20160816; b=V7nr2n4Th0xdC9TjovYN1ShlTxOfjshTKmeF7eUmAKMVghs1yg4U/bd/xIVlTPZRx6 rWPGaSneEuDyPqy+/YD3eUzlEHh5wlEgInCSTivJ/wTii4eWJsq6kAO4knsSnMc2ooWI 9pX4TlgrTuiiLAtnX41vKZpEAOo94MtiBdEXMLtDpOwZraRNbeqNZ5B6CEAXYezyUke+ XmkYOZMTg+5C8DNlX8RBcS1UtIRJMqpAFVr2IQWL+lSPXKTJF6RSh0AZjxwU72mMoKZM v2TmA8bk4UTOhIhptVe421Zv80miEJ6MhP0/V69HaKwF5/EMU8w3eJ40CwmyH7XS6WEK jGOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=3dUlU4ELEGQw69cG+ho32XCUq71TzWdtxJXMMX59Xgk=; b=FujFtkBwzi4GCOeQAwPkLrbRuxbWkmVeTzwgQxrT5WFJP9UtVcLfBfuaCSekLZoEUT ZSNHgYAIcgPO6AVOz1U2BqOPEfZx3PBpgRe+Mg1uf4T7++51SFSCFkJXVSUo6FjTv0sm uW5ZktkNeYle+SISzgmX+t3oqcG72nhOvUWzomr5XfSA1IUyhMBXUZ8I7n7mqrEzjkDt pa7kEzHa2WbPVLVVVfNg6+d3FQkbh5c8Gnv2XJey49I+EPIlrRGta7FSyv1Jm2ua5a2W 598sxhmzXI2nbWuIDugTaieY1tLmlWfp5MoNun3ao7bqMKmmEr8J//hnfaIp5BLL40es 8NHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pv18-20020a170907209200b006cd5fc9f21esi3149037ejb.543.2022.03.04.00.34.00; Fri, 04 Mar 2022 00:34:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237252AbiCDHKB (ORCPT + 99 others); Fri, 4 Mar 2022 02:10:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238738AbiCDHIu (ORCPT ); Fri, 4 Mar 2022 02:08:50 -0500 Received: from lgeamrelo11.lge.com (lgeamrelo11.lge.com [156.147.23.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ADC49190C27 for ; Thu, 3 Mar 2022 23:07:09 -0800 (PST) Received: from unknown (HELO lgemrelse6q.lge.com) (156.147.1.121) by 156.147.23.51 with ESMTP; 4 Mar 2022 16:07:08 +0900 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: byungchul.park@lge.com Received: from unknown (HELO localhost.localdomain) (10.177.244.38) by 156.147.1.121 with ESMTP; 4 Mar 2022 16:07:08 +0900 X-Original-SENDERIP: 10.177.244.38 X-Original-MAILFROM: byungchul.park@lge.com From: Byungchul Park To: torvalds@linux-foundation.org Cc: damien.lemoal@opensource.wdc.com, linux-ide@vger.kernel.org, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, mingo@redhat.com, linux-kernel@vger.kernel.org, peterz@infradead.org, will@kernel.org, tglx@linutronix.de, rostedt@goodmis.org, joel@joelfernandes.org, sashal@kernel.org, daniel.vetter@ffwll.ch, chris@chris-wilson.co.uk, duyuyang@gmail.com, johannes.berg@intel.com, tj@kernel.org, tytso@mit.edu, willy@infradead.org, david@fromorbit.com, amir73il@gmail.com, bfields@fieldses.org, gregkh@linuxfoundation.org, kernel-team@lge.com, linux-mm@kvack.org, akpm@linux-foundation.org, mhocko@kernel.org, minchan@kernel.org, hannes@cmpxchg.org, vdavydov.dev@gmail.com, sj@kernel.org, jglisse@redhat.com, dennis@kernel.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, vbabka@suse.cz, ngupta@vflare.org, linux-block@vger.kernel.org, paolo.valente@linaro.org, josef@toxicpanda.com, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, jack@suse.cz, jack@suse.com, jlayton@kernel.org, dan.j.williams@intel.com, hch@infradead.org, djwong@kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com, hamohammed.sa@gmail.com Subject: [PATCH v4 16/24] locking/lockdep, cpu/hotplus: Use a weaker annotation in AP thread Date: Fri, 4 Mar 2022 16:06:35 +0900 Message-Id: <1646377603-19730-17-git-send-email-byungchul.park@lge.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1646377603-19730-1-git-send-email-byungchul.park@lge.com> References: <1646377603-19730-1-git-send-email-byungchul.park@lge.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cb92173d1f0 (locking/lockdep, cpu/hotplug: Annotate AP thread) was introduced to make lockdep_assert_cpus_held() work in AP thread. However, the annotation is too strong for that purpose. We don't have to use more than try lock annotation for that. Furthermore, now that Dept was introduced, false positive alarms was reported by that. Replaced it with try lock annotation. Signed-off-by: Byungchul Park --- kernel/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 407a256..1f92a42 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -355,7 +355,7 @@ int lockdep_is_cpus_held(void) static void lockdep_acquire_cpus_lock(void) { - rwsem_acquire(&cpu_hotplug_lock.dep_map, 0, 0, _THIS_IP_); + rwsem_acquire(&cpu_hotplug_lock.dep_map, 0, 1, _THIS_IP_); } static void lockdep_release_cpus_lock(void) -- 1.9.1