From mboxrd@z Thu Jan 1 00:00:00 1970 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 81AEE412267; Thu, 2 Jul 2026 10:15:59 +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=1782987361; cv=none; b=MaSoWzFm+QCcY3uyFksX0h6j/75rdmsE6T4wmD919MHDPU8T19a1VwN09ciZYFocb8wXqWLC94elLUXpkyBNEJG92yJUj87tbO5FJVnZ3lixnIG/WXKz6cGEYOvaK8IXoM/zkpvRsUwiychnh0dycMaXH7bCH3MSHLLC/9oVIec= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782987361; c=relaxed/simple; bh=j7JXf4jnrY+T0zsJIdhDdgACQmKRigkrMtZXC7FFKAM=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=Ugp4Qj6BWbLa3o+9U3rHopSFSQr7yiGYnPuWBLyToSz2z8FaqSJAh01a+9nq5S6QJGJfryHPryMZRMSAOeavQEsOWLN8lJFDga3Qdp6kaEBbXkaNOFDIkwWeY8oY5KWKDd/gxsw98EVQtLtRMDXl5B0y3VMkkZOq1x/PLrTtU4s= 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=bbQmYu85; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=RqXQ6MqZ; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bbQmYu85"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="RqXQ6MqZ" Date: Thu, 02 Jul 2026 10:15:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1782987357; 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=PkngWLqAMA86L9HNrDHUu60F53VY/5i4AxwwQaOA1mI=; b=bbQmYu85Z7azUgcHU7AnHNM0LIwXDMYGChxQZVCbJDj1+DayfTvxPFA1yiwBn3wZJJEtmw CZbzmI1fOqgJzbo/UQu53fI+6eW28e2ZZrya+bk1oNhSLKcUlb95ZdxQzDnzo2Nld8thay HZ36AFr6dCDW+QPmUU62LNGVw+slcR6nUy8sMgW/5ieC74El3T1SPDk4GyS7/DB1yEGYQy CMEyVYT4nP0igC25MndQL1eEkFfPT4HozbcvWrYpKk5+HVcBBaI64Vz49w5HYOvRkKlLCi ScrUUHiqdpvXfW5Uad0plFL/pGi1gRXuvrqR0M+9DGdxLByqD/F3tOg7GfoWPg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1782987357; 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=PkngWLqAMA86L9HNrDHUu60F53VY/5i4AxwwQaOA1mI=; b=RqXQ6MqZxvX7+KqFenctPjgN9KwxI+2Ymb/AFGGQJc+2MBxBG+rt2X2ITPFXNglTE1pzJB 3oVnxATD1SyNglAA== From: "tip-bot2 for Juergen Gross" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/msr] x86/apic: Stop using 32-bit MSR interfaces Cc: Juergen Gross , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260629060526.3638272-19-jgross@suse.com> References: <20260629060526.3638272-19-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178298735629.3843924.10027600611697595657.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: quoted-printable The following commit has been merged into the x86/msr branch of tip: Commit-ID: 7920900e53dd9cff1f95a8edfeac3f7c24a1b723 Gitweb: https://git.kernel.org/tip/7920900e53dd9cff1f95a8edfeac3f7c24a= 1b723 Author: Juergen Gross AuthorDate: Mon, 29 Jun 2026 08:05:09 +02:00 Committer: Ingo Molnar CommitterDate: Thu, 02 Jul 2026 11:54:52 +02:00 x86/apic: Stop using 32-bit MSR interfaces The 32-bit MSR interfaces rdmsr() and wrmsr() are planned to be removed. Use the related 64-bit variants instead. Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Link: https://patch.msgid.link/20260629060526.3638272-19-jgross@suse.com --- arch/x86/kernel/apic/apic.c | 39 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index aa1e199..9002545 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -1191,11 +1191,11 @@ void disable_local_APIC(void) * restore the disabled state. */ if (enabled_via_apicbase) { - unsigned int l, h; + struct msr val; =20 - rdmsr(MSR_IA32_APICBASE, l, h); - l &=3D ~MSR_IA32_APICBASE_ENABLE; - wrmsr(MSR_IA32_APICBASE, l, h); + rdmsrq(MSR_IA32_APICBASE, val.q); + val.l &=3D ~MSR_IA32_APICBASE_ENABLE; + wrmsrq(MSR_IA32_APICBASE, val.q); } #endif } @@ -1960,7 +1960,8 @@ static bool __init detect_init_APIC(void) =20 static bool __init apic_verify(unsigned long addr) { - u32 features, h, l; + struct msr val; + u32 features; =20 /* * The APIC feature bit should now be enabled @@ -1975,9 +1976,9 @@ static bool __init apic_verify(unsigned long addr) =20 /* The BIOS may have set up the APIC at some other address */ if (boot_cpu_data.x86 >=3D 6) { - rdmsr(MSR_IA32_APICBASE, l, h); - if (l & MSR_IA32_APICBASE_ENABLE) - addr =3D l & MSR_IA32_APICBASE_BASE; + rdmsrq(MSR_IA32_APICBASE, val.q); + if (val.l & MSR_IA32_APICBASE_ENABLE) + addr =3D val.l & MSR_IA32_APICBASE_BASE; } =20 register_lapic_address(addr); @@ -1987,7 +1988,7 @@ static bool __init apic_verify(unsigned long addr) =20 bool __init apic_force_enable(unsigned long addr) { - u32 h, l; + struct msr val; =20 if (apic_is_disabled) return false; @@ -1998,12 +1999,12 @@ bool __init apic_force_enable(unsigned long addr) * and AMD K7 (Model > 1) or later. */ if (boot_cpu_data.x86 >=3D 6) { - rdmsr(MSR_IA32_APICBASE, l, h); - if (!(l & MSR_IA32_APICBASE_ENABLE)) { + rdmsrq(MSR_IA32_APICBASE, val.q); + if (!(val.l & MSR_IA32_APICBASE_ENABLE)) { pr_info("Local APIC disabled by BIOS -- reenabling.\n"); - l &=3D ~MSR_IA32_APICBASE_BASE; - l |=3D MSR_IA32_APICBASE_ENABLE | addr; - wrmsr(MSR_IA32_APICBASE, l, h); + val.l &=3D ~MSR_IA32_APICBASE_BASE; + val.l |=3D MSR_IA32_APICBASE_ENABLE | addr; + wrmsrq(MSR_IA32_APICBASE, val.q); enabled_via_apicbase =3D 1; } } @@ -2442,7 +2443,7 @@ static int lapic_suspend(void *data) =20 static void lapic_resume(void *data) { - unsigned int l, h; + struct msr val; unsigned long flags; int maxlvt; =20 @@ -2475,10 +2476,10 @@ static void lapic_resume(void *data) * SMP! We'll need to do this as part of the CPU restore! */ if (boot_cpu_data.x86 >=3D 6) { - rdmsr(MSR_IA32_APICBASE, l, h); - l &=3D ~MSR_IA32_APICBASE_BASE; - l |=3D MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; - wrmsr(MSR_IA32_APICBASE, l, h); + rdmsrq(MSR_IA32_APICBASE, val.q); + val.l &=3D ~MSR_IA32_APICBASE_BASE; + val.l |=3D MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; + wrmsrq(MSR_IA32_APICBASE, val.q); } } =20