* Re: [vfio:next 19/27] drivers/vfio/fsl-mc/vfio_fsl_mc.c:189:36: error: 'FSL_MC_REGION_CACHEABLE' undeclared
[not found] <202010130507.H3A1OKjq-lkp@intel.com>
@ 2020-10-12 22:21 ` Alex Williamson
2020-10-13 15:07 ` Diana Craciun OSS
0 siblings, 1 reply; 2+ messages in thread
From: Alex Williamson @ 2020-10-12 22:21 UTC (permalink / raw)
To: kernel test robot
Cc: Diana Craciun, kbuild-all, kvm, Bharat Bhushan, Eric Auger
While I'm a little surprise to see an i386 build pulling in
vfio_fsl_mc, I see that CONFIG_FSL_MC_BUS does enable compile testing
on various other archs. I assume therefore that this is just the lack
of the necessary fsl-bus series to enable the vfio_fsl_mc driver.
Both should be present in the next linux-next tree and I'm aware to
send my pull request after GregKH's to get the ordering of these
correct in mainline. Please let me know if there are any other
concerns from anyone. Thanks,
Alex
On Tue, 13 Oct 2020 05:59:09 +0800
kernel test robot <lkp@intel.com> wrote:
> tree: https://github.com/awilliam/linux-vfio.git next
> head: 2099363255f123f6c9abcfa8531bbec65a8f1820
> commit: 67247289688d49a610a956c23c4ff032f0281845 [19/27] vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions
> config: i386-allyesconfig (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> reproduce (this is a W=1 build):
> # https://github.com/awilliam/linux-vfio/commit/67247289688d49a610a956c23c4ff032f0281845
> git remote add vfio https://github.com/awilliam/linux-vfio.git
> git fetch --no-tags vfio next
> git checkout 67247289688d49a610a956c23c4ff032f0281845
> # save the attached .config to linux build tree
> make W=1 ARCH=i386
>
> 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 >>):
>
> drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_mmap_mmio':
> >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:189:36: error: 'FSL_MC_REGION_CACHEABLE' undeclared (first use in this function)
> 189 | region_cacheable = (region.type & FSL_MC_REGION_CACHEABLE) &&
> | ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:189:36: note: each undeclared identifier is reported only once for each function it appears in
> >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:190:22: error: 'FSL_MC_REGION_SHAREABLE' undeclared (first use in this function)
> 190 | (region.type & FSL_MC_REGION_SHAREABLE);
> | ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_bus_notifier':
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:256:9: error: 'struct fsl_mc_device' has no member named 'driver_override'
> 256 | mc_dev->driver_override = kasprintf(GFP_KERNEL, "%s",
> | ^~
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:258:14: error: 'struct fsl_mc_device' has no member named 'driver_override'
> 258 | if (!mc_dev->driver_override)
> | ^~
> drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_init_device':
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:295:8: error: implicit declaration of function 'dprc_setup' [-Werror=implicit-function-declaration]
> 295 | ret = dprc_setup(mc_dev);
> | ^~~~~~~~~~
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:301:8: error: implicit declaration of function 'dprc_scan_container' [-Werror=implicit-function-declaration]
> 301 | ret = dprc_scan_container(mc_dev, false);
> | ^~~~~~~~~~~~~~~~~~~
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:310:2: error: implicit declaration of function 'dprc_remove_devices' [-Werror=implicit-function-declaration]
> 310 | dprc_remove_devices(mc_dev, NULL, 0);
> | ^~~~~~~~~~~~~~~~~~~
> drivers/vfio/fsl-mc/vfio_fsl_mc.c:311:2: error: implicit declaration of function 'dprc_cleanup' [-Werror=implicit-function-declaration]
> 311 | dprc_cleanup(mc_dev);
> | ^~~~~~~~~~~~
> cc1: some warnings being treated as errors
>
> vim +/FSL_MC_REGION_CACHEABLE +189 drivers/vfio/fsl-mc/vfio_fsl_mc.c
>
> 174
> 175 static int vfio_fsl_mc_mmap_mmio(struct vfio_fsl_mc_region region,
> 176 struct vm_area_struct *vma)
> 177 {
> 178 u64 size = vma->vm_end - vma->vm_start;
> 179 u64 pgoff, base;
> 180 u8 region_cacheable;
> 181
> 182 pgoff = vma->vm_pgoff &
> 183 ((1U << (VFIO_FSL_MC_OFFSET_SHIFT - PAGE_SHIFT)) - 1);
> 184 base = pgoff << PAGE_SHIFT;
> 185
> 186 if (region.size < PAGE_SIZE || base + size > region.size)
> 187 return -EINVAL;
> 188
> > 189 region_cacheable = (region.type & FSL_MC_REGION_CACHEABLE) &&
> > 190 (region.type & FSL_MC_REGION_SHAREABLE);
> 191 if (!region_cacheable)
> 192 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> 193
> 194 vma->vm_pgoff = (region.addr >> PAGE_SHIFT) + pgoff;
> 195
> 196 return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
> 197 size, vma->vm_page_prot);
> 198 }
> 199
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [vfio:next 19/27] drivers/vfio/fsl-mc/vfio_fsl_mc.c:189:36: error: 'FSL_MC_REGION_CACHEABLE' undeclared
2020-10-12 22:21 ` [vfio:next 19/27] drivers/vfio/fsl-mc/vfio_fsl_mc.c:189:36: error: 'FSL_MC_REGION_CACHEABLE' undeclared Alex Williamson
@ 2020-10-13 15:07 ` Diana Craciun OSS
0 siblings, 0 replies; 2+ messages in thread
From: Diana Craciun OSS @ 2020-10-13 15:07 UTC (permalink / raw)
To: Alex Williamson, kernel test robot
Cc: kbuild-all, kvm, Bharat Bhushan, Eric Auger
I was surprised as well that vfio_fsl_mc is compiled on X86, but it
seems that at the time when the FSL_MC_BUS was upstreamed it was a
request to have it compilable on multiple platforms (just not to brake
builds).
The errors bellow are caused by the missing FSL_MC_BUS patches, however
I have tried myself to compile the i386 build and I did encounter an
issue with 32 bit platforms. I have sent a fix for it.
Diana
On 10/13/2020 1:21 AM, Alex Williamson wrote:
>
> While I'm a little surprise to see an i386 build pulling in
> vfio_fsl_mc, I see that CONFIG_FSL_MC_BUS does enable compile testing
> on various other archs. I assume therefore that this is just the lack
> of the necessary fsl-bus series to enable the vfio_fsl_mc driver.
> Both should be present in the next linux-next tree and I'm aware to
> send my pull request after GregKH's to get the ordering of these
> correct in mainline. Please let me know if there are any other
> concerns from anyone. Thanks,
>
> Alex
>
>
> On Tue, 13 Oct 2020 05:59:09 +0800
> kernel test robot <lkp@intel.com> wrote:
>
>> tree: https://github.com/awilliam/linux-vfio.git next
>> head: 2099363255f123f6c9abcfa8531bbec65a8f1820
>> commit: 67247289688d49a610a956c23c4ff032f0281845 [19/27] vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions
>> config: i386-allyesconfig (attached as .config)
>> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
>> reproduce (this is a W=1 build):
>> # https://github.com/awilliam/linux-vfio/commit/67247289688d49a610a956c23c4ff032f0281845
>> git remote add vfio https://github.com/awilliam/linux-vfio.git
>> git fetch --no-tags vfio next
>> git checkout 67247289688d49a610a956c23c4ff032f0281845
>> # save the attached .config to linux build tree
>> make W=1 ARCH=i386
>>
>> 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 >>):
>>
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_mmap_mmio':
>>>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:189:36: error: 'FSL_MC_REGION_CACHEABLE' undeclared (first use in this function)
>> 189 | region_cacheable = (region.type & FSL_MC_REGION_CACHEABLE) &&
>> | ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:189:36: note: each undeclared identifier is reported only once for each function it appears in
>>>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:190:22: error: 'FSL_MC_REGION_SHAREABLE' undeclared (first use in this function)
>> 190 | (region.type & FSL_MC_REGION_SHAREABLE);
>> | ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_bus_notifier':
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:256:9: error: 'struct fsl_mc_device' has no member named 'driver_override'
>> 256 | mc_dev->driver_override = kasprintf(GFP_KERNEL, "%s",
>> | ^~
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:258:14: error: 'struct fsl_mc_device' has no member named 'driver_override'
>> 258 | if (!mc_dev->driver_override)
>> | ^~
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_init_device':
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:295:8: error: implicit declaration of function 'dprc_setup' [-Werror=implicit-function-declaration]
>> 295 | ret = dprc_setup(mc_dev);
>> | ^~~~~~~~~~
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:301:8: error: implicit declaration of function 'dprc_scan_container' [-Werror=implicit-function-declaration]
>> 301 | ret = dprc_scan_container(mc_dev, false);
>> | ^~~~~~~~~~~~~~~~~~~
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:310:2: error: implicit declaration of function 'dprc_remove_devices' [-Werror=implicit-function-declaration]
>> 310 | dprc_remove_devices(mc_dev, NULL, 0);
>> | ^~~~~~~~~~~~~~~~~~~
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:311:2: error: implicit declaration of function 'dprc_cleanup' [-Werror=implicit-function-declaration]
>> 311 | dprc_cleanup(mc_dev);
>> | ^~~~~~~~~~~~
>> cc1: some warnings being treated as errors
>>
>> vim +/FSL_MC_REGION_CACHEABLE +189 drivers/vfio/fsl-mc/vfio_fsl_mc.c
>>
>> 174
>> 175 static int vfio_fsl_mc_mmap_mmio(struct vfio_fsl_mc_region region,
>> 176 struct vm_area_struct *vma)
>> 177 {
>> 178 u64 size = vma->vm_end - vma->vm_start;
>> 179 u64 pgoff, base;
>> 180 u8 region_cacheable;
>> 181
>> 182 pgoff = vma->vm_pgoff &
>> 183 ((1U << (VFIO_FSL_MC_OFFSET_SHIFT - PAGE_SHIFT)) - 1);
>> 184 base = pgoff << PAGE_SHIFT;
>> 185
>> 186 if (region.size < PAGE_SIZE || base + size > region.size)
>> 187 return -EINVAL;
>> 188
>> > 189 region_cacheable = (region.type & FSL_MC_REGION_CACHEABLE) &&
>> > 190 (region.type & FSL_MC_REGION_SHAREABLE);
>> 191 if (!region_cacheable)
>> 192 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
>> 193
>> 194 vma->vm_pgoff = (region.addr >> PAGE_SHIFT) + pgoff;
>> 195
>> 196 return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
>> 197 size, vma->vm_page_prot);
>> 198 }
>> 199
>>
>> ---
>> 0-DAY CI Kernel Test Service, Intel Corporation
>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-13 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202010130507.H3A1OKjq-lkp@intel.com>
2020-10-12 22:21 ` [vfio:next 19/27] drivers/vfio/fsl-mc/vfio_fsl_mc.c:189:36: error: 'FSL_MC_REGION_CACHEABLE' undeclared Alex Williamson
2020-10-13 15:07 ` Diana Craciun OSS
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox