linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Julian Margetson <runaway@candw.ms>,
	Christian Zigotzky <chzigotzky@xenosoft.de>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	 Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linuxppc-dev@lists.ozlabs.org, darren@stevens-zone.net,
	Michael Ellerman <michaele@au1.ibm.com>,
	Adrian Cox <adrian@humboldt.co.uk>,
	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
Subject: Re: Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE
Date: Mon, 06 Jun 2016 12:00:06 +1000	[thread overview]
Message-ID: <1465178406.12265.6.camel@ellerman.id.au> (raw)
In-Reply-To: <5fb9d8e9-d456-0537-ef77-82658e4538cd@candw.ms>

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

  reply	other threads:[~2016-06-06  2:00 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23  4:38 PAGE_GUARDED Christian Zigotzky
2016-05-23  8:01 ` PAGE_GUARDED Benjamin Herrenschmidt
2016-05-24 10:48   ` PAGE_GUARDED Christian Zigotzky
2016-05-24 11:16     ` PAGE_GUARDED Benjamin Herrenschmidt
2016-05-24 13:37       ` PAGE_GUARDED Christian Zigotzky
2016-05-24 15:37         ` PAGE_GUARDED Aneesh Kumar K.V
2016-05-25  6:58           ` PAGE_GUARDED Christian Zigotzky
2016-05-25 11:44             ` PAGE_GUARDED Christian Zigotzky
2016-06-04  7:19           ` Kernel 4.7: PAGE_GUARDED and _PAGE_NO_CACHE Christian Zigotzky
2016-06-04  7:40             ` Christian Zigotzky
2016-06-04 11:08               ` Christian Zigotzky
2016-06-04 14:46                 ` Aneesh Kumar K.V
2016-06-04 15:13                   ` Christian Zigotzky
2016-06-04 15:25                     ` Christian Zigotzky
2016-06-05 16:09                       ` Christian Zigotzky
2016-06-06  0:57                         ` Michael Ellerman
2016-06-06  1:23                           ` Julian Margetson
2016-06-06  2:00                             ` Michael Ellerman [this message]
2016-06-06  8:59                               ` Julian Margetson
2016-06-06  0:54                   ` Michael Ellerman
2016-06-04 14:42               ` Aneesh Kumar K.V
2016-06-04 15:07                 ` Christian Zigotzky
2016-06-06  0:51                   ` Michael Ellerman
2016-06-06  5:21                     ` Christian Zigotzky
2016-06-07 20:17                     ` Christian Zigotzky
2016-06-07 22:14                       ` Christian Zigotzky
2016-06-08  1:51                         ` Michael Ellerman
2016-06-08  2:52                       ` Michael Ellerman
2016-06-08 10:58                         ` Christian Zigotzky
2016-06-08 11:30                           ` Michael Ellerman
2016-06-08 12:50                             ` Christian Zigotzky
2016-06-08 11:33                       ` Darren Stevens
2016-06-08 13:24                         ` Christian Zigotzky
2016-06-08 13:51                         ` Christian Zigotzky
2016-06-08 13:52                         ` Michael Ellerman
2016-06-08 15:11                         ` Aneesh Kumar K.V
2016-06-08 15:47                           ` Christian Zigotzky
2016-06-09  8:48                             ` Christian Zigotzky
2016-06-09 11:15                               ` Michael Ellerman
2016-06-09 13:13                                 ` Christian Zigotzky
2016-06-13  8:14                                   ` Christian Zigotzky
2016-06-13  8:19                                     ` Benjamin Herrenschmidt
2016-06-13 18:09                                       ` Christian Zigotzky
2016-06-22 19:07                                         ` Christian Zigotzky
2016-06-22 19:58                                           ` luigi burdo

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=1465178406.12265.6.camel@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=adrian@humboldt.co.uk \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=chzigotzky@xenosoft.de \
    --cc=contact@a-eon.com \
    --cc=darren@stevens-zone.net \
    --cc=info@xenosoft.de \
    --cc=intermediadc@hotmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=matthew@a-eon.biz \
    --cc=michaele@au1.ibm.com \
    --cc=pjwall@mac.com \
    --cc=pjwall@me.com \
    --cc=rtd2@xtra.co.nz \
    --cc=rtd@a-eon.com \
    --cc=runaway@candw.ms \
    /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).