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 33B1F197A7D for ; Mon, 8 Jun 2026 05:18:07 +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=1780895889; cv=none; b=I3uxxz9yNoES5d5qIJdIpRbuOgR+PI+XVBOd0upFnBAuo4IAL8W7vQIgiYUSKETp09PJpxebc8q4qn8LtXYra7XNCHjrqO8DG9fXDZu0rf8TnXSPNSGeVlCtd9hSbEZ3rx5ZbVt4Tg6yMhFOg86Qg1h4njaJyjHfXiDkxq5YtdU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780895889; c=relaxed/simple; bh=avmnESCDtKAXpCaJmw44loQcVgTqvWxUnlB8UdNXPpY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TJwfv7ay2wn75Wzq4F72ifKWEuZ3s1XvQxuO4PRiIjmmTmd32I4F5pmQF9jmTMi9ZcPe/66cDfNfGHv8kr8PCiM6LlR6IXs11JQm6D/OK6XJdMXL0cGaUgbyLDNNBB+11KeK7i/3iu6Td2Hc/PETlbmAweqQH2lpSaLcXMHihCE= 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=puMVN50D; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=puMVN50D; 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="puMVN50D"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="puMVN50D" 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 8580275E25; Mon, 8 Jun 2026 05:18:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1780895886; 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=WWrRhHe4I6S84CNVKs/n0fX3mSeuucKoANCh29mvRFM=; b=puMVN50DWPXd62sUwGunmMKVkWXnAvk+dz61LO+6xmqOiOhGwdCwlCJn72ZfYV2okjuWDH FKKRuTZPK3z1t8jG6myZUQEE5KQfeNmnyeSOWLu2+ZM3bHdp7Mi9ycatBcozsH6XqnLQVu a1yDU5Aln9X84Iz8RsDWNXQcBjgZMXc= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1780895886; 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=WWrRhHe4I6S84CNVKs/n0fX3mSeuucKoANCh29mvRFM=; b=puMVN50DWPXd62sUwGunmMKVkWXnAvk+dz61LO+6xmqOiOhGwdCwlCJn72ZfYV2okjuWDH FKKRuTZPK3z1t8jG6myZUQEE5KQfeNmnyeSOWLu2+ZM3bHdp7Mi9ycatBcozsH6XqnLQVu a1yDU5Aln9X84Iz8RsDWNXQcBjgZMXc= 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 52024779A7; Mon, 8 Jun 2026 05:18:06 +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 T1/0Eo5QJmpXdQAAD6G6ig (envelope-from ); Mon, 08 Jun 2026 05:18:06 +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 04/11] x86/msr: Remove rdmsr_on_cpu() Date: Mon, 8 Jun 2026 07:17:34 +0200 Message-ID: <20260608051741.3207435-5-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-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)[]; MIME_TRACE(0.00)[0:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,intel.com:email,suse.com:email,suse.com:mid]; 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]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: X-Spam-Score: -2.80 rdmsr_on_cpu() has no users left. Delete it. Signed-off-by: Juergen Gross Reviewed-by: Dave Hansen --- V2: - delete rdmsr_on_cpu() instead of rdmsrq_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 d5985d6fdaf9..22f914f7affe 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 rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); 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); @@ -269,11 +268,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 rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h) -{ - rdmsr(msr_no, *l, *h); - return 0; -} static inline int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) { wrmsr(msr_no, l, h); diff --git a/arch/x86/lib/msr-smp.c b/arch/x86/lib/msr-smp.c index b8f63419e6ae..65658e8877e6 100644 --- a/arch/x86/lib/msr-smp.c +++ b/arch/x86/lib/msr-smp.c @@ -31,22 +31,6 @@ static void __wrmsr_on_cpu(void *info) wrmsr(rv->msr_no, reg->l, reg->h); } -int rdmsr_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; - err = smp_call_function_single(cpu, __rdmsr_on_cpu, &rv, 1); - *l = rv.reg.l; - *h = rv.reg.h; - - return err; -} -EXPORT_SYMBOL(rdmsr_on_cpu); - int rdmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 *q) { int err; -- 2.54.0