* [rppt:execmem/v4+x86-rox 21/22] mm/execmem.c:192:2: error: call to undeclared function 'flush_tlb_kernel_range'; ISO C99 and later do not support implicit function declarations
@ 2024-04-10 3:55 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-10 3:55 UTC (permalink / raw)
To: Mike Rapoport (IBM); +Cc: llvm, oe-kbuild-all, Mike Rapoport
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git execmem/v4+x86-rox
head: a14551111ff8bbf3c520771e89892d599463da71
commit: 85e04aa7ae67c997077a12fc9e6ed04fbc2d6975 [21/22] execmem: add support for cache of large ROX pages
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240410/202404101125.Ne2NU3YV-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 8b3b4a92adee40483c27f26c478a384cd69c6f05)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240410/202404101125.Ne2NU3YV-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404101125.Ne2NU3YV-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from mm/execmem.c:3:
In file included from include/linux/mm.h:2208:
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from mm/execmem.c:11:
In file included from mm/internal.h:12:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from mm/execmem.c:11:
In file included from mm/internal.h:12:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from mm/execmem.c:11:
In file included from mm/internal.h:12:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
>> mm/execmem.c:192:2: error: call to undeclared function 'flush_tlb_kernel_range'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
192 | flush_tlb_kernel_range(start, end);
| ^
7 warnings and 1 error generated.
vim +/flush_tlb_kernel_range +192 mm/execmem.c
166
167 static int execmem_cache_populate(struct execmem_range *range, size_t size)
168 {
169 unsigned long vm_flags = VM_FLUSH_RESET_PERMS | VM_ALLOW_HUGE_VMAP;
170 unsigned long start, end;
171 struct vm_struct *vm;
172 size_t alloc_size;
173 int err = -ENOMEM;
174 void *p;
175
176 alloc_size = round_up(size, PMD_SIZE);
177 p = execmem_vmalloc(range, alloc_size, PAGE_KERNEL, vm_flags);
178 if (!p)
179 return err;
180
181 vm = find_vm_area(p);
182 if (!vm)
183 goto err_free_mem;
184
185 /* fill memory with invalid instructions */
186 execmem_invalidate(p, alloc_size, /* writable = */ true);
187
188 start = (unsigned long)p;
189 end = start + alloc_size;
190
191 vunmap_range_noflush(start, end);
> 192 flush_tlb_kernel_range(start, end);
193
194 /* FIXME: handle direct map alias */
195
196 err = vmap_pages_range_noflush(start, end, range->pgprot, vm->pages,
197 PMD_SHIFT);
198 if (err)
199 goto err_free_mem;
200
201 err = execmem_cache_add(p, alloc_size);
202 if (err)
203 goto err_free_mem;
204
205 return 0;
206
207 err_free_mem:
208 vfree(p);
209 return err;
210 }
211
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-10 3:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10 3:55 [rppt:execmem/v4+x86-rox 21/22] mm/execmem.c:192:2: error: call to undeclared function 'flush_tlb_kernel_range'; ISO C99 and later do not support implicit function declarations kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.