Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1676937rdh; Mon, 25 Sep 2023 23:14:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEG/u/k+PTQy3COv9y2aenwGQnA3SOXGtOYSNM2zAj7QYNbFp/PHjLgUT6XFtxRtajw1ifu X-Received: by 2002:a05:6808:1396:b0:3a1:e17a:b3fb with SMTP id c22-20020a056808139600b003a1e17ab3fbmr12449155oiw.1.1695708890909; Mon, 25 Sep 2023 23:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695708890; cv=none; d=google.com; s=arc-20160816; b=eF2VjUh4xQyMqMprCA+2GGfzetpKD3l/b+YiZSO3xuNkLJacIWNZFAh9PMrVDiWibQ /QbFq/rdFFjGocIKJ9J3ua8uPIG2rTGr0fADhxDD6xNYTkKRmYM+yLlzCBu/ewE6Ky9/ allQeGi5DsCHy/tcAcOADTfzCLsPhhao2a7lrXs6F3W8n/pwbG3Qmhns5yrfnDHZddW/ g2jCmKJ0dUkapCEKlujlnoCg24AtNdO7qBpgBGHOWP5g8bWYfN3PiMbWCe8Y5jh2fMZ8 nqtqrdk6R6rbI3ya6kPT0JD+n5dICa4WrfuJZuzAXOREP9p+A+RMErS9nLYNvLmm2GTp 4rtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=nNwOzyqfEzLt1zDWttF1YMiYKoXzfh/V3dbwJJ7gl5s=; fh=f5O2W8SYEAqHlw/WllS4OFAWYH5JJy3i80U5gguBazk=; b=g1Gc6R2M9mGNnFOiazPbl2ehmgsTrhMQHq29g4Xq3NQ5qtG75nF+KZE26naBrmbaIi dBtiWDq8RndgSe2fciwKiG1cxh3AHhieyU7NZwS1ER/efrd5Vj4iOaAc+2EUDRyhdniw 0NVeM9oZoBZGezkkksR+sIFa5RyqElpZ5kH5yP7AifBfMXRs4RZ+Gjj3ehHXH7B5DH3B uqbW1b1WWAszYQgfqXFL6KIZNfgIxTUZjiT6Z4ZsEAVPa1fjNfyUnLm+U8/fKso4l9G6 8BTnkzJDftcJ2zOjILDe8W7Xk9bOybVteHuznlA3HtES6wesHJJNqmoq+Lfq0P33oBAe 26xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2023091101 header.b=gBqMBgNB; 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=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id ca17-20020a056a00419100b0068fca4405aasi11494992pfb.338.2023.09.25.23.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 23:14:50 -0700 (PDT) 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=@zytor.com header.s=2023091101 header.b=gBqMBgNB; 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=NONE dis=NONE) header.from=zytor.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 2E25881B1795; Mon, 25 Sep 2023 23:14:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233751AbjIZGOC (ORCPT + 99 others); Tue, 26 Sep 2023 02:14:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233753AbjIZGOB (ORCPT ); Tue, 26 Sep 2023 02:14:01 -0400 Received: from mail.zytor.com (unknown [IPv6:2607:7c80:54:3::138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4799E9 for ; Mon, 25 Sep 2023 23:13:54 -0700 (PDT) Received: from terminus.zytor.com (terminus.zytor.com [IPv6:2607:7c80:54:3:0:0:0:136]) (authenticated bits=0) by mail.zytor.com (8.17.1/8.17.1) with ESMTPSA id 38Q6DK1r1929152 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 25 Sep 2023 23:13:24 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 38Q6DK1r1929152 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2023091101; t=1695708805; bh=nNwOzyqfEzLt1zDWttF1YMiYKoXzfh/V3dbwJJ7gl5s=; h=From:To:Cc:Subject:Date:From; b=gBqMBgNBpIDGd5cUuIWQ6YV+PbFTrIYT/NNXbe2NsE5T7WEtq6IYB11ZCxkUXZMiV cQF78ZOnXpCM5O5iesps5qw81iWSk1cRq8X7btxdw/HayCk9iE7l21qF4tHMZbBcYw q/MUvXUMFHNhuxxhYNzukJbkuk5qsh9hvevvsG4gEf8XnuFROq1Oqa86SM3MhCCPH0 Zzawh5LJ8XT9YdNodEGqZw9T3PD/NDJpVzmTnOHWZ1b9zz5laAzcYUiA9/7FyCXW1n ssrhzllEhjQo75H7TAoHXeksHjG15Vx+RXZ/77wYV/m1nc1EPIwV1njdKpmGIb+GLY fWdRhqhC5UFgA== From: xin@zytor.com To: linux-kernel@vger.kernel.org Cc: luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com Subject: [PATCH 1/1] x86/entry: remove unused argument %rsi passed to exc_nmi() Date: Mon, 25 Sep 2023 23:13:19 -0700 Message-Id: <20230926061319.1929127-1-xin@zytor.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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, 25 Sep 2023 23:14:06 -0700 (PDT) From: "Xin Li (Intel)" exc_nmi() only takes one argument of type struct pt_regs *, but asm_exc_nmi() calls it with 2 arguments. The second one passed in %rsi seems a leftover, so simply remove it. BTW, fix 2 slips in the comments. Signed-off-by: Xin Li (Intel) Acked-by: H. Peter Anvin (Intel) --- arch/x86/entry/entry_64.S | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index f71664dea1a3..9b4b512f2a75 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1163,8 +1163,8 @@ SYM_CODE_START(asm_exc_nmi) * anyway. * * To handle this case we do the following: - * Check the a special location on the stack that contains - * a variable that is set when NMIs are executing. + * Check a special location on the stack that contains a + * variable that is set when NMIs are executing. * The interrupted task's stack is also checked to see if it * is an NMI stack. * If the variable is not set and the stack is not the NMI @@ -1237,7 +1237,6 @@ SYM_CODE_START(asm_exc_nmi) */ movq %rsp, %rdi - movq $-1, %rsi call exc_nmi /* @@ -1295,8 +1294,8 @@ SYM_CODE_START(asm_exc_nmi) * end_repeat_nmi, then we are a nested NMI. We must not * modify the "iret" frame because it's being written by * the outer NMI. That's okay; the outer NMI handler is - * about to about to call exc_nmi() anyway, so we can just - * resume the outer NMI. + * about to call exc_nmi() anyway, so we can just resume + * the outer NMI. */ movq $repeat_nmi, %rdx @@ -1451,7 +1450,6 @@ end_repeat_nmi: UNWIND_HINT_REGS movq %rsp, %rdi - movq $-1, %rsi call exc_nmi /* Always restore stashed SPEC_CTRL value (see paranoid_entry) */ -- 2.40.1