kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Diana Craciun OSS <diana.craciun@oss.nxp.com>
To: Alex Williamson <alex.williamson@redhat.com>,
	kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, kvm@vger.kernel.org,
	Bharat Bhushan <Bharat.Bhushan@nxp.com>,
	Eric Auger <eric.auger@redhat.com>
Subject: Re: [vfio:next 19/27] drivers/vfio/fsl-mc/vfio_fsl_mc.c:189:36: error: 'FSL_MC_REGION_CACHEABLE' undeclared
Date: Tue, 13 Oct 2020 18:07:30 +0300	[thread overview]
Message-ID: <5d644323-9580-c39e-0a06-347ba91e97cf@oss.nxp.com> (raw)
In-Reply-To: <20201012162157.532edd5f@w520.home>

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
> 


      reply	other threads:[~2020-10-13 15:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d644323-9580-c39e-0a06-347ba91e97cf@oss.nxp.com \
    --to=diana.craciun@oss.nxp.com \
    --cc=Bharat.Bhushan@nxp.com \
    --cc=alex.williamson@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kvm@vger.kernel.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).