From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rNHvp6VCgzDq9H for ; Mon, 6 Jun 2016 12:00:06 +1000 (AEST) Message-ID: <1465178406.12265.6.camel@ellerman.id.au> Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE From: Michael Ellerman To: Julian Margetson , Christian Zigotzky , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net, Michael Ellerman , Adrian Cox , rtd@a-eon.com, rtd2@xtra.co.nz, pjwall@mac.com, pjwall@me.com, matthew@a-eon.biz, intermediadc@hotmail.com, contact@a-eon.com, info@xenosoft.de Date: Mon, 06 Jun 2016 12:00:06 +1000 In-Reply-To: <5fb9d8e9-d456-0537-ef77-82658e4538cd@candw.ms> References: <8B4C4AB7-5C17-4992-935A-361153472793@xenosoft.de> <1463990507.3078.16.camel@kernel.crashing.org> <1464088614.3078.79.camel@kernel.crashing.org> <1298e1f6-beb7-5487-72a1-366ebd140c17@xenosoft.de> <87d1obqxg9.fsf@skywalker.in.ibm.com> <9690f9a4-70c7-8acc-42d0-779bcc93db52@xenosoft.de> <66397458-c40a-4e83-c5e5-0ba69fb48986@xenosoft.de> <871t4dui4g.fsf@skywalker.in.ibm.com> <2bf8f412-2631-75b4-70a3-cb5ecee5cf48@xenosoft.de> <2FB13B5B-42F0-4396-AD29-70924D2710CC@xenosoft.de> <053dd416-a9ab-5b06-5c3b-1acefb53fd3b@xenosoft.de> <1465174679.12265.4.camel@ellerman.id.au> <5fb9d8e9-d456-0537-ef77-82658e4538cd@candw.ms> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 }’ 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 }’ 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