Re: [PATCH 1/2] x86, msr: add rdmsr_safe_on_cpu_resched() and use it in msr_read()
From: Eric Dumazet
Date: Mon Mar 19 2018 - 01:05:37 EST
On Sun, Mar 18, 2018 at 10:14 AM kbuild test robot <lkp@xxxxxxxxx> wrote:
> Hi Eric,
> Thank you for the patch! Yet something to improve:
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.16-rc5 next-20180316]
> [if your patch is applied to the wrong git tree, please drop us a note to
help improve the system]
> url:
https://github.com/0day-ci/linux/commits/Eric-Dumazet/x86-msr-add-rdmsr_safe_on_cpu_resched-and-use-it-in-msr_read/20180319-001007
> config: i386-randconfig-s1-201811 (attached as .config)
> compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386
> All errors (new ones prefixed by >>):
> arch/x86/kernel/msr.c: In function 'msr_read':
> >> arch/x86/kernel/msr.c:63:9: error: implicit declaration of function
'rdmsr_safe_on_cpu_resched' [-Werror=implicit-function-declaration]
> err = rdmsr_safe_on_cpu_resched(cpu, reg, &data[0], &data[1]);
> ^~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
I guess I will have to add in V2 this missing part :
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
index
117a286660c61cf9c10e68f0b48d27e2de17deab..15e220243a4d5e9da524fb7733e23e2766b6eb12
100644
--- a/arch/x86/include/asm/msr.h
+++ b/arch/x86/include/asm/msr.h
@@ -363,6 +363,11 @@ static inline int rdmsr_safe_on_cpu(unsigned int cpu,
u32 msr_no,
{
return rdmsr_safe(msr_no, l, h);
}
+static inline int rdmsr_safe_on_cpu_resched(unsigned int cpu, u32 msr_no,
+ u32 *l, u32 *h)
+{
+ return rdmsr_safe(msr_no, l, h);
+}
static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l,
u32 h)
{
return wrmsr_safe(msr_no, l, h);