Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp427334pxh; Wed, 10 Nov 2021 04:05:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzaBCxCfIvnjghRspRUpT/kvg5trqjz7EHrCavMaUkFBc0uXXs5+b8OJM6KJgwOHF7eg/vv X-Received: by 2002:a05:6402:5113:: with SMTP id m19mr20998842edd.312.1636545952372; Wed, 10 Nov 2021 04:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636545952; cv=none; d=google.com; s=arc-20160816; b=CJccYCMmuOvXS9ImRcu3ifUbjnfQBHyHUBNV9/j6dgk8KWy2LJsNh5FaHLrdE8MDRE nCB/Dv1hDjTA+XIXUBGMc4yoTRIsd/j7I0M4SbLlurOXtyBmushzHEi0JNx8CwlOPHWM 1nxjT+dT/W6aSN2tD5Cuo1YRt2y4OOiUXiiJ03wo9VJ0T7rpkvclKWRiiWM83qMy5svi sHDvP7bpEZypX4EXzzZE190LnS01z3X7HUVxXXNfUmmnrKByqGiMn7VJA+/LWqwaOo4U aVULuQi/oO+XTXZ3tYOg+2UR1XZ47ROTAwfKh3IcA9A4HuuCnDpXF5A0v5SNm+aDhZ8d OpxA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Q3k4gSJ33r79TSQiVuZoKLnQbBRVyUbIZwLYjfwd7qo=; b=eZmTFjnCDyFTkayJ8YluAyisxB6/unM1d0EKXW1BTdVm+3A6mae6/nDbQhwBp/yB2K iK/7EtNbS4BxyS1IPEsVZh6HaDuns1hlUq38uNDnZPWwXIpGVmQu6ioXeLjYxAGNtF58 isMFK0KG3faMdtSTWbGgBZuW1UxRZ/fxMazIWfJSpYx5SgF+5k977dt/dwCRKs6oAME/ 9YjHvN0tjK1aT2Z4SMN4ejIiXIVenTNF4nsbkcMdxGK9wcNQnBOE9Ewba8SyIY5Xi3jv UwSc/OBcedRnAiAx7BudPD8th+TNuEdyI5yXRvJhEbSMh2GhT0wTHMXbklH0BhZQdJaz PC4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EySJvqn1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si40780610edi.622.2021.11.10.04.05.28; Wed, 10 Nov 2021 04:05:52 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EySJvqn1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232096AbhKJMGB (ORCPT + 99 others); Wed, 10 Nov 2021 07:06:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231623AbhKJMFb (ORCPT ); Wed, 10 Nov 2021 07:05:31 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F7D2C061767 for ; Wed, 10 Nov 2021 04:02:44 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id u11so2841749plf.3 for ; Wed, 10 Nov 2021 04:02:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q3k4gSJ33r79TSQiVuZoKLnQbBRVyUbIZwLYjfwd7qo=; b=EySJvqn1OwzmqRdsz7WgvTfDdZuu2atHR7QsYNQvf/ZOaNb6YqDK5dyhhDJNP7fGki YJbXBNBiVQfvHF5d4SajIORxzExPt/EZdCg8xYsEYCRXtxWfSNN4FXGcC+rlslsMWnNP lCHVFPgtD6P41kpF+WYpXruhK4CmxXcyv8IHl/AJxvvEQ9MRZvEQsFaSXn4pzAcw5La3 YDTOk/JqTygZ4gAhaEnOs8vxOjLmkdu+9N25uo5uzX9XddNJxTFElX1GeYxyjMK2LUTv 2HjsSnW5tzEMDoF3kwQsR/u1KhauW134xqecjebeu02cKxdSct6FebOQ9VBbaL+gTlB/ 6e/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q3k4gSJ33r79TSQiVuZoKLnQbBRVyUbIZwLYjfwd7qo=; b=quASVVqtNZLXiEHT8lyWlwnm9eDfYH0hEpvf7OHpxNyTlr9+9G8ykNRsum3vFYFgxv UJKR7bospNCUR+RMa1N9ufN425S3QVZj+AYMqMhvnfesLZqVGAqe6tC4rMRTYPJQk0Fr MUr1K6rlnWzpJ9dzII/Da5gK2oc43VI30cNSD8nNB2p3ZqCkq0yTbGKZQdm02aiMDw5n 41C8ccXhP5qYLuLpTlQQAlHWIGslv3j3E9Y8yNcTQp/7FkGvCkFigf+MZVHqye54kkzT pJdMle/pb5wv4sXDiNxEmu2WUAm8351NdBYCBvSXy7G1SGw6uLku6FxXTUB/NGioW4Zb mwXg== X-Gm-Message-State: AOAM531mjBurt7GARDulOfcLOvNS4iTKym0TQfqdi7xewhXdkQ1cpIwh uylllBnryEsLN2gFmAv9Bkah4U59w0I= X-Received: by 2002:a17:90b:38c9:: with SMTP id nn9mr15831058pjb.192.1636545763920; Wed, 10 Nov 2021 04:02:43 -0800 (PST) Received: from localhost ([198.11.178.15]) by smtp.gmail.com with ESMTPSA id m15sm5617889pjf.49.2021.11.10.04.02.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Nov 2021 04:02:42 -0800 (PST) From: Lai Jiangshan To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, Lai Jiangshan , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH V5 49/50] x86/entry: Remove save_ret from PUSH_AND_CLEAR_REGS Date: Wed, 10 Nov 2021 19:57:35 +0800 Message-Id: <20211110115736.3776-50-jiangshanlai@gmail.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20211110115736.3776-1-jiangshanlai@gmail.com> References: <20211110115736.3776-1-jiangshanlai@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lai Jiangshan PUSH_AND_CLEAR_REGS is never used with save_ret anymore. Signed-off-by: Lai Jiangshan --- arch/x86/entry/calling.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h index d42012fc694d..6f9de1c6da73 100644 --- a/arch/x86/entry/calling.h +++ b/arch/x86/entry/calling.h @@ -63,15 +63,9 @@ For 32-bit we have the following conventions - kernel is built with * for assembly code: */ -.macro PUSH_REGS rdx=%rdx rax=%rax save_ret=0 - .if \save_ret - pushq %rsi /* pt_regs->si */ - movq 8(%rsp), %rsi /* temporarily store the return address in %rsi */ - movq %rdi, 8(%rsp) /* pt_regs->di (overwriting original return address) */ - .else +.macro PUSH_REGS rdx=%rdx rax=%rax pushq %rdi /* pt_regs->di */ pushq %rsi /* pt_regs->si */ - .endif pushq \rdx /* pt_regs->dx */ pushq %rcx /* pt_regs->cx */ pushq \rax /* pt_regs->ax */ @@ -86,10 +80,6 @@ For 32-bit we have the following conventions - kernel is built with pushq %r14 /* pt_regs->r14 */ pushq %r15 /* pt_regs->r15 */ UNWIND_HINT_REGS - - .if \save_ret - pushq %rsi /* return address on top of stack */ - .endif .endm .macro CLEAR_REGS @@ -114,8 +104,8 @@ For 32-bit we have the following conventions - kernel is built with .endm -.macro PUSH_AND_CLEAR_REGS rdx=%rdx rax=%rax save_ret=0 - PUSH_REGS rdx=\rdx, rax=\rax, save_ret=\save_ret +.macro PUSH_AND_CLEAR_REGS rdx=%rdx rax=%rax + PUSH_REGS rdx=\rdx, rax=\rax CLEAR_REGS .endm -- 2.19.1.6.gb485710b