Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3918040rdb; Mon, 11 Dec 2023 04:06:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+7a8cKnZ3p8tlIBB/F3bfRlDgGHGWYbKiQrNqdk0qwoR0keIWwocfy6snx5OsD0Hz6Qoe X-Received: by 2002:a05:6a20:da8b:b0:18f:cbdd:3244 with SMTP id iy11-20020a056a20da8b00b0018fcbdd3244mr5622033pzb.47.1702296401719; Mon, 11 Dec 2023 04:06:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702296401; cv=none; d=google.com; s=arc-20160816; b=dbP+OYgy2gRyOnH7Z846bU5spJrulAUj1lEaBKW+eWG9AlyST7u3VsNckoxdqSfarw 0xshsQfEdgs+bcqZoAAc6stiwPf5Uo2Uum7xJzdc9co4MfStAEIPcNDic+JjMC9ep3JZ QEdGn3sV7aHz3jq5mHQYhGc+kxftsnQPsc6Jwmic2/E+7OJdZpGpBRG2neYGDPWChIWF F6FPkbsG4v6yhJgEZyzN2v5hKmI1yDvygLQuU59AlrayyBe8N0UuJ4v9oDMMoH3sWig8 HcfLHkFL4FbZfVo7VP2wnE+PEM9ERTmRPbxuTYb6Y8ivv77k/AH7/1n5eBsoJ0RHFgpq axpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=VfTPl/nW9rDgb6I9nd5VFUQTJIv7AQKSpG+8w24XWxg=; fh=aMuEctUrpEjcm7+Z6FW9dcyBzbyQClfa+XesJRjdIVw=; b=c3A1QGJEj96NJuL0vMgXfsYg4bGRdURX7ewFQVWzzHGm5s5UzBWqLfJ/LbuzdwD19H QzDvXoL75SIYDpBTyt4g4wBOluxu2tCXXZrsx0yKPf/vgi1MhBDNaMih1jhjuO/Wgu+v pZDmbhZUKpIwQu6AUZ7Wbrw8jx6VlcWg0W1iq0V3ScOLT0pM9GSY+8mRFfQYBGZTBFSl iYf58SRjiiDqflyHY0XqHBetolzVdNoQ+tVRC4qWcpNBLzJKhOBxA/78tWzCfVET7tL6 MnwjM6QivyGXRWZu+RqrMevubjWUlvU+g2qIkBb5kYmFSpVLDP24KIBMGl1UyVU2d/QY fTQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=2B0cL0Hw; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id d9-20020a056a0010c900b006cb68ae3b58si5994109pfu.182.2023.12.11.04.06.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 04:06:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=2B0cL0Hw; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id EE2FA806898D; Mon, 11 Dec 2023 04:06:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234350AbjLKMGT (ORCPT + 99 others); Mon, 11 Dec 2023 07:06:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234454AbjLKMGP (ORCPT ); Mon, 11 Dec 2023 07:06:15 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68B3BFD; Mon, 11 Dec 2023 04:06:20 -0800 (PST) Date: Mon, 11 Dec 2023 12:06:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1702296379; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VfTPl/nW9rDgb6I9nd5VFUQTJIv7AQKSpG+8w24XWxg=; b=2B0cL0HwQk/aPIxgPF+q3+qmJmNCR2zriNdqdInHiEhpQqEmxHpUqJ/2MkWq4FCsixWtUz 2zvwuM+bNqmw2oweLeQLb9Jd64G+WkwRlrewYava2VEStdMPvalbRxv8IVNK27/cctY3NR eSEtWHoPHG4i0jLkSXz/d6xw5cyb8Um5I0wT5XzyRnnvKveyUDCWKHA7ProO1iTvsSs+Pn S9W93ggkargHHzmDdbvrrFs0hHyU46/Z7K2EKebSwWfMVGoHuNXSvF55CcBty0Yi25ECmT mlt1hZjSM6oXNhjSLhrsqH+uqOB7uJJTkKPEowIQTosXVDgYZ5UbS460wre1kw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702296379; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VfTPl/nW9rDgb6I9nd5VFUQTJIv7AQKSpG+8w24XWxg=; b=MTpmbXwLJP4DtyKIdC+P4R64LflOAoTXmLRUR1JyGN9kGMpqEIcJVqIhKMTk7SkswX6K+p ZLsVldSOFqLFMrCA== From: "tip-bot2 for Uros Bizjak" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/percpu] x86/traps: Use current_top_of_stack() helper in traps.c Cc: Uros Bizjak , Ingo Molnar , Linus Torvalds , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231204210320.114429-2-ubizjak@gmail.com> References: <20231204210320.114429-2-ubizjak@gmail.com> MIME-Version: 1.0 Message-ID: <170229637816.398.6506455819507623200.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 11 Dec 2023 04:06:39 -0800 (PST) The following commit has been merged into the x86/percpu branch of tip: Commit-ID: 13408c6ae684181d53c870cceddbd3a62ae34c3e Gitweb: https://git.kernel.org/tip/13408c6ae684181d53c870cceddbd3a62ae34c3e Author: Uros Bizjak AuthorDate: Mon, 04 Dec 2023 22:02:30 +01:00 Committer: Ingo Molnar CommitterDate: Mon, 11 Dec 2023 11:47:15 +01:00 x86/traps: Use current_top_of_stack() helper in traps.c Use current_top_of_stack() helper in sync_regs() and vc_switch_off_ist() instead of open-coding the reading of the top_of_stack percpu variable explicitly. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/20231204210320.114429-2-ubizjak@gmail.com --- arch/x86/kernel/traps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index c876f1d..78b1d1a 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c @@ -772,7 +772,7 @@ DEFINE_IDTENTRY_RAW(exc_int3) */ asmlinkage __visible noinstr struct pt_regs *sync_regs(struct pt_regs *eregs) { - struct pt_regs *regs = (struct pt_regs *)this_cpu_read(pcpu_hot.top_of_stack) - 1; + struct pt_regs *regs = (struct pt_regs *)current_top_of_stack() - 1; if (regs != eregs) *regs = *eregs; return regs; @@ -790,7 +790,7 @@ asmlinkage __visible noinstr struct pt_regs *vc_switch_off_ist(struct pt_regs *r * trust it and switch to the current kernel stack */ if (ip_within_syscall_gap(regs)) { - sp = this_cpu_read(pcpu_hot.top_of_stack); + sp = current_top_of_stack(); goto sync; }