[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 12/13] treewide: convert rdmsrq() from a macro to an inline function
- To: Juergen Gross <jgross@xxxxxxxx>
- From: Yazen Ghannam <yazen.ghannam@xxxxxxx>
- Date: Thu, 15 Oct 2026 16:25:45 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dIhrhRYhWiXVbuVvBbLaM2UZKoe9JP+wgs2TfqwRFiY=; b=tgzvhnelzUlGmOGlmH04oVmlXL5zzsmqZCwdIC1Z+0wWatB+ykAyg4gAUlN4NwPY5xOIFXuWAS/ltQa3fZ4eTS3RVNAE7m+qb7dM5Siq/COU5UmjCC6RObR7SyB8ojQtzISbtVxQYK/Obnhl9yGaZzq4KLhiDxTo2M+o0V2sheGBT+BHgJXYSrKoCHjgf5tI80J4VwB7EM/OXjyHMkfT8JxKAHy24KQ0NYs2DWdvrZpAovkriaJSiBGNkSuxmCmGUpZimhEIWkK/i0BmC+Tq9SNdW++yohaQVxNtxmGG759IZJseoPcbByjiKNgpQ/D4gfJGMDREGbeLn39DiTw6xg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T3FT+01/u6bliMTPcErBre6bF0mkEGYGd5FVi+ib6JpmtaPDnfyVfCj0UMu7cKjoOfptDUaXHj1HadDZE+RAGoOHmWnG0X6NASRO8UsWACGF242M46ak6tlAvjNs5cjXkXdo7jGTXQ53MSFUPKEWaan0WK54k2N4tE+t0B3M42eh9TCx1Xurz2jhP8SA6m41ha0KxbNPEnELuyv7+KCjtwP1zjk9BAqIPKhbtHao/QhHSHsLPkkA6zvZ4baNv8WYtcu2WwH9kzWvQP/taTSgXGUhFAMyVKBOSZopC/oQGaBh3TKeW8YZNJrEl2Q2yDe7fck+dP7snthc3TU05I0ukg==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=fail header.s=selector1 header.d=amd.com header.i="@amd.com"
- Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: linux-kernel@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxx, linux-edac@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-coco@xxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, linux-ide@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-crypto@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx, linux-hwmon@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, linux-fbdev@xxxxxxxxxxxxxxx, Thomas Gleixner <tglx@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>, Namhyung Kim <namhyung@xxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>, Ian Rogers <irogers@xxxxxxxxxx>, Adrian Hunter <adrian.hunter@xxxxxxxxx>, James Clark <james.clark@xxxxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, Dexuan Cui <decui@xxxxxxxxxxxxx>, Long Li <longli@xxxxxxxxxxxxx>, Sean Christopherson <seanjc@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Ajay Kaher <ajay.kaher@xxxxxxxxxxxx>, Alexey Makhalov <alexey.makhalov@xxxxxxxxxxxx>, Broadcom internal kernel review list <bcm-kernel-feedback-list@xxxxxxxxxxxx>, Josh Poimboeuf <jpoimboe@xxxxxxxxxx>, Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx>, Pu Wen <puwen@xxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Reinette Chatre <reinette.chatre@xxxxxxxxx>, Dave Martin <Dave.Martin@xxxxxxx>, James Morse <james.morse@xxxxxxx>, Babu Moger <babu.moger@xxxxxxx>, Tony W Wang-oc <TonyWWang-oc@xxxxxxxxxxx>, Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, Pavel Machek <pavel@xxxxxxxxxx>, Kiryl Shutsemau <kas@xxxxxxxxxx>, Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Len Brown <lenb@xxxxxxxxxx>, Damien Le Moal <dlemoal@xxxxxxxxxx>, Niklas Cassel <cassel@xxxxxxxxxx>, David Airlie <airlied@xxxxxxxxxx>, Olivia Mackall <olivia@xxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Viresh Kumar <viresh.kumar@xxxxxxxxxx>, Huang Rui <ray.huang@xxxxxxx>, Mario Limonciello <mario.limonciello@xxxxxxx>, Perry Yuan <perry.yuan@xxxxxxx>, K Prateek Nayak <kprateek.nayak@xxxxxxx>, Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>, Linus Walleij <linusw@xxxxxxxxxx>, Bartosz Golaszewski <brgl@xxxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>, Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>, Artem Bityutskiy <dedekind1@xxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Miquel Raynal <miquel.raynal@xxxxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, Vignesh Raghavendra <vigneshr@xxxxxx>, Ashok Raj <ashok.raj.linux@xxxxxxxxx>, Hans de Goede <hansg@xxxxxxxxxx>, Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>, Rajneesh Bhardwaj <irenic.rajneesh@xxxxxxxxx>, Xi Pardee <xi.pardee@xxxxxxxxxxxxxxx>, Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>, Zhang Rui <rui.zhang@xxxxxxxxx>, Lukasz Luba <lukasz.luba@xxxxxxx>, Helge Deller <deller@xxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-geode@xxxxxxxxxxxxxxxxxxx, Michael Kelley <mhklinux@xxxxxxxxxxx>, Zhongqiu Han <zhongqiu.han@xxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 15 Oct 2026 20:26:21 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Oct 08, 2026 at 09:18:38AM +0200, Juergen Gross wrote:
> Today rdmsrq() is a macro using its second parameter as the target for
> storing the read MSR value.
>
> Convert rdmsrq() to an inline function returning the MSR value.
>
> The users have been converted using the following semantic patch:
>
> // Options: --include-headers
>
> virtual patch
> virtual report
>
> @@
> expression msr, val;
> @@
> (
> - rdmsrq(msr,val)
> + val = rdmsrq(msr)
> )
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> Acked-by: Damien Le Moal <dlemoal@xxxxxxxxxx> # ATA
> Reviewed-by: Michael Kelley <mhklinux@xxxxxxxxxxx> # Hyper-V
> Acked-by: Rafael J. Wysocki (Intel) <rafael@xxxxxxxxxx> # ACPI, cpufreq,
> powercap, thermal
> Acked-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> Acked-by: Reinette Chatre <reinette.chatre@xxxxxxxxx> # resctrl
> Reviewed-by: Zhongqiu Han <zhongqiu.han@xxxxxxxxxxxxxxxx> # cpufreq
> Acked-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> # pdx86
> ---
Reviewed-by: Yazen Ghannam <yazen.ghannam@xxxxxxx> # mce, amd64_edac
Thanks,
Yazen
|