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 523A83A1687; Mon, 8 Jun 2026 08:03:30 +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=1780905811; cv=none; b=u+6bzbr66226obbAX7U3x+KE4arkwKOGhZCKBVM3IRmZHwxtyLi3F4yhu7rPuhK5ADkCQayLos1C6ofCwYLqG7gNMAGUCx8Cb16RXqof3yeI95ZkSJTJ5HlefmtV2D0SXdRFdGLV4tnvDUepZ2FnPf2jAuv0/nYVkA8t4Qf0Q9M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780905811; c=relaxed/simple; bh=Q+WKJwQ/pn1e3fuZor7pt8bhn06DmEMj0hWudVQ7+PM=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=TeMoydPokZrQ7/Dk0UJ7vZQzKTYGOqnKUUKh2Cg8dnBUmHmUdRt3/LhbW9zopNbyCnqcJxaxP6WIQln8+8xwzDObPJWCKd40lk0TlXz6nyhpaCvzXV6OerJDO8z5OIEmPsxC7pxysQJisSecJCTurHJVO+MbAyjWPIn9eG2JKtU= 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=GijrriLu; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=U+iJjjTY; 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="GijrriLu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="U+iJjjTY" Date: Mon, 08 Jun 2026 08:03:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1780905808; 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=diHR+RXi3aVbEZMc//5q0zlqIobnYVhKZ+XD5COcMXk=; b=GijrriLuvLPVWc0MbH+cvLC+3HzCqX9Wl7wRNRM9Zio0gykS0s9y3nbwTTogPYNJtL3U+E k7xOxzCL7RwCTJDBWyurFpDZFjmeg9KoljUX55d9ZHLxWKnkH0vHJRerYoeepXOy2Jfd4c Ko8q9t1YmkgMzP95vq0JiK5raWG5Czxz5jaiU6Ni8TV3mzmvlMgJgEuFy7L+A8Zz9je9Xr ECUdLFkVYI5hjaQxR4icpltEYl3JtHatmyfub4fHMqi0JS66ZMqqEHN79GeqB373XNodLF BcMH47H8hWqym6CdTBdO/38YWxsqw268Tt9BU+YKebQZvMvUD20j2+13zTPADg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1780905808; 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=diHR+RXi3aVbEZMc//5q0zlqIobnYVhKZ+XD5COcMXk=; b=U+iJjjTYhSDWLg141I5Ybgifgxt0Us0h45LQ98gSBItA4uusULUnLTLvAypZGePdIOc6jR eoFfSpjpi1h8ZLAQ== 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/msr: Switch wrmsr_on_cpu() users to wrmsrq_on_cpu() Cc: K Prateek Nayak , Juergen Gross , Ingo Molnar , Dave Hansen , Viresh Kumar , "Rafael J. Wysocki" , Daniel Lezcano , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260608051741.3207435-6-jgross@suse.com> References: <20260608051741.3207435-6-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: <178090580669.529383.3549409055770600173.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: 35971831aa5e0d40046e54422f2ba04734617109 Gitweb: https://git.kernel.org/tip/35971831aa5e0d40046e54422f2ba047346= 17109 Author: Juergen Gross AuthorDate: Mon, 08 Jun 2026 07:17:35 +02:00 Committer: Ingo Molnar CommitterDate: Mon, 08 Jun 2026 10:01:49 +02:00 x86/msr: Switch wrmsr_on_cpu() users to wrmsrq_on_cpu() In order to prepare retiring wrmsr_on_cpu() switch wrmsr_on_cpu() users to wrmsrq_on_cpu(). Tested-by: K Prateek Nayak Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Reviewed-by: Dave Hansen Cc: Viresh Kumar Cc: Rafael J. Wysocki Cc: Daniel Lezcano Link: https://patch.msgid.link/20260608051741.3207435-6-jgross@suse.com --- arch/x86/events/intel/ds.c | 11 ++++------- arch/x86/include/asm/msr.h | 2 +- arch/x86/kernel/cpu/mce/inject.c | 2 +- drivers/cpufreq/p4-clockmod.c | 4 ++-- drivers/cpufreq/speedstep-centrino.c | 4 ++-- drivers/thermal/intel/x86_pkg_temp_thermal.c | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c index 7f0d515..5b9c013 100644 --- a/arch/x86/events/intel/ds.c +++ b/arch/x86/events/intel/ds.c @@ -780,9 +780,7 @@ void init_debug_store_on_cpu(int cpu) if (!ds) return; =20 - wrmsr_on_cpu(cpu, MSR_IA32_DS_AREA, - (u32)((u64)(unsigned long)ds), - (u32)((u64)(unsigned long)ds >> 32)); + wrmsrq_on_cpu(cpu, MSR_IA32_DS_AREA, (u64)(unsigned long)ds); } =20 void fini_debug_store_on_cpu(int cpu) @@ -790,7 +788,7 @@ void fini_debug_store_on_cpu(int cpu) if (!per_cpu(cpu_hw_events, cpu).ds) return; =20 - wrmsr_on_cpu(cpu, MSR_IA32_DS_AREA, 0, 0); + wrmsrq_on_cpu(cpu, MSR_IA32_DS_AREA, 0); } =20 static DEFINE_PER_CPU(void *, insn_buffer); @@ -1095,8 +1093,7 @@ void init_arch_pebs_on_cpu(int cpu) * contiguous physical buffer (__alloc_pages_node() with order) */ arch_pebs_base =3D virt_to_phys(cpuc->pebs_vaddr) | PEBS_BUFFER_SHIFT; - wrmsr_on_cpu(cpu, MSR_IA32_PEBS_BASE, (u32)arch_pebs_base, - (u32)(arch_pebs_base >> 32)); + wrmsrq_on_cpu(cpu, MSR_IA32_PEBS_BASE, arch_pebs_base); x86_pmu.pebs_active =3D 1; } =20 @@ -1105,7 +1102,7 @@ inline void fini_arch_pebs_on_cpu(int cpu) if (!x86_pmu.arch_pebs) return; =20 - wrmsr_on_cpu(cpu, MSR_IA32_PEBS_BASE, 0, 0); + wrmsrq_on_cpu(cpu, MSR_IA32_PEBS_BASE, 0); } =20 /* diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 22f914f..6e0d7a6 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -291,7 +291,7 @@ static inline void rdmsr_on_cpus(const struct cpumask *m,= u32 msr_no, static inline void wrmsr_on_cpus(const struct cpumask *m, u32 msr_no, struct msr __percpu *msrs) { - wrmsr_on_cpu(0, msr_no, raw_cpu_read(msrs->l), raw_cpu_read(msrs->h)); + wrmsrq_on_cpu(0, msr_no, raw_cpu_read(msrs->q)); } static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/injec= t.c index bee9c35..6d30e77 100644 --- a/arch/x86/kernel/cpu/mce/inject.c +++ b/arch/x86/kernel/cpu/mce/inject.c @@ -327,7 +327,7 @@ static int toggle_hw_mce_inject(unsigned int cpu, bool en= able) =20 enable ? (val.l |=3D BIT(18)) : (val.l &=3D ~BIT(18)); =20 - err =3D wrmsr_on_cpu(cpu, MSR_K7_HWCR, val.l, val.h); + err =3D wrmsrq_on_cpu(cpu, MSR_K7_HWCR, val.q); if (err) pr_err("%s: error writing HWCR\n", __func__); =20 diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c index d96e8b6..c1690aa 100644 --- a/drivers/cpufreq/p4-clockmod.c +++ b/drivers/cpufreq/p4-clockmod.c @@ -68,7 +68,7 @@ static int cpufreq_p4_setdc(unsigned int cpu, unsigned int = newstate) rdmsrq_on_cpu(cpu, MSR_IA32_THERM_CONTROL, &val.q); if (newstate =3D=3D DC_DISABLE) { pr_debug("CPU#%d disabling modulation\n", cpu); - wrmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, val.l & ~(1<<4), val.h); + wrmsrq_on_cpu(cpu, MSR_IA32_THERM_CONTROL, val.q & ~(1ULL << 4)); } else { pr_debug("CPU#%d setting duty cycle to %d%%\n", cpu, ((125 * newstate) / 10)); @@ -79,7 +79,7 @@ static int cpufreq_p4_setdc(unsigned int cpu, unsigned int = newstate) */ val.l =3D (val.l & ~14); val.l =3D val.l | (1<<4) | ((newstate & 0x7)<<1); - wrmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, val.l, val.h); + wrmsrq_on_cpu(cpu, MSR_IA32_THERM_CONTROL, val.q); } =20 return 0; diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep= -centrino.c index cefee19..9237ed8 100644 --- a/drivers/cpufreq/speedstep-centrino.c +++ b/drivers/cpufreq/speedstep-centrino.c @@ -475,7 +475,7 @@ static int centrino_target(struct cpufreq_policy *policy,= unsigned int index) oldmsr.l |=3D msr; } =20 - wrmsr_on_cpu(good_cpu, MSR_IA32_PERF_CTL, oldmsr.l, oldmsr.h); + wrmsrq_on_cpu(good_cpu, MSR_IA32_PERF_CTL, oldmsr.q); if (policy->shared_type =3D=3D CPUFREQ_SHARED_TYPE_ANY) break; =20 @@ -491,7 +491,7 @@ static int centrino_target(struct cpufreq_policy *policy,= unsigned int index) */ =20 for_each_cpu(j, covered_cpus) - wrmsr_on_cpu(j, MSR_IA32_PERF_CTL, oldmsr.l, oldmsr.h); + wrmsrq_on_cpu(j, MSR_IA32_PERF_CTL, oldmsr.q); } retval =3D 0; =20 diff --git a/drivers/thermal/intel/x86_pkg_temp_thermal.c b/drivers/thermal/i= ntel/x86_pkg_temp_thermal.c index 2e7de8c..144603c 100644 --- a/drivers/thermal/intel/x86_pkg_temp_thermal.c +++ b/drivers/thermal/intel/x86_pkg_temp_thermal.c @@ -167,7 +167,7 @@ sys_set_trip_temp(struct thermal_zone_device *tzd, v.l |=3D intr; } =20 - return wrmsr_on_cpu(zonedev->cpu, MSR_IA32_PACKAGE_THERM_INTERRUPT, v.l, v.= h); + return wrmsrq_on_cpu(zonedev->cpu, MSR_IA32_PACKAGE_THERM_INTERRUPT, v.q); } =20 /* Thermal zone callback registry */