From: Greg Kroah-Hartman Date: Wed, 19 May 2021 14:26:28 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.4.269~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96ba770a93c563a26fcf89fb2053f35298230ecf;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: x86-msr-fix-wr-rdmsr_safe_regs_on_cpu-prototypes.patch --- diff --git a/queue-5.4/x86-msr-fix-wr-rdmsr_safe_regs_on_cpu-prototypes.patch b/queue-5.4/x86-msr-fix-wr-rdmsr_safe_regs_on_cpu-prototypes.patch new file mode 100644 index 00000000000..8fbd60dfa18 --- /dev/null +++ b/queue-5.4/x86-msr-fix-wr-rdmsr_safe_regs_on_cpu-prototypes.patch @@ -0,0 +1,51 @@ +From 396a66aa1172ef2b78c21651f59b40b87b2e5e1e Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Mon, 22 Mar 2021 17:45:36 +0100 +Subject: x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Arnd Bergmann + +commit 396a66aa1172ef2b78c21651f59b40b87b2e5e1e upstream. + +gcc-11 warns about mismatched prototypes here: + + arch/x86/lib/msr-smp.c:255:51: error: argument 2 of type ‘u32 *’ {aka ‘unsigned int *’} declared as a pointer [-Werror=array-parameter=] + 255 | int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs) + | ~~~~~^~~~ + arch/x86/include/asm/msr.h:347:50: note: previously declared as an array ‘u32[8]’ {aka ‘unsigned int[8]’} + +GCC is right here - fix up the types. + +[ mingo: Twiddled the changelog. ] + +Signed-off-by: Arnd Bergmann +Signed-off-by: Ingo Molnar +Link: https://lore.kernel.org/r/20210322164541.912261-1-arnd@kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/lib/msr-smp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/x86/lib/msr-smp.c ++++ b/arch/x86/lib/msr-smp.c +@@ -253,7 +253,7 @@ static void __wrmsr_safe_regs_on_cpu(voi + rv->err = wrmsr_safe_regs(rv->regs); + } + +-int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs) ++int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]) + { + int err; + struct msr_regs_info rv; +@@ -266,7 +266,7 @@ int rdmsr_safe_regs_on_cpu(unsigned int + } + EXPORT_SYMBOL(rdmsr_safe_regs_on_cpu); + +-int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs) ++int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]) + { + int err; + struct msr_regs_info rv;