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 A72C5C433F5 for ; Thu, 19 May 2022 14:58:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240089AbiESO6x (ORCPT ); Thu, 19 May 2022 10:58:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240062AbiESO6m (ORCPT ); Thu, 19 May 2022 10:58:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FDAED6819 for ; Thu, 19 May 2022 07:58:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1896EB82559 for ; Thu, 19 May 2022 14:58:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71C99C385AA; Thu, 19 May 2022 14:58:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652972318; bh=QnZHsoFGGDrgc6gDM8i1CtC1GfXotTEDdEW7fOq4DJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SCcSxDBHc3EjqOSX9CTn8JfRdE2qAWLPE6CQSiOcI50le/xpR5meMkJsW1Ws5YFKW 84m05df44EiCby4AbTzdj+oUqzMIBrk4OjPZekSjWyZEqvFUvYV81gEiXa/j2ZyUl8 Q1SQs7DZweaW0+FvSJJOSHCjoVqFj4w0TxhSiOegOz1bdbIe2NV/bLF37w6xqUjR+G gGSKT3Ykj4YKMEo6I4rMComriEHDiVX5kU1ltu9MkdQj5KU0KU9A1FR0pvyewxBqs6 DnmPAt1Uce1gpDZaZmZYfA8tJ/AsGb1GDJdOpO9kFIVkQ2KZ0VJClC8UZ2QzOGULOH vzWoGUgou6qvw== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Peter Zijlstra , Phil Auld , Alex Belits , Nicolas Saenz Julienne , Xiongfeng Wang , Neeraj Upadhyay , Thomas Gleixner , Yu Liao , Boqun Feng , "Paul E . McKenney" , Marcelo Tosatti , Paul Gortmaker , Uladzislau Rezki , Joel Fernandes , Mark Rutland Subject: [PATCH 02/21] rcu: Tag rcu_irq_*_irqson() as noinstr Date: Thu, 19 May 2022 16:58:04 +0200 Message-Id: <20220519145823.618983-3-frederic@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220519145823.618983-1-frederic@kernel.org> References: <20220519145823.618983-1-frederic@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rcu_irq_*_irqson() functions can't be safely instrumented. Since they enter/exit to/from RCU idle mode, those functions must be tagged as "noinstr". Unfortunately this involves converting the instrumentable local_irq_save()/local_irq_restore() to their raw counterparts. Precious debugging informations might be lost on the way until a better way out is found. Signed-off-by: Frederic Weisbecker Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Neeraj Upadhyay Cc: Uladzislau Rezki Cc: Joel Fernandes Cc: Boqun Feng Cc: Nicolas Saenz Julienne Cc: Marcelo Tosatti Cc: Xiongfeng Wang Cc: Yu Liao Cc: Phil Auld Cc: Paul Gortmaker Cc: Alex Belits --- kernel/rcu/tree.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 02233b17cce0..ff97264d8077 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -843,13 +843,13 @@ void rcu_irq_exit_check_preempt(void) * If you add or remove a call to rcu_irq_exit_irqson(), be sure to test * with CONFIG_RCU_EQS_DEBUG=y. */ -void rcu_irq_exit_irqson(void) +void noinstr rcu_irq_exit_irqson(void) { unsigned long flags; - local_irq_save(flags); + raw_local_irq_save(flags); rcu_irq_exit(); - local_irq_restore(flags); + raw_local_irq_restore(flags); } /* @@ -1081,13 +1081,13 @@ noinstr void rcu_irq_enter(void) * If you add or remove a call to rcu_irq_enter_irqson(), be sure to test * with CONFIG_RCU_EQS_DEBUG=y. */ -void rcu_irq_enter_irqson(void) +void noinstr rcu_irq_enter_irqson(void) { unsigned long flags; - local_irq_save(flags); + raw_local_irq_save(flags); rcu_irq_enter(); - local_irq_restore(flags); + raw_local_irq_restore(flags); } /* -- 2.25.1