From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (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 C42883546C1 for ; Mon, 8 Jun 2026 05:18:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780895901; cv=none; b=QGrf//sqCupP115laKISkDdTiKxifGsKZ4TeZaJcNQmjSXkHUlVFXDW0B/M92hgPeZLASdJxDKaqYOQFTpkpT3FmQ+9zdNah18N2NNQ/7gzWugL2oTe5ocpZqXFLXzA+rG1ZctpRv1anArnPzWUBoHlubW3PQItUTiXhrLDROfQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780895901; c=relaxed/simple; bh=GbkJ5CYEHriUjSE9eR+asKBW5MPNDQ6ZryM1xD6Td/Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XiiM9nB+ltlGO2/ZKBfaR5arVBP2XBd2WPxjPlJ2neyARTWnytCR94dnNzRmH9/oepz4xv4LS+jm9DUsOSm3Ot9ZfdD9YmE8h0iZMu/doNBJzvWYf64z0S2+WhTOGRdxdWCBfho17fg6MejrTl/w3s8WVxAbGRhl5ClLBtWW4NY= 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=bdLQu+iN; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=bdLQu+iN; arc=none smtp.client-ip=195.135.223.131 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="bdLQu+iN"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="bdLQu+iN" 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-out2.suse.de (Postfix) with ESMTPS id 1C8E075E2B; Mon, 8 Jun 2026 05:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1780895898; 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=6sRehOPfK26O9pkEBtEmXghnxM80x5ZczpJG4HKZFDQ=; b=bdLQu+iN+jKLjpMrsqvzeCcgZPkDeOCBgSrBDfYuTpV9FrMFL61zfnrQWgx2v23U9FPigp qWxxXgJdDDkz9p1Xy+eKQNTU8LPrABHzM3kBKlKYXeSYyOc3Pi7a41l78d1xpSx3LHMcd3 QGVzE2PqsBiM9LXv4hlDulqj/1xOVw0= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1780895898; 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=6sRehOPfK26O9pkEBtEmXghnxM80x5ZczpJG4HKZFDQ=; b=bdLQu+iN+jKLjpMrsqvzeCcgZPkDeOCBgSrBDfYuTpV9FrMFL61zfnrQWgx2v23U9FPigp qWxxXgJdDDkz9p1Xy+eKQNTU8LPrABHzM3kBKlKYXeSYyOc3Pi7a41l78d1xpSx3LHMcd3 QGVzE2PqsBiM9LXv4hlDulqj/1xOVw0= 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 DCAB5779A7; Mon, 8 Jun 2026 05:18:17 +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 Es3GNJlQJmpkdQAAD6G6ig (envelope-from ); Mon, 08 Jun 2026 05:18:17 +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 v3 06/11] x86/msr: Remove wrmsr_on_cpu() Date: Mon, 8 Jun 2026 07:17:36 +0200 Message-ID: <20260608051741.3207435-7-jgross@suse.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260608051741.3207435-1-jgross@suse.com> References: <20260608051741.3207435-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-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[intel.com:email,suse.com:email,suse.com:mid,imap1.dmz-prg2.suse.org:helo]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; R_RATELIMIT(0.00)[to_ip_from(RLfdszjqhz8kzzb9uwpzdm8png)]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: wrmsr_on_cpu() has no users left. Delete it. Signed-off-by: Juergen Gross Reviewed-by: Dave Hansen --- V2: - delete wrmsr_on_cpu() instead of wrmsrq_on_cpu() (Ingo Molnar) --- arch/x86/include/asm/msr.h | 6 ------ arch/x86/lib/msr-smp.c | 16 ---------------- 2 files changed, 22 deletions(-) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 6e0d7a6335ff..0205643c1ece 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -256,7 +256,6 @@ int msr_set_bit(u32 msr, u8 bit); int msr_clear_bit(u32 msr, u8 bit); #ifdef CONFIG_SMP -int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); 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); @@ -268,11 +267,6 @@ 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]); int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]); #else /* CONFIG_SMP */ -static inline int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) -{ - wrmsr(msr_no, l, h); - return 0; -} static inline int rdmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 *q) { rdmsrq(msr_no, *q); diff --git a/arch/x86/lib/msr-smp.c b/arch/x86/lib/msr-smp.c index 65658e8877e6..a434c80408a0 100644 --- a/arch/x86/lib/msr-smp.c +++ b/arch/x86/lib/msr-smp.c @@ -46,22 +46,6 @@ int rdmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 *q) } EXPORT_SYMBOL(rdmsrq_on_cpu); -int wrmsr_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_on_cpu, &rv, 1); - - return err; -} -EXPORT_SYMBOL(wrmsr_on_cpu); - int wrmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 q) { int err; -- 2.54.0