From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1136E3F4846 for ; Fri, 5 Jun 2026 14:44:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780670670; cv=none; b=Xa+JVqGxuQgDPiSYThrFKAFSYCGSipJ7WuuXjvZ3HZK915P3L/kkHt5fj5BboJj5Fbo7LCPd1XsIFKHAtltGkcGDUjq/0BjHPBsGi5GC90hW7MICZojLjAYK5pcZqTC02LIBfwZ/r88BDN3kPkOU7u7frXnE/dTZvC8giorQy3g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780670670; c=relaxed/simple; bh=PLoRGn3lYz0g4cSm2OSOFZ5suxePFD52Q+wAqYzwa94=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=phD1nJo0Liu9vwY0I1j7qomIzS4TvDHTsRAdJu2P4BwRoTp5Q9SKc7//xPUMVHuvZ39YrFivil20MkEaUfY2lsKT7Z9mGGnHgQ3A9rY/3Q09fpT2180CQuWUiQwm+QRF7MCuNcFakWAFGWJ/Nni695koq3Lc7A9KXMiuSSI3pbk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=Bobci7K/; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=OAZoFHIj; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="Bobci7K/"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="OAZoFHIj" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 826016B1D5; Fri, 5 Jun 2026 14:44:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1780670655; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ihfTo7Da/yIcaD0MgLw5IGzwKfUURfixrglbPmAtya0=; b=Bobci7K/xUPuk5ilgzKiC6NmwfxzS+TBjZM2mbp0ST2F6Lso7JSGuwsoUMf6JlQYaOVDD6 h+Avrv6QemfF6zPwIUf6ySQKjYM568O8UuSafoPneXXGD6pSH5Ewt4rftx4EktVFs7YppF 52K4Ky+kHeqvPrHt1aRN64SeZcT4J8s= Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1780670654; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ihfTo7Da/yIcaD0MgLw5IGzwKfUURfixrglbPmAtya0=; b=OAZoFHIjtBdGXoWTVatS/KNQHUxIoJ6j63F+zw8JPAHsApmoLhTX3wK8V/1v3IZ6ox6dNP 5R7JLsPePN0YTizKieA+FbEGVaqfv9EsqnlJTDeKIXD6p9eBiUnBlMLPEh0i67NF/5OhqG Av5UuWwecYkWXCZ2tL7FBXqQ462MYEc= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 4F705779A8; Fri, 5 Jun 2026 14:44:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id I287Er7gImq0XAAAD6G6ig (envelope-from ); Fri, 05 Jun 2026 14:44:14 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH v2 10/10] x86/msr: Remove wrmsr_safe_on_cpu() Date: Fri, 5 Jun 2026 16:43:14 +0200 Message-ID: <20260605144314.3031049-11-jgross@suse.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260605144314.3031049-1-jgross@suse.com> References: <20260605144314.3031049-1-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Flag: NO X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_SEVEN(0.00)[8]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLfdszjqhz8kzzb9uwpzdm8png)]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.com:email,suse.com:mid]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: X-Spam-Score: -6.80 With no user left, wrmsr_safe_on_cpu() can be deleted. Signed-off-by: Juergen Gross --- V2: - delete wrmsr_safe_on_cpu() instead of wrmsrq_safe_on_cpu() (Ingo Molnar) --- arch/x86/include/asm/msr.h | 5 ----- arch/x86/lib/msr-smp.c | 16 ---------------- 2 files changed, 21 deletions(-) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index b0bf1a761a40..77dc7473d560 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -260,7 +260,6 @@ int rdmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 *q); int wrmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 q); void rdmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr __percpu *msrs); void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr __percpu *msrs); -int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); int rdmsrq_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 *q); int wrmsrq_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 q); int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]); @@ -286,10 +285,6 @@ static inline void wrmsr_on_cpus(const struct cpumask *m, u32 msr_no, { wrmsrq_on_cpu(0, msr_no, raw_cpu_read(msrs->q)); } -static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) -{ - return wrmsr_safe(msr_no, l, h); -} static inline int rdmsrq_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 *q) { return rdmsrq_safe(msr_no, q); diff --git a/arch/x86/lib/msr-smp.c b/arch/x86/lib/msr-smp.c index f58e0bab0be0..0c6627773c80 100644 --- a/arch/x86/lib/msr-smp.c +++ b/arch/x86/lib/msr-smp.c @@ -132,22 +132,6 @@ static void __wrmsr_safe_on_cpu(void *info) rv->err = wrmsr_safe(rv->msr_no, rv->reg.l, rv->reg.h); } -int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) -{ - int err; - struct msr_info rv; - - memset(&rv, 0, sizeof(rv)); - - rv.msr_no = msr_no; - rv.reg.l = l; - rv.reg.h = h; - err = smp_call_function_single(cpu, __wrmsr_safe_on_cpu, &rv, 1); - - return err ? err : rv.err; -} -EXPORT_SYMBOL(wrmsr_safe_on_cpu); - int wrmsrq_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 q) { int err; -- 2.54.0