Hi, I love your patch! Yet something to improve: [auto build test ERROR on hch-configfs/for-next] [also build test ERROR on linus/master hnaz-linux-mm/master v5.10-rc7] [cannot apply to next-20201207] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/ira-weiny-intel-com/Lift-memcpy_-to-from-_page-to-core/20201208-070017 base: git://git.infradead.org/users/hch/configfs.git for-next config: riscv-nommu_k210_defconfig (attached as .config) compiler: riscv64-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/5b7d78e2f4cba24149752129e0397d102c501433 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review ira-weiny-intel-com/Lift-memcpy_-to-from-_page-to-core/20201208-070017 git checkout 5b7d78e2f4cba24149752129e0397d102c501433 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All error/warnings (new ones prefixed by >>): In file included from drivers/char/mem.c:24: include/linux/highmem.h: In function 'clear_user_highpage': >> include/linux/highmem.h:229:15: error: implicit declaration of function 'kmap_local_page'; did you mean 'kmap_to_page'? [-Werror=implicit-function-declaration] 229 | void *addr = kmap_local_page(page); | ^~~~~~~~~~~~~~~ | kmap_to_page >> include/linux/highmem.h:229:15: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] >> include/linux/highmem.h:231:2: error: implicit declaration of function 'kunmap_local' [-Werror=implicit-function-declaration] 231 | kunmap_local(addr); | ^~~~~~~~~~~~ include/linux/highmem.h: In function 'clear_highpage': include/linux/highmem.h:282:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 282 | void *kaddr = kmap_local_page(page); | ^~~~~~~~~~~~~~~ include/linux/highmem.h: In function 'zero_user_segments': include/linux/highmem.h:291:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 291 | void *kaddr = kmap_local_page(page); | ^~~~~~~~~~~~~~~ include/linux/highmem.h: In function 'copy_user_highpage': >> include/linux/highmem.h:324:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 324 | vfrom = kmap_local_page(from); | ^ include/linux/highmem.h:325:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 325 | vto = kmap_local_page(to); | ^ include/linux/highmem.h: In function 'copy_highpage': include/linux/highmem.h:339:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 339 | vfrom = kmap_local_page(from); | ^ include/linux/highmem.h:340:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 340 | vto = kmap_local_page(to); | ^ cc1: some warnings being treated as errors -- In file included from include/linux/pagemap.h:11, from include/linux/blkdev.h:14, from include/linux/blk-cgroup.h:23, from include/linux/writeback.h:14, from include/trace/events/random.h:8, from drivers/char/random.c:348: include/linux/highmem.h: In function 'clear_user_highpage': >> include/linux/highmem.h:229:15: error: implicit declaration of function 'kmap_local_page'; did you mean 'kmap_to_page'? [-Werror=implicit-function-declaration] 229 | void *addr = kmap_local_page(page); | ^~~~~~~~~~~~~~~ | kmap_to_page >> include/linux/highmem.h:229:15: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] >> include/linux/highmem.h:231:2: error: implicit declaration of function 'kunmap_local' [-Werror=implicit-function-declaration] 231 | kunmap_local(addr); | ^~~~~~~~~~~~ include/linux/highmem.h: In function 'clear_highpage': include/linux/highmem.h:282:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 282 | void *kaddr = kmap_local_page(page); | ^~~~~~~~~~~~~~~ include/linux/highmem.h: In function 'zero_user_segments': include/linux/highmem.h:291:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 291 | void *kaddr = kmap_local_page(page); | ^~~~~~~~~~~~~~~ include/linux/highmem.h: In function 'copy_user_highpage': >> include/linux/highmem.h:324:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 324 | vfrom = kmap_local_page(from); | ^ include/linux/highmem.h:325:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 325 | vto = kmap_local_page(to); | ^ include/linux/highmem.h: In function 'copy_highpage': include/linux/highmem.h:339:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 339 | vfrom = kmap_local_page(from); | ^ include/linux/highmem.h:340:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 340 | vto = kmap_local_page(to); | ^ drivers/char/random.c: At top level: drivers/char/random.c:2296:6: warning: no previous prototype for 'add_hwgenerator_randomness' [-Wmissing-prototypes] 2296 | void add_hwgenerator_randomness(const char *buffer, size_t count, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +229 include/linux/highmem.h 223 224 225 /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */ 226 #ifndef clear_user_highpage 227 static inline void clear_user_highpage(struct page *page, unsigned long vaddr) 228 { > 229 void *addr = kmap_local_page(page); 230 clear_user_page(addr, vaddr, page); > 231 kunmap_local(addr); 232 } 233 #endif 234 235 #ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE 236 /** 237 * __alloc_zeroed_user_highpage - Allocate a zeroed HIGHMEM page for a VMA with caller-specified movable GFP flags 238 * @movableflags: The GFP flags related to the pages future ability to move like __GFP_MOVABLE 239 * @vma: The VMA the page is to be allocated for 240 * @vaddr: The virtual address the page will be inserted into 241 * 242 * This function will allocate a page for a VMA but the caller is expected 243 * to specify via movableflags whether the page will be movable in the 244 * future or not 245 * 246 * An architecture may override this function by defining 247 * __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE and providing their own 248 * implementation. 249 */ 250 static inline struct page * 251 __alloc_zeroed_user_highpage(gfp_t movableflags, 252 struct vm_area_struct *vma, 253 unsigned long vaddr) 254 { 255 struct page *page = alloc_page_vma(GFP_HIGHUSER | movableflags, 256 vma, vaddr); 257 258 if (page) 259 clear_user_highpage(page, vaddr); 260 261 return page; 262 } 263 #endif 264 265 /** 266 * alloc_zeroed_user_highpage_movable - Allocate a zeroed HIGHMEM page for a VMA that the caller knows can move 267 * @vma: The VMA the page is to be allocated for 268 * @vaddr: The virtual address the page will be inserted into 269 * 270 * This function will allocate a page for a VMA that the caller knows will 271 * be able to migrate in the future using move_pages() or reclaimed 272 */ 273 static inline struct page * 274 alloc_zeroed_user_highpage_movable(struct vm_area_struct *vma, 275 unsigned long vaddr) 276 { 277 return __alloc_zeroed_user_highpage(__GFP_MOVABLE, vma, vaddr); 278 } 279 280 static inline void clear_highpage(struct page *page) 281 { > 282 void *kaddr = kmap_local_page(page); 283 clear_page(kaddr); 284 kunmap_local(kaddr); 285 } 286 287 static inline void zero_user_segments(struct page *page, 288 unsigned start1, unsigned end1, 289 unsigned start2, unsigned end2) 290 { 291 void *kaddr = kmap_local_page(page); 292 293 BUG_ON(end1 > PAGE_SIZE || end2 > PAGE_SIZE); 294 295 if (end1 > start1) 296 memset(kaddr + start1, 0, end1 - start1); 297 298 if (end2 > start2) 299 memset(kaddr + start2, 0, end2 - start2); 300 301 kunmap_local(kaddr); 302 flush_dcache_page(page); 303 } 304 305 static inline void zero_user_segment(struct page *page, 306 unsigned start, unsigned end) 307 { 308 zero_user_segments(page, start, end, 0, 0); 309 } 310 311 static inline void zero_user(struct page *page, 312 unsigned start, unsigned size) 313 { 314 zero_user_segments(page, start, start + size, 0, 0); 315 } 316 317 #ifndef __HAVE_ARCH_COPY_USER_HIGHPAGE 318 319 static inline void copy_user_highpage(struct page *to, struct page *from, 320 unsigned long vaddr, struct vm_area_struct *vma) 321 { 322 char *vfrom, *vto; 323 > 324 vfrom = kmap_local_page(from); 325 vto = kmap_local_page(to); 326 copy_user_page(vto, vfrom, vaddr, to); 327 kunmap_local(vto); 328 kunmap_local(vfrom); 329 } 330 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip