From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22618C10F04 for ; Wed, 6 Dec 2023 10:44:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377565AbjLFKoI (ORCPT ); Wed, 6 Dec 2023 05:44:08 -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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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