[intel-gvt-linux:topic/gvt-xengt 5/41] arch/x86//xen/mmu.c:88:8: error: 'remap_area_pfn_pte_fn' undeclared
kbuild test robot
lkp at intel.com
Wed Nov 21 16:51:44 UTC 2018
tree: https://github.com/intel/gvt-linux topic/gvt-xengt
head: 20e9d919737ba70122c6760c7c2d635247b77e85
commit: 71dd9631910711527d0946713b28eaad2c99acf2 [5/41] arch/x86/xen: add infrastruction in xen to support gvt
config: x86_64-rhel-7.2-clear (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 71dd9631910711527d0946713b28eaad2c99acf2
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
arch/x86//xen/mmu.c: In function 'xen_remap_domain_mfn_range_in_kernel':
>> arch/x86//xen/mmu.c:61:20: error: storage size of 'rmd' isn't known
struct remap_data rmd;
^~~
arch/x86//xen/mmu.c:62:31: error: 'REMAP_BATCH_SIZE' undeclared (first use in this function); did you mean 'VMACACHE_SIZE'?
struct mmu_update mmu_update[REMAP_BATCH_SIZE];
^~~~~~~~~~~~~~~~
VMACACHE_SIZE
arch/x86//xen/mmu.c:62:31: note: each undeclared identifier is reported only once for each function it appears in
In file included from arch/x86/include/asm/xen/page.h:5:0,
from arch/x86//xen/mmu.c:4:
include/linux/kernel.h:869:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__safe_cmp(x, y), \
^
include/linux/kernel.h:878:19: note: in expansion of macro '__careful_cmp'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~
arch/x86//xen/mmu.c:83:11: note: in expansion of macro 'min'
batch = min(REMAP_BATCH_SIZE, nr);
^~~
>> arch/x86//xen/mmu.c:88:8: error: 'remap_area_pfn_pte_fn' undeclared (first use in this function)
remap_area_pfn_pte_fn, &rmd);
^~~~~~~~~~~~~~~~~~~~~
>> arch/x86//xen/mmu.c:96:2: error: implicit declaration of function 'xen_flush_tlb_all'; did you mean '__flush_tlb_global'? [-Werror=implicit-function-declaration]
xen_flush_tlb_all();
^~~~~~~~~~~~~~~~~
__flush_tlb_global
arch/x86//xen/mmu.c:62:20: warning: unused variable 'mmu_update' [-Wunused-variable]
struct mmu_update mmu_update[REMAP_BATCH_SIZE];
^~~~~~~~~~
arch/x86//xen/mmu.c:61:20: warning: unused variable 'rmd' [-Wunused-variable]
struct remap_data rmd;
^~~
arch/x86//xen/mmu.c: In function 'xen_unmap_domain_mfn_range_in_kernel':
arch/x86//xen/mmu.c:108:20: error: storage size of 'rmd' isn't known
struct remap_data rmd;
^~~
arch/x86//xen/mmu.c:126:8: error: 'remap_area_pfn_pte_fn' undeclared (first use in this function)
remap_area_pfn_pte_fn, &rmd);
^~~~~~~~~~~~~~~~~~~~~
arch/x86//xen/mmu.c:108:20: warning: unused variable 'rmd' [-Wunused-variable]
struct remap_data rmd;
^~~
cc1: some warnings being treated as errors
vim +/remap_area_pfn_pte_fn +88 arch/x86//xen/mmu.c
55
56 /* Note: here 'mfn' is actually gfn!!! */
57 struct vm_struct * xen_remap_domain_mfn_range_in_kernel(unsigned long mfn,
58 int nr, unsigned domid)
59 {
60 struct vm_struct *area;
> 61 struct remap_data rmd;
62 struct mmu_update mmu_update[REMAP_BATCH_SIZE];
63 int batch;
64 unsigned long range, addr;
65 pgprot_t prot;
66 int err;
67
68 WARN_ON(in_interrupt() || irqs_disabled());
69
70 area = alloc_vm_area(nr << PAGE_SHIFT, NULL);
71 if (!area)
72 return NULL;
73
74 addr = (unsigned long)area->addr;
75
76 prot = __pgprot(pgprot_val(PAGE_KERNEL));
77 rmd.pfn = &mfn;
78 rmd.prot = prot;
79 rmd.contiguous = true;
80 rmd.no_translate = false;
81
82 while (nr) {
> 83 batch = min(REMAP_BATCH_SIZE, nr);
84 range = (unsigned long)batch << PAGE_SHIFT;
85
86 rmd.mmu_update = mmu_update;
87 err = apply_to_page_range(&init_mm, addr, range,
> 88 remap_area_pfn_pte_fn, &rmd);
89 if (err || HYPERVISOR_mmu_update(mmu_update, batch, NULL, domid) < 0)
90 goto err;
91
92 nr -= batch;
93 addr += range;
94 }
95
> 96 xen_flush_tlb_all();
97 return area;
98 err:
99 free_vm_area(area);
100 xen_flush_tlb_all();
101 return NULL;
102 }
103 EXPORT_SYMBOL_GPL(xen_remap_domain_mfn_range_in_kernel);
104
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 41471 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20181122/ffc63f11/attachment-0001.gz>
More information about the intel-gvt-dev
mailing list