lkml.org 
[lkml]   [2022]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[mingo-tip:master 221/2335] drivers/xen/grant-table.c:411:22: error: implicit declaration of function 'xen_gfn_to_pfn'; did you mean 'xen_cr3_to_pfn'?
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git master
head: 85293bf3fca6d85608cff1447ce3097583f15fab
commit: dbfd8a446611c67366513c5798b018f9d1b6123b [221/2335] headers/prep: Rename API: gfn_to_pfn() => xen_gfn_to_pfn()
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220319/202203190905.87HwuS9w-lkp@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=dbfd8a446611c67366513c5798b018f9d1b6123b
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip master
git checkout dbfd8a446611c67366513c5798b018f9d1b6123b
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

In file included from arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:59,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:55,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/memblock.h:12,
from drivers/xen/grant-table.c:36:
drivers/xen/grant-table.c: In function 'gnttab_add_deferred':
>> drivers/xen/grant-table.c:411:22: error: implicit declaration of function 'xen_gfn_to_pfn'; did you mean 'xen_cr3_to_pfn'? [-Werror=implicit-function-declaration]
411 | page = pfn_to_page(xen_gfn_to_pfn(gfn));
| ^~~~~~~~~~~~~~
include/asm-generic/memory_model.h:25:40: note: in definition of macro '__pfn_to_page'
25 | #define __pfn_to_page(pfn) (vmemmap + (pfn))
| ^~~
drivers/xen/grant-table.c:411:10: note: in expansion of macro 'pfn_to_page'
411 | page = pfn_to_page(xen_gfn_to_pfn(gfn));
| ^~~~~~~~~~~
cc1: some warnings being treated as errors


vim +411 drivers/xen/grant-table.c

399
400 static void gnttab_add_deferred(grant_ref_t ref, bool readonly,
401 struct page *page)
402 {
403 struct deferred_entry *entry;
404 gfp_t gfp = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC : GFP_KERNEL;
405 const char *what = KERN_WARNING "leaking";
406
407 entry = kmalloc(sizeof(*entry), gfp);
408 if (!page) {
409 unsigned long gfn = gnttab_interface->read_frame(ref);
410
> 411 page = pfn_to_page(xen_gfn_to_pfn(gfn));
412 get_page(page);
413 }
414
415 if (entry) {
416 unsigned long flags;
417
418 entry->ref = ref;
419 entry->ro = readonly;
420 entry->page = page;
421 entry->warn_delay = 60;
422 spin_lock_irqsave(&gnttab_list_lock, flags);
423 list_add_tail(&entry->list, &deferred_list);
424 if (!timer_pending(&deferred_timer)) {
425 deferred_timer.expires = jiffies + HZ;
426 add_timer(&deferred_timer);
427 }
428 spin_unlock_irqrestore(&gnttab_list_lock, flags);
429 what = KERN_DEBUG "deferring";
430 }
431 printk("%s g.e. %#x (pfn %#lx)\n",
432 what, ref, page ? page_to_pfn(page) : -1);
433 }
434

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

\
 
 \ /
  Last update: 2022-03-19 02:58    [W:0.031 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site