[tip:x86/hyperv 1/5] arch/x86/hyperv/hv_apic.c:68:10: error: implicit declaration of function 'native_apic_mem_read'
From: kbuild test robot
Date: Sat May 19 2018 - 09:20:37 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/hyperv
head: 9a2d78e291a7dea0ae4b4a06ce6bbbe4f1ab7c13
commit: 6b48cb5f8347bc0153ff1d7b075db92e6723ffdb [1/5] X86/Hyper-V: Enlighten APIC access
config: x86_64-randconfig-s1-05192043 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout 6b48cb5f8347bc0153ff1d7b075db92e6723ffdb
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
arch/x86/hyperv/hv_apic.c: In function 'hv_apic_read':
>> arch/x86/hyperv/hv_apic.c:68:10: error: implicit declaration of function 'native_apic_mem_read' [-Werror=implicit-function-declaration]
return native_apic_mem_read(reg);
^~~~~~~~~~~~~~~~~~~~
arch/x86/hyperv/hv_apic.c: In function 'hv_apic_write':
>> arch/x86/hyperv/hv_apic.c:82:3: error: implicit declaration of function 'native_apic_mem_write' [-Werror=implicit-function-declaration]
native_apic_mem_write(reg, val);
^~~~~~~~~~~~~~~~~~~~~
arch/x86/hyperv/hv_apic.c: In function 'hv_apic_init':
>> arch/x86/hyperv/hv_apic.c:95:3: error: implicit declaration of function 'apic_set_eoi_write' [-Werror=implicit-function-declaration]
apic_set_eoi_write(hv_apic_eoi_write);
^~~~~~~~~~~~~~~~~~
arch/x86/hyperv/hv_apic.c:96:3: error: 'apic' undeclared (first use in this function)
apic->read = hv_apic_read;
^~~~
arch/x86/hyperv/hv_apic.c:96:3: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
vim +/native_apic_mem_read +68 arch/x86/hyperv/hv_apic.c
54
55 static u32 hv_apic_read(u32 reg)
56 {
57 u32 reg_val, hi;
58
59 switch (reg) {
60 case APIC_EOI:
61 rdmsr(HV_X64_MSR_EOI, reg_val, hi);
62 return reg_val;
63 case APIC_TASKPRI:
64 rdmsr(HV_X64_MSR_TPR, reg_val, hi);
65 return reg_val;
66
67 default:
> 68 return native_apic_mem_read(reg);
69 }
70 }
71
72 static void hv_apic_write(u32 reg, u32 val)
73 {
74 switch (reg) {
75 case APIC_EOI:
76 wrmsr(HV_X64_MSR_EOI, val, 0);
77 break;
78 case APIC_TASKPRI:
79 wrmsr(HV_X64_MSR_TPR, val, 0);
80 break;
81 default:
> 82 native_apic_mem_write(reg, val);
83 }
84 }
85
86 static void hv_apic_eoi_write(u32 reg, u32 val)
87 {
88 wrmsr(HV_X64_MSR_EOI, val, 0);
89 }
90
91 void __init hv_apic_init(void)
92 {
93 if (ms_hyperv.hints & HV_X64_APIC_ACCESS_RECOMMENDED) {
94 pr_info("Hyper-V: Using MSR based APIC access\n");
> 95 apic_set_eoi_write(hv_apic_eoi_write);
96 apic->read = hv_apic_read;
97 apic->write = hv_apic_write;
98 apic->icr_write = hv_apic_icr_write;
99 apic->icr_read = hv_apic_icr_read;
100 }
101 }
102
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip