<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    Hi guys,<br>
    <br>
    adding the usual suspects direct. Does anybody of hand know how to
    check if an architecture supports ioremap_cache()?<br>
    <br>
    For now we only need this on X86, but I would feel better if we
    don't use an #ifdef here.<br>
    <br>
    Regards,<br>
    Christian.<br>
    <br>
    <div class="moz-cite-prefix">Am 02.03.21 um 05:12 schrieb kernel
      test robot:<br>
    </div>
    <blockquote type="cite"
      cite="mid:202103021104.NudsKKei-lkp@intel.com">
      <pre class="moz-quote-pre" wrap="">Hi Oak,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip linus/master v5.12-rc1 next-20210302]
[cannot apply to tegra-drm/drm/tegra/for-next drm-exynos/exynos-drm-next drm/drm-next]
[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
<a class="moz-txt-link-freetext" href="https://git-scm.com/docs/git-format-patch">https://git-scm.com/docs/git-format-patch</a>]

url:    <a class="moz-txt-link-freetext" href="https://github.com/0day-ci/linux/commits/Oak-Zeng/drm-ttm-ioremap-buffer-according-to-TTM-mem-caching-setting/20210302-064500">https://github.com/0day-ci/linux/commits/Oak-Zeng/drm-ttm-ioremap-buffer-according-to-TTM-mem-caching-setting/20210302-064500</a>
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: parisc-randconfig-r012-20210302 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget <a class="moz-txt-link-freetext" href="https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross">https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross</a> -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # <a class="moz-txt-link-freetext" href="https://github.com/0day-ci/linux/commit/225bb3711439ec559dd72ae5af8e62d34ea60a64">https://github.com/0day-ci/linux/commit/225bb3711439ec559dd72ae5af8e62d34ea60a64</a>
        git remote add linux-review <a class="moz-txt-link-freetext" href="https://github.com/0day-ci/linux">https://github.com/0day-ci/linux</a>
        git fetch --no-tags linux-review Oak-Zeng/drm-ttm-ioremap-buffer-according-to-TTM-mem-caching-setting/20210302-064500
        git checkout 225bb3711439ec559dd72ae5af8e62d34ea60a64
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <a class="moz-txt-link-rfc2396E" href="mailto:lkp@intel.com"><lkp@intel.com></a>

All errors (new ones prefixed by >>):

   drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_resource_ioremap':
</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">drivers/gpu/drm/ttm/ttm_bo_util.c:95:11: error: implicit declaration of function 'ioremap_cache'; did you mean 'ioremap_uc'? [-Werror=implicit-function-declaration]
</pre>
        </blockquote>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">      95 |    addr = ioremap_cache(mem->bus.offset, bus_size);
         |           ^~~~~~~~~~~~~
         |           ioremap_uc
   drivers/gpu/drm/ttm/ttm_bo_util.c:95:9: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      95 |    addr = ioremap_cache(mem->bus.offset, bus_size);
         |         ^
   drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_ioremap':
   drivers/gpu/drm/ttm/ttm_bo_util.c:379:17: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     379 |    map->virtual = ioremap_cache(bo->mem.bus.offset + offset,
         |                 ^
   drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_vmap':
   drivers/gpu/drm/ttm/ttm_bo_util.c:500:16: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     500 |    vaddr_iomem = ioremap_cache(mem->bus.offset,
         |                ^
   cc1: some warnings being treated as errors


vim +95 drivers/gpu/drm/ttm/ttm_bo_util.c

    74  
    75  static int ttm_resource_ioremap(struct ttm_bo_device *bdev,
    76                                 struct ttm_resource *mem,
    77                                 void **virtual)
    78  {
    79          int ret;
    80          void *addr;
    81  
    82          *virtual = NULL;
    83          ret = ttm_mem_io_reserve(bdev, mem);
    84          if (ret || !mem->bus.is_iomem)
    85                  return ret;
    86  
    87          if (mem->bus.addr) {
    88                  addr = mem->bus.addr;
    89          } else {
    90                  size_t bus_size = (size_t)mem->num_pages << PAGE_SHIFT;
    91  
    92                  if (mem->bus.caching == ttm_write_combined)
    93                          addr = ioremap_wc(mem->bus.offset, bus_size);
    94                  else if (mem->bus.caching == ttm_cached)
  > 95                               addr = ioremap_cache(mem->bus.offset, bus_size);
    96                  else
    97                          addr = ioremap(mem->bus.offset, bus_size);
    98                  if (!addr) {
    99                          ttm_mem_io_free(bdev, mem);
   100                          return -ENOMEM;
   101                  }
   102          }
   103          *virtual = addr;
   104          return 0;
   105  }
   106  

---
0-DAY CI Kernel Test Service, Intel Corporation
<a class="moz-txt-link-freetext" href="https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org">https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org</a>
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
amd-gfx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>