Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp350668lqe; Sat, 6 Apr 2024 04:08:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX+ADS1JV8ftWYkciOh+nFoHSOeWcyDnBOnjP0WeQDfGetHGZknxgjAJq2kH2J3oyiirO4L9PaI2+fc0Xbjel8dyFWRWUuJ53hI3OBoHw== X-Google-Smtp-Source: AGHT+IHiYRyBzcKg13HEV0GGFdrCyci8ViAjqiQXciohScHc+Sw46GgI5DyIxyTJj78bsIdktYxR X-Received: by 2002:a17:903:298f:b0:1e3:d4eb:a0f2 with SMTP id lm15-20020a170903298f00b001e3d4eba0f2mr2348919plb.51.1712401698936; Sat, 06 Apr 2024 04:08:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712401698; cv=pass; d=google.com; s=arc-20160816; b=cPVnDQfYfjHtnRY1ea0odJyQaTtQSRTYD1fSAC+yiqm2pZI4qGM24yaOWbgWtZj7ob QIjYRZkoo6C7Arrz6VY0bUIFhqyHJnoBKYMIe84x2fmqBaHVUsDohh7huXOBuliEfrPI AuwaSarOqDLkQr1P0mbOWdBUxbGFIfOJglasE7tcQV9GmH1TV7PAFLMe5SyfQtSSEU8B Pd2Spc5sKmdEvPCfm/p5HCcZtGR0dTJNxTnugUvw1XGxUVFX0Y6raHGDnqQuYWLljWEF v5WecEOBuoBeIFVlG1tzmUcR3ed3TmPfrxRlFqIKw+9HEmbUKqwXEtNxFUaKIhjW1ptu mfxw== 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=eJAn+beJLw8/tsPos9WG8VMHVJ5tgycFTzTz18XIK9Q=; fh=jRvt8aCydTbvPJV1fOIcRMxOjIv4AEfHKwdJKN/QQeI=; b=HiUjNeiD5AZFA/qu/ZTt3b3dYH0kjKxS/OFLVUgKp/pRHHQze1IjWWO1pBgkMt+/+8 tFch1YjgYfTGXw/DSGFO7vaMHPJZgacw7Ma44UKdMz/7rO3qYGB9ANk8qjv46A52OSeO T4nAqM/TnNYaRuzMC2C3Ytj/IqEx4I5fPs/AvUoyXyz680ojw8MvIla+7SWq1HvAf/Re YGNo0KWIaF0YMiidNpZylzxL6vmTECo8Bpdl7xzw14eY8yJqv1KFzjU3UnVFcDBmSLfq RcbE0yWftJYj5Tf61NBUVhFWiKloXROWJKHWKoTLBAcjzPwOpWEnPfQNHfstXIUyjfHh 6Xeg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fokGcvQ6; 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-133899-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id iz11-20020a170902ef8b00b001e25659e19dsi2833570plb.108.2024.04.06.04.08.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Apr 2024 04:08:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133899-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fokGcvQ6; 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-133899-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133899-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9A8A7282594 for ; Sat, 6 Apr 2024 11:08:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E84E12D042; Sat, 6 Apr 2024 11:08:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="fokGcvQ6"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ceywDiBY" 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 A1B292BAE9; Sat, 6 Apr 2024 11:08:00 +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=1712401682; cv=none; b=aJoLs20qUXUT6tw39onghH2DmjEJesX5VegX/gMMuZikIFSPKuvqFa/xLdxVvN0R/gro9IFuYaeW9HUDNfk23JID/0ajzfEHhoCr0WDg6L29fIN3euUC6+d9NHIbR8ZOgUDvGchWur1wUTxS6GMDGUyv4lWiUpXu/R+rz6R1PYY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712401682; c=relaxed/simple; bh=35iPJt2vYEXwxrqjybT/QgbF/cf5H0/aDboES+VMFk4=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=AtZTt42I+ftSv+6zw0inmv1/CuX0A7Sx/w8ZyMIondEFybOZ3SPzhoJtDgJ1zo4tY8G+zHePKE+Dd0vQwUiUhYIPVKhBn8bItTBYiEAsBtwctOcv4ypOd4A7UFVofMKbQmMPzfd7dbMLD7XCEZy3TzkAqfvVB57e59rq7YGaYvg= 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=fokGcvQ6; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ceywDiBY; 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: Sat, 06 Apr 2024 11:07:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712401678; 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=eJAn+beJLw8/tsPos9WG8VMHVJ5tgycFTzTz18XIK9Q=; b=fokGcvQ6AHpFP3lx/PyumYgVlQbd+3a3gLljfz7L1RLWSP/FGuvqGmjktVTQfhGfRmY5td e6QkPww9nhQA3/Iv8Ap0p/CGPRFHyKNyYYKl7JK4SPzICY/BdFARz3rdClV9rHEIr9bCMj /3tMbDkQTM68GgaHRck3eXVadMYQbDfd+Uy5TZTgACrJ+QGBcQ+Ob+2WoNjh0rJQ+R0iVF OhaUztszhf3sqFZFNBi8q3j32ppCK6fwDzyFvyLMOi/FA7Wmv9FTxqPRyCmJakRP2lcYQq O7zu5cp7bXcOv5FnMMHEewPcjiIfh2cEhEtUdlzyjPcCJ8cdH0ovhy7/mWQ70A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712401678; 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=eJAn+beJLw8/tsPos9WG8VMHVJ5tgycFTzTz18XIK9Q=; b=ceywDiBY7++Y+mayFKfL6l99uQINFF2+xzBPYLqGqc0hCss9gJ+13v3JgXKRo4wmI5ZcAa M9QFOgczCubJgBDw== 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/percpu: Fix x86_this_cpu_variable_test_bit() asm template Cc: Uros Bizjak , Ingo Molnar , Linus Torvalds , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240404094218.448963-1-ubizjak@gmail.com> References: <20240404094218.448963-1-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: <171240167793.10875.5486559736366474315.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/percpu branch of tip: Commit-ID: 4c3677c077582f8665806def3f6dd35587793c69 Gitweb: https://git.kernel.org/tip/4c3677c077582f8665806def3f6dd35587793c69 Author: Uros Bizjak AuthorDate: Thu, 04 Apr 2024 11:42:01 +02:00 Committer: Ingo Molnar CommitterDate: Sat, 06 Apr 2024 12:42:17 +02:00 x86/percpu: Fix x86_this_cpu_variable_test_bit() asm template Fix x86_this_cpu_variable_test_bit(), which is implemented with an incorrect asm template, where argument 2 (count argument) is considered a percpu variable. However, x86_this_cpu_test_bit() is currently used exclusively with constant bit number argument, so the called x86_this_cpu_variable_test_bit() function is never instantiated. The fix introduces named assembler operands to prevent this kind of error. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Linus Torvalds Cc: "H. Peter Anvin" Link: https://lore.kernel.org/r/20240404094218.448963-1-ubizjak@gmail.com --- arch/x86/include/asm/percpu.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h index 20696df..cbfbbe8 100644 --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h @@ -586,10 +586,11 @@ static inline bool x86_this_cpu_variable_test_bit(int nr, { bool oldbit; - asm volatile("btl "__percpu_arg(2)",%1" + asm volatile("btl %[nr], " __percpu_arg([var]) CC_SET(c) : CC_OUT(c) (oldbit) - : "m" (*__my_cpu_ptr((unsigned long __percpu *)(addr))), "Ir" (nr)); + : [var] "m" (*__my_cpu_ptr((unsigned long __percpu *)(addr))), + [nr] "Ir" (nr)); return oldbit; }