From patchwork Thu Nov 30 21:16:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 172127 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp690719vqy; Thu, 30 Nov 2023 13:16:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGgUufK4sV9B7XA3Ni6zaYJLHSRXkrgFcoMccNfeON0yh6ZPtovO96Mj2T7CKAZfRYoLpNP X-Received: by 2002:a17:903:2288:b0:1d0:3eac:e7a with SMTP id b8-20020a170903228800b001d03eac0e7amr2404343plh.12.1701379007015; Thu, 30 Nov 2023 13:16:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701379007; cv=none; d=google.com; s=arc-20160816; b=LEMx+BBw0LKpJPGd03Meh+UYdXQqUwyhsAIlyNiA8cBVoqCqOoJ6rW+YNpRtQH0I2b U6hdyOde4J4lIrHcJUZRY1oz2SahJujQ3xDAsilLpv4xTpmtvmba6dbYXz9MNNIBh7MY 1hdl0XRoV88uZRyFM2DN8Z2z0PA3rtpvNKwSzJq2Li1gkRYkAqoUg51ra6xTTCZxJ8Wh 8mZNspSJIBu/11hQBPpLR1AaPgQOP13LWzT8wdvnU62yeF4vgI0mmR1RiK9SkSZSTWuT dW98b9853+crzb/uBRm5heR4X7Of5DvVXZgozwv8+XQYEjs90uJJ4CtSfFHzkeQzrr9i g30g== 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=VhWz3VZ/wxhJ6SUUEHoXbRcnWDzveXaRiWv2PlqBIwM=; fh=qopkSzBghdu/aCB/Jvn83W4n+F9d8kwELZOiG6X9fkY=; b=a8AR0frVmnOoXDL1xH4RvtOTIBBDkfSk8Pep5TL3j63igreOjUWFH7nno2Yo2VL2oo 5ukPNNTn01GdaGyY7/uB5cLIzXh0AOyumF7WWBEl/Clz/45fHWNGFF7WvA8j6ptucQXe iNBbXYCYHdpqmrdTI8bWJ9nESa0ihM4bZY5+eKIYRmNngkvECuQzn+arQ9k/iRsRBCba OIAdUA9L87vL5bafo1qc/PTDL99rJIrlj91QjE5DYmHm1fiOZc8+1xEylbTktPU2wsK5 yjvG1Ap4eAjaVMbR85tpDfatvffom+/8//XN/P82uZx+PjrkwOBvBLKGZAOSoFspQWYC BuDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zMH9ERIk; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y10-20020a170902700a00b001cf67d98a77si1964099plk.396.2023.11.30.13.16.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 13:16:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zMH9ERIk; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 088AE8029C55; Thu, 30 Nov 2023 13:16:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376911AbjK3VQf (ORCPT + 99 others); Thu, 30 Nov 2023 16:16:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376851AbjK3VQ1 (ORCPT ); Thu, 30 Nov 2023 16:16:27 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF4B4C4; Thu, 30 Nov 2023 13:16:33 -0800 (PST) Date: Thu, 30 Nov 2023 21:16:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701378992; 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=VhWz3VZ/wxhJ6SUUEHoXbRcnWDzveXaRiWv2PlqBIwM=; b=zMH9ERIkkUzKp1cm8wDSSvWURBYzetOMEjn1X/sahR4ZPhOSqBC0jpJq8VdJQeri45/CzN 0pF6MI53aLRDsu1mTQk/oEyJszy1rJWFWZDRytkLwCvPrTsCoWcb6VG+tTsjOxPJqD2qwT NudSJZ/oXLH8FwdcgBBWiBPKF/sF6jUodTtOe5FWuBwltWkBFdQBkNWaksvENs+iuRpROC qmKtuwjAdV1mnNVSt14s7E1tgG+T1+oCMWU4O2PLBffgUelERzCO59o5GFEOmXu3qP15rm KntRo/d8ysUKZ6XaajuTq2T7gxAxkO8npdqdxv8I8sSoOb0+eANR+fnlx84ivg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701378992; 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=VhWz3VZ/wxhJ6SUUEHoXbRcnWDzveXaRiWv2PlqBIwM=; b=F+VNUuuAMRy8rpf3/KtBYurYFgcbfck5k30h7l5B3NeTBE8XTC7bXFk2i/osFsKszXkMeb P3vuO4IBjRrrUnAA== 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/acpi: Use %rip-relative addressing in wakeup_64.S Cc: Uros Bizjak , Ingo Molnar , "Rafael J. Wysocki" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231103104900.409470-1-ubizjak@gmail.com> References: <20231103104900.409470-1-ubizjak@gmail.com> MIME-Version: 1.0 Message-ID: <170137899159.398.1084765322792442893.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 30 Nov 2023 13:16:46 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781539609293361511 X-GMAIL-MSGID: 1784025193719725492 The following commit has been merged into the x86/percpu branch of tip: Commit-ID: 0978d64f9406122c369d5f46e1eb855646f6c32c Gitweb: https://git.kernel.org/tip/0978d64f9406122c369d5f46e1eb855646f6c32c Author: Uros Bizjak AuthorDate: Fri, 03 Nov 2023 11:48:22 +01:00 Committer: Ingo Molnar CommitterDate: Thu, 30 Nov 2023 20:09:49 +01:00 x86/acpi: Use %rip-relative addressing in wakeup_64.S This is a "nice-to-have" change with minor code generation benefits: - Instruction with %rip-relative address operand is one byte shorter than its absolute address counterpart, - it is also compatible with position independent executable (-fpie) builds, - it is also consistent with what the compiler emits by default when a symbol is accessed. No functional changes intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20231103104900.409470-1-ubizjak@gmail.com --- arch/x86/kernel/acpi/wakeup_64.S | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S index d5d8a35..94ff83f 100644 --- a/arch/x86/kernel/acpi/wakeup_64.S +++ b/arch/x86/kernel/acpi/wakeup_64.S @@ -17,7 +17,7 @@ * Hooray, we are in Long 64-bit mode (but still running in low memory) */ SYM_FUNC_START(wakeup_long64) - movq saved_magic, %rax + movq saved_magic(%rip), %rax movq $0x123456789abcdef0, %rdx cmpq %rdx, %rax je 2f @@ -33,14 +33,14 @@ SYM_FUNC_START(wakeup_long64) movw %ax, %es movw %ax, %fs movw %ax, %gs - movq saved_rsp, %rsp + movq saved_rsp(%rip), %rsp - movq saved_rbx, %rbx - movq saved_rdi, %rdi - movq saved_rsi, %rsi - movq saved_rbp, %rbp + movq saved_rbx(%rip), %rbx + movq saved_rdi(%rip), %rdi + movq saved_rsi(%rip), %rsi + movq saved_rbp(%rip), %rbp - movq saved_rip, %rax + movq saved_rip(%rip), %rax ANNOTATE_RETPOLINE_SAFE jmp *%rax SYM_FUNC_END(wakeup_long64) @@ -72,11 +72,11 @@ SYM_FUNC_START(do_suspend_lowlevel) movq $.Lresume_point, saved_rip(%rip) - movq %rsp, saved_rsp - movq %rbp, saved_rbp - movq %rbx, saved_rbx - movq %rdi, saved_rdi - movq %rsi, saved_rsi + movq %rsp, saved_rsp(%rip) + movq %rbp, saved_rbp(%rip) + movq %rbx, saved_rbx(%rip) + movq %rdi, saved_rdi(%rip) + movq %rsi, saved_rsi(%rip) addq $8, %rsp movl $3, %edi