Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp883654rdb; Wed, 6 Dec 2023 02:44:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+O/+eGbPdGbCbnGu+7nXXeOudoD7bfGTEeNOAKXKGVJ86FmLbxbI9luVgc8GRJrOb7Ytv X-Received: by 2002:a17:90a:de90:b0:286:922f:2e45 with SMTP id n16-20020a17090ade9000b00286922f2e45mr405055pjv.15.1701859470709; Wed, 06 Dec 2023 02:44:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701859470; cv=none; d=google.com; s=arc-20160816; b=d9L5xO/c1sNp90YCZrZDNYTp0yciRFW/UvVPFpIg9mkgRwjBRrIb6+rVI2BWMDB9Jw G6VN8Nkv4c9NNTe7ITm/H9mKrk2xz1ggPXY5M0HpSzcJKnyNiM0ZZ/y6U9i6FFT5aHg7 KOSUAsCz+qKu+j+oVxxKjoFTF97RwQ326Ast0phukz5eDP/z+LdQq//WMwq6rE/AyOmG 2celkGiKNE7YPYtR13AhcPwY/RL+TSjUKJw4tyRA/HOfuAoCahGi01rGRfjEDlJWNCY5 Ikak54zzs5llD3xf64MI+dlLdhYE7KKncMSFxVrZyFECaT0R0tCK03pcMpCMs8ZHXCp/ uy8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=z+kDKxHX12JlyMFJ6Fwr7VrEw2RqXj2PWYxwiKRqpvI=; fh=5cMh8CKYPGN1F0fzuaj1xrlN5+dBfa6bPK4XIprQ5s0=; b=M9+smrCzkfj2e03+0Yh75tuO0raBIwa2dQULoYVPbdEhrIalm2jg71PYVOAOp2C5gG 4kYCwqAtvJeHc4DYqfvYRxB6y3EqCQMYLTMLopzU21pfTH3PTKx9mceBtoWGgvPq0ocZ 5lwiP0158tTbZwR6QxjwyQxZ0iQtDoiLcORMwlmiVlMMkF7x8KZ5p6AlCt9f5So/3TfP SDWZClZDlAcgvNuj0QRTCXKeipbXgKppKgwUvbfsWwT1mzTUuBsV+e9Hh+eL77DBLhHE zC/QygZJBt0bc0DpSo5TFOzrip8k3vJj5c/cZI0xYCYE9cize1Vjn6kU+xOuObGBpPNT 6WCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ul2mb0vC; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id v5-20020a17090a458500b002867c645d4bsi6747055pjg.13.2023.12.06.02.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 02:44:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ul2mb0vC; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A0F3B822B735; Wed, 6 Dec 2023 02:44:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377564AbjLFKoH (ORCPT + 99 others); Wed, 6 Dec 2023 05:44:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377467AbjLFKoH (ORCPT ); Wed, 6 Dec 2023 05:44:07 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D77D212B for ; Wed, 6 Dec 2023 02:44:12 -0800 (PST) Date: Wed, 6 Dec 2023 11:44:09 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701859451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=z+kDKxHX12JlyMFJ6Fwr7VrEw2RqXj2PWYxwiKRqpvI=; b=Ul2mb0vCslqqLW0F0jUulkrp7u9VjaPLeGrCEjeKWcBnmgASZ3xc5exePNwQcq4LNYvrwS 2MZtTAE3sKfEH3sJi37VSLfHj9WzFnJKvFaOrLNZioKwxw3sTJrOBcX2HA389PRhWMvVO2 ghaR7BX2fJaoHWbiSwRBm4IrRqZw/hx+J8F614mkLeD0i/LR+tYGTU3bzx/9ESxIGG61TX r+3sDuf58C1mb7+spXANcMPmcaBg4LSlNtAA+yPCDWY79lzXHgNVziVs4HUmLTjUZPB+LU zyL8vsmwDtCrd9Nk8l8aqD1t0RMlCRPvKQedkCmup1TdUnXAa7uMT1jPGJyhFw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701859451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=z+kDKxHX12JlyMFJ6Fwr7VrEw2RqXj2PWYxwiKRqpvI=; b=XO4NjLLjGyLR8KCppb3bLn57Aug8GsVWoFB3d5b1Xxc4pOxPwOeuSBJy1pX5RkELGcbb59 UifM81kGT5J86kDA== From: Sebastian Siewior To: Anna-Maria Behnsen Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , John Stultz , Thomas Gleixner , Eric Dumazet , "Rafael J . Wysocki" , Arjan van de Ven , "Paul E . McKenney" , Frederic Weisbecker , Rik van Riel , Steven Rostedt , Giovanni Gherdovich , Lukasz Luba , "Gautham R . Shenoy" , Srinivas Pandruvada , K Prateek Nayak Subject: Re: [PATCH v9 25/32] timers: Add get next timer interrupt functionality for remote CPUs Message-ID: <20231206104409.mcNIiNBs@linutronix.de> References: <20231201092654.34614-1-anna-maria@linutronix.de> <20231201092654.34614-26-anna-maria@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231201092654.34614-26-anna-maria@linutronix.de> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 06 Dec 2023 02:44:28 -0800 (PST) On 2023-12-01 10:26:47 [+0100], Anna-Maria Behnsen wrote: > To prepare for the conversion of the NOHZ timer placement to a pull at > expiry time model it's required to have functionality available getting the > next timer interrupt on a remote CPU. > > Locking of the timer bases and getting the information for the next timer > interrupt functionality is split into separate functions. This is required > to be compliant with lock ordering when the new model is in place. > > Signed-off-by: Anna-Maria Behnsen > Reviewed-by: Frederic Weisbecker Please fold the hunk below, it keeps sparse happy. ------->8--------- diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 2cff43c103295..00420d8faa042 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -2075,6 +2075,8 @@ void fetch_next_timer_interrupt_remote(unsigned long basej, u64 basem, * Unlocks the remote timer bases. */ void timer_unlock_remote_bases(unsigned int cpu) + __releases(timer_bases[BASE_LOCAL]->lock) + __releases(timer_bases[BASE_GLOBAL]->lock) { struct timer_base *base_local, *base_global; @@ -2092,6 +2094,8 @@ void timer_unlock_remote_bases(unsigned int cpu) * Locks the remote timer bases. */ void timer_lock_remote_bases(unsigned int cpu) + __acquires(timer_bases[BASE_LOCAL]->lock) + __acquires(timer_bases[BASE_GLOBAL]->lock) { struct timer_base *base_local, *base_global; Sebastian