Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1239401ybm; Sat, 30 May 2020 03:00:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyasdTkLokb8U9TDwNu1wIfLmn+Xm402xOy62T4zx0DZDTZJ2wk1TSCBg/6B5A/7wX2rYwm X-Received: by 2002:a17:906:2e9a:: with SMTP id o26mr10966070eji.538.1590832827359; Sat, 30 May 2020 03:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590832827; cv=none; d=google.com; s=arc-20160816; b=wefy3obiSD2RJt0+cxXoiEpVclC2HzJwA2CuOAwCJf4enXU5WUwtrRqOOepKolQ676 pzXuVN4bjM3SAE3gQC8kbFJ4kf2v6fllJnhipRWt9mrxSEJxseDjyGnZ9X1ceMQ2y2yR hWix2AinGo1rIhJMqMnTs68aE9Gg2uH+gabl6RS7dGG8RPIqB0Z63LRQQt3B6OUxLbvY cXmOF0GUXnhw+bFjWhwGNsF/Veo4fNt7alYQzhQnEnckQma2nF6WRiMvulo7RK6TQ1/8 nJgAppOKhykihX5jffl2NeAe99Q3gvLXYVxb8z1RIYy4bI737e6AEbSBSoPD8hpgXNEA rHaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=RQ4mVn2tN3dlpHOC91rwnVy1ZVhBjto7annEaGmn94Y=; b=z5wbwrvttUnqQKr2XwIWW3C7dnKBkrP5yFMWQtNrvW0nO+VmmXybMDAd4vXd2NYkls ODaPbt4MNrehyxgQvnN4q/MHlfYi8YoZ3DzI9uwTknY4SiYukqaEdnTIfg9Y6yf9Xtx3 6PNDhDiVOuWWutNuOidaxDF9d6mbe5n4x8Zpfv/FQiW3Byh5ysc1AoMU4Q4auuukDlo3 BfXmCRRh+Va/DbS0+0cXe7iqgxBSxw5xZpBBY3xDHNShSRC0sWAtv9tj/VOB293Ugt6X Dv1+WcH6Td2QLgAYhme9HGDYqEGdFJiwd3o6PdYP4rGTdqtkqHuE1XfjEFmECsx/rqSf 0o1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si7229536edy.21.2020.05.30.03.00.04; Sat, 30 May 2020 03:00:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729098AbgE3J6E (ORCPT + 99 others); Sat, 30 May 2020 05:58:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728907AbgE3J5W (ORCPT ); Sat, 30 May 2020 05:57:22 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DC16C08C5C9; Sat, 30 May 2020 02:57:22 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jeyEw-0002pr-Tb; Sat, 30 May 2020 11:57:19 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 889B81C0093; Sat, 30 May 2020 11:57:18 +0200 (CEST) Date: Sat, 30 May 2020 09:57:18 -0000 From: "tip-bot2 for Peter Zijlstra" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/entry] x86/entry: Clarify irq_{enter,exit}_rcu() Cc: "Peter Zijlstra (Intel)" , Thomas Gleixner , x86 , LKML In-Reply-To: <20200529213321.359433429@infradead.org> References: <20200529213321.359433429@infradead.org> MIME-Version: 1.0 Message-ID: <159083263842.17951.2162910976893497225.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/entry branch of tip: Commit-ID: b614345f52bcde8299a53132f5e48a9eb5a1f320 Gitweb: https://git.kernel.org/tip/b614345f52bcde8299a53132f5e48a9eb5a1f320 Author: Peter Zijlstra AuthorDate: Fri, 29 May 2020 23:27:39 +02:00 Committer: Thomas Gleixner CommitterDate: Sat, 30 May 2020 10:00:10 +02:00 x86/entry: Clarify irq_{enter,exit}_rcu() Because: irq_enter_rcu() includes lockdep_hardirq_enter() irq_exit_rcu() does *NOT* include lockdep_hardirq_exit() Which resulted in two 'stray' lockdep_hardirq_exit() calls in idtentry.h, and me spending a long time trying to find the matching enter calls. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200529213321.359433429@infradead.org --- arch/x86/include/asm/idtentry.h | 2 -- kernel/softirq.c | 19 +++++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h index d214a30..f8e2737 100644 --- a/arch/x86/include/asm/idtentry.h +++ b/arch/x86/include/asm/idtentry.h @@ -206,7 +206,6 @@ __visible noinstr void func(struct pt_regs *regs, \ kvm_set_cpu_l1tf_flush_l1d(); \ __##func (regs, (u8)error_code); \ irq_exit_rcu(); \ - lockdep_hardirq_exit(); \ instrumentation_end(); \ idtentry_exit_cond_rcu(regs, rcu_exit); \ } \ @@ -249,7 +248,6 @@ __visible noinstr void func(struct pt_regs *regs) \ kvm_set_cpu_l1tf_flush_l1d(); \ run_on_irqstack_cond(__##func, regs, regs); \ irq_exit_rcu(); \ - lockdep_hardirq_exit(); \ instrumentation_end(); \ idtentry_exit_cond_rcu(regs, rcu_exit); \ } \ diff --git a/kernel/softirq.c b/kernel/softirq.c index beb8e3a..a3eb6eb 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -404,12 +404,7 @@ static inline void tick_irq_exit(void) #endif } -/** - * irq_exit_rcu() - Exit an interrupt context without updating RCU - * - * Also processes softirqs if needed and possible. - */ -void irq_exit_rcu(void) +static inline void __irq_exit_rcu(void) { #ifndef __ARCH_IRQ_EXIT_IRQS_DISABLED local_irq_disable(); @@ -425,6 +420,18 @@ void irq_exit_rcu(void) } /** + * irq_exit_rcu() - Exit an interrupt context without updating RCU + * + * Also processes softirqs if needed and possible. + */ +void irq_exit_rcu(void) +{ + __irq_exit_rcu(); + /* must be last! */ + lockdep_hardirq_exit(); +} + +/** * irq_exit - Exit an interrupt context, update RCU and lockdep * * Also processes softirqs if needed and possible.