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 EB8DA277035 for ; Mon, 20 Apr 2026 09:16:52 +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=1776676614; cv=none; b=UmTyONxeiyQoLmIt3/bkZG4SGvz7V4wCdVzMcJfdyEF8uhQ8Vy5uF93Vv2erXovazxzSWeuVGK3pYyK9hGuN+7ylEpYssYgfGa03rFXaJ3nnVuHE94vt2bKxdos03msYowCJQ7nR2P6zwzaVvUKEzB4p4bIZEctZtOU0JheSu/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776676614; c=relaxed/simple; bh=/Ga1v17sifGMNU5boXZBxIIqhQz4A909zgaNi64+tfI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B726oTxUz1mbCknIz6PsqIikFM33cv2gKW4G34nkg1ZR09gVRh3BQJxbdzCgem3eam/aQ5B0/B/+At0o7g+vVdNJiildjaG7QbiZhjYqmq2tzxqdIW/qb2xYFhuoFZFWF4UR1y9jBdfn+XmC8qoMuAPYJlrBkuju2MU1+XMvixc= 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=RVjmxo98; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=RVjmxo98; 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="RVjmxo98"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="RVjmxo98" 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 CC6D75BCE0; Mon, 20 Apr 2026 09:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1776676609; 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=+FvkLGB/iuFMNt34pOJZj4GKwn5sfg6EuBDMkD8z8V0=; b=RVjmxo988SbmIgRGIYxoLn4+jwzZYOPXwhiaHKiX7wXZkk4yZAWbJmOL/wIjidpoY5ZSEB 3HGIXx25BXHbeO+YcZUJIPhEJpxJZWxLOZcoYdSGtJdrJrg+7Y7P0HDvNFIlF2sgj9o/4T P5GQpvL+YyuWfUbsIgByF69PtvJBjN0= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1776676609; 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=+FvkLGB/iuFMNt34pOJZj4GKwn5sfg6EuBDMkD8z8V0=; b=RVjmxo988SbmIgRGIYxoLn4+jwzZYOPXwhiaHKiX7wXZkk4yZAWbJmOL/wIjidpoY5ZSEB 3HGIXx25BXHbeO+YcZUJIPhEJpxJZWxLOZcoYdSGtJdrJrg+7Y7P0HDvNFIlF2sgj9o/4T P5GQpvL+YyuWfUbsIgByF69PtvJBjN0= 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 9A313593AE; Mon, 20 Apr 2026 09:16:49 +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 zyh0JAHv5WnAPQAAD6G6ig (envelope-from ); Mon, 20 Apr 2026 09:16:49 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Subject: [PATCH RFC 1/6] x86/msr: Rename msr_read() and msr_write() Date: Mon, 20 Apr 2026 11:16:29 +0200 Message-ID: <20260420091634.128787-2-jgross@suse.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260420091634.128787-1-jgross@suse.com> References: <20260420091634.128787-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-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]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCPT_COUNT_SEVEN(0.00)[8]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; URIBL_BLOCKED(0.00)[suse.com:mid,suse.com:email,imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.com:mid,suse.com:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Score: -2.80 X-Spam-Level: Rename the existing msr_read() and msr_write() functions to msr_do_read() and msr_do_write(), as the original names will be used for new MSR access functions in the future. Signed-off-by: Juergen Gross --- arch/x86/kernel/msr.c | 12 ++++++------ arch/x86/lib/msr.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index 4469c784eaa0..43791746103c 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c @@ -49,8 +49,8 @@ enum allow_write_msrs { static enum allow_write_msrs allow_writes = MSR_WRITES_DEFAULT; -static ssize_t msr_read(struct file *file, char __user *buf, - size_t count, loff_t *ppos) +static ssize_t msr_do_read(struct file *file, char __user *buf, + size_t count, loff_t *ppos) { u32 __user *tmp = (u32 __user *) buf; u32 data[2]; @@ -105,8 +105,8 @@ static int filter_write(u32 reg) return 0; } -static ssize_t msr_write(struct file *file, const char __user *buf, - size_t count, loff_t *ppos) +static ssize_t msr_do_write(struct file *file, const char __user *buf, + size_t count, loff_t *ppos) { const u32 __user *tmp = (const u32 __user *)buf; u32 data[2]; @@ -227,8 +227,8 @@ static int msr_open(struct inode *inode, struct file *file) static const struct file_operations msr_fops = { .owner = THIS_MODULE, .llseek = no_seek_end_llseek, - .read = msr_read, - .write = msr_write, + .read = msr_do_read, + .write = msr_do_write, .open = msr_open, .unlocked_ioctl = msr_ioctl, .compat_ioctl = msr_ioctl, diff --git a/arch/x86/lib/msr.c b/arch/x86/lib/msr.c index dfdd1da89f36..be6c34666743 100644 --- a/arch/x86/lib/msr.c +++ b/arch/x86/lib/msr.c @@ -28,7 +28,7 @@ void msrs_free(struct msr __percpu *msrs) EXPORT_SYMBOL(msrs_free); /** - * msr_read - Read an MSR with error handling + * msr_do_read - Read an MSR with error handling * @msr: MSR to read * @m: value to read into * @@ -37,7 +37,7 @@ EXPORT_SYMBOL(msrs_free); * * Return: %0 for success, otherwise an error code */ -static int msr_read(u32 msr, struct msr *m) +static int msr_do_read(u32 msr, struct msr *m) { int err; u64 val; @@ -50,14 +50,14 @@ static int msr_read(u32 msr, struct msr *m) } /** - * msr_write - Write an MSR with error handling + * msr_do_write - Write an MSR with error handling * * @msr: MSR to write * @m: value to write * * Return: %0 for success, otherwise an error code */ -static int msr_write(u32 msr, struct msr *m) +static int msr_do_write(u32 msr, struct msr *m) { return wrmsrq_safe(msr, m->q); } @@ -70,7 +70,7 @@ static inline int __flip_bit(u32 msr, u8 bit, bool set) if (bit > 63) return err; - err = msr_read(msr, &m); + err = msr_do_read(msr, &m); if (err) return err; @@ -83,7 +83,7 @@ static inline int __flip_bit(u32 msr, u8 bit, bool set) if (m1.q == m.q) return 0; - err = msr_write(msr, &m1); + err = msr_do_write(msr, &m1); if (err) return err; -- 2.53.0