Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp833019lqt; Tue, 19 Mar 2024 05:31:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqsc+YKJCsWdOnNIqPiEogTAVC1sc1B0OQSLgbObMqRDOf11/DNuWL0zhIK8ghpwyPn+nYu8GZ+fGnW/lH+weAFR9uBO98GV8gCg9vWQ== X-Google-Smtp-Source: AGHT+IEGqWYqUlPf6/ZYu4PiAhfKyaTEdE6sOhJQwXLYgyfYnuz1m4p4Mbt+6TuScARG+30WxX/T X-Received: by 2002:a05:622a:5cc:b0:430:c1ff:8313 with SMTP id d12-20020a05622a05cc00b00430c1ff8313mr4644560qtb.33.1710851512186; Tue, 19 Mar 2024 05:31:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710851512; cv=pass; d=google.com; s=arc-20160816; b=OuB2vtnRxpgK+lyUxOSXECgU6iDHC+lljF13PMJTNGmk2EUPKUxmXvRX9rIsCExEDm DYRq9ayrzUm7GOVDu8TLBg7YbsddaRYVbzXGkKlkms15gmgCV1jN9q5PWp154DHcYqml DgIRSZw/TVrp8706CbPZkq7Al9Kbdk4Hwozy80DwgIdWR02sMnNPnDV5Lj7i3OGZlpTf rlTFRCYiW/f8dlkVvWUAPquXF0D8hnyOF0RItoObtryFQeGQ124gN7szWppHCq4JMJsq 1T7PuUiYrzAZDrN6nOzy0xbzf2EOS0z/V5E8a4Ed9niJDaugFYdVHC2XwDX8NW//RaJX VLPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=NShhxMWzFAcofb6ERv0kfsXdobwRDQWQ6WbLMWv2SW8=; fh=1ZKcDRNyoPdXgiZ/3H4LanbiHIB+l+KNPKWtcPs7tpI=; b=V9XGIRQxcgsxyM77BuEc63Zz7hpahjbIhoAdXXkFJmRl9H8j2Rz6vA8IC63wQ+CMzV CDVnf1zD+U3w2ZOT3RuAF5dNVZYwuQFw05yIPUb6iCYmGpEWe+JQkBJf4Tv6GpFbhGlw q06gBEp4Mjx++RLmbO3dXgS+o9Eazg9xAX79S0f2ox9owHr9p5UbhDd/bcHeqWbE7ruO zRo4TYMnW7hn/7gi+eU8g0sY9MtJUUItwfw7L9gn+4hlp9OtAfHqqjl+t84zIGyOgvhK Nue2G+SEPfyrE495ixc7xzbAXwgMwfejeOoKjkR0iEE2yx/tzl1ejGSiWZv3lN+69dqr Ox+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Pu1kxTEE; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-107518-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107518-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u31-20020a05622a199f00b00430bd040ad7si6985076qtc.641.2024.03.19.05.31.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 05:31:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107518-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Pu1kxTEE; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-107518-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107518-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D01B31C21F41 for ; Tue, 19 Mar 2024 12:31:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1139D57887; Tue, 19 Mar 2024 12:31:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Pu1kxTEE"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bf7gD5hx" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 926ED18EAB; Tue, 19 Mar 2024 12:31:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710851504; cv=none; b=X7M6agdLs2TEfkf1dBAEkJj57o4a4mxlJD+CHIE0xIqGml0HXE7xZ+anw8Fc+sNi2rfzbZtTCX3Nf+Y29FKCcT2GgZ+wJ3C+cUezjZBc38ikyHp6cMJj3mfM83z8obq4NtD0sd/SO6tb67JRS441XKXG92BUZxOKGW+c8iQjbfY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710851504; c=relaxed/simple; bh=Cp2zvHi3YdO5fJpG68cXOQoi6Dn2t3W7B+tLiiRUdfY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=hz2j/kUNtdLh0UqjTB/3U5tli+dVR8ko1ducorKEX1r67huQyFzpiDKb8nm9Dlbj1xQMvlUovg5oXoAoOVnA04QEsT0oq52uwU3MKDkVGdpn+NRAZ70JbQGNWAorWcbtDiFvQ7i6gBkc5AgrOy27JCPr+chjFAXXQppy/VXDIb4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Pu1kxTEE; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bf7gD5hx; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Tue, 19 Mar 2024 12:31:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1710851500; 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=NShhxMWzFAcofb6ERv0kfsXdobwRDQWQ6WbLMWv2SW8=; b=Pu1kxTEEZt1LR6E+GK8fBqu2jvRBZqPBQR22gFtx5azre3YbkGnRifgoaf+I4661vRydtG IsB0T9JaNlF1cOyuEzs2aMiEl1Tp1CGuP7VxN3iMEjb+Vby2G8LnMBeu/WxgtN28cyupX1 jBx09XWm881LuFRs7sKZloQN1bhlRtm8wCafSN0Dsrd/j3I3FzWpN7WyMsmEf3TsUff+D/ Q7Ivz6qM+3zyY6zaZQLFDS1v8lZzzqavLRejXh6R4Z6vu/VLKbqR6cEJ1QKP1n3AFwMtw2 rRLhaEr0Hc4MXnCJm039aogYYNNyI/MFVtvNPhwnm7QdQeYaLqmEYJZlx+I7xQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1710851500; 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=NShhxMWzFAcofb6ERv0kfsXdobwRDQWQ6WbLMWv2SW8=; b=bf7gD5hxRau277XHVD0E0EGxHB2rF4eEmKL7lA1jxf7JRDBqyLD/NCYR3iTJy2toEtrQQQ QPH3ia3DW05Iz2CQ== 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/asm] x86/asm: Use %a instead of %P operand modifier in asm templates Cc: Uros Bizjak , Ingo Molnar , Linus Torvalds , Josh Poimboeuf , Ard Biesheuvel , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240319104418.284519-4-ubizjak@gmail.com> References: <20240319104418.284519-4-ubizjak@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171085149958.10875.16469771896365925756.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/asm branch of tip: Commit-ID: d689863c1a60b9936b47a34fa5c3330de374f4fc Gitweb: https://git.kernel.org/tip/d689863c1a60b9936b47a34fa5c3330de374f4fc Author: Uros Bizjak AuthorDate: Tue, 19 Mar 2024 11:40:14 +01:00 Committer: Ingo Molnar CommitterDate: Tue, 19 Mar 2024 13:15:35 +01:00 x86/asm: Use %a instead of %P operand modifier in asm templates The "P" asm operand modifier is a x86 target-specific modifier. For x86_64, when used with a symbol reference, the "%P" modifier emits "sym" instead of "sym(%rip)". This property is currently used to issue bare symbol reference. The generic "a" operand modifier should be used instead. The "a" asm operand modifier substitutes a memory reference, with the actual operand treated as address. For x86_64, when a symbol is provided, the "a" modifier emits "sym(%rip)" instead of "sym", enabling shorter %rip-relative addressing. Also note that unlike GCC, clang emits %rip-relative symbol reference with "P" asm operand modifier, so the patch also unifies symbol handling with both compilers. No functional changes intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Linus Torvalds Cc: Josh Poimboeuf Cc: Ard Biesheuvel Cc: "H. Peter Anvin" Link: https://lore.kernel.org/r/20240319104418.284519-4-ubizjak@gmail.com --- arch/x86/include/asm/cpufeature.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index fa938ed..daae5c6 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h @@ -172,7 +172,7 @@ static __always_inline bool _static_cpu_has(u16 bit) ALTERNATIVE_TERNARY("jmp 6f", %c[feature], "", "jmp %l[t_no]") ".pushsection .altinstr_aux,\"ax\"\n" "6:\n" - " testb %[bitnum]," _ASM_RIP(%P[cap_byte]) "\n" + " testb %[bitnum], %a[cap_byte]\n" " jnz %l[t_yes]\n" " jmp %l[t_no]\n" ".popsection\n"