On 6/5/2016 10:00 PM, Michael Ellerman wrote:
On Sun, 2016-06-05 at 21:23 -0400, Julian Margetson wrote:
drivers/gpu/drm/drm_vm.c: In function ‘drm_dma_prot’:
drivers/gpu/drm/drm_vm.c:83:6: error: invalid operands to binary |
(have ‘pgprot_t {aka struct <anonymous>}’ and ‘int’)
     tmp |= _PAGE_NO_CACHE;
         ^

That is because that usage is wrong based on type. _PAGE_NO_CACHE is not
of type pgprot_t. What you really need there is

tmp = __pgprot(pgprot_val(tmp) | _PAGE_NO_CACHE);

or a better option would be

tmp = pgprot_noncached_wc(tmp);

-aneesh
tmp = pgprot_noncached_wc(tmp);

compiles but  I then run in to the following

   CC      drivers/gpu/drm/drm_scatter.o
drivers/gpu/drm/drm_scatter.c: In function ‘drm_vmalloc_dma’:
drivers/gpu/drm/drm_scatter.c:44:49: error: invalid operands to binary |
(have ‘pgprot_t {aka struct <anonymous>}’ and ‘int’)
    return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL | _PAGE_NO_CACHE);
                                                   ^
drivers/gpu/drm/drm_scatter.c:48:1: warning: control reaches end of
non-void function [-Wreturn-type]
   }
   ^
Aneesh showed you how to fix that in his reply above.

     return __vmalloc(size, GFP_KERNEL, pgprot_noncached_wc(PAGE_KERNEL));

cheers



Thanks .

With the two adjustment

tmp = pgprot_noncached_wc(tmp);

and

return __vmalloc(size, GFP_KERNEL, pgprot_noncached_wc(PAGE_KERNEL));

The rc2 builds and boots  on Sam460ex

Regards

Julian


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to