LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Paul Mackerras <paulus@samba.org>,
	Markus Elfring <elfring@users.sourceforge.net>
Subject: [PATCH] powerpc/4xx/ocm: fix compiler error
Date: Sat, 22 Dec 2018 11:09:34 +0100	[thread overview]
Message-ID: <20181222100934.8051-1-chunkeey@gmail.com> (raw)

This patch fixes a recent regression in ocm:

ocm.c: In function ‘ocm_init_node’:
ocm.c:182:18: error: invalid operands to binary |
ocm.c:197:17: error: invalid operands to binary |

Fixes: 56f3c1413f5c ("powerpc/mm: properly set PAGE_KERNEL flags in ioremap()")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
---
 arch/powerpc/platforms/4xx/ocm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/4xx/ocm.c b/arch/powerpc/platforms/4xx/ocm.c
index 561b09de69bf..04ff69ddac09 100644
--- a/arch/powerpc/platforms/4xx/ocm.c
+++ b/arch/powerpc/platforms/4xx/ocm.c
@@ -179,7 +179,8 @@ static void __init ocm_init_node(int count, struct device_node *node)
 	/* ioremap the non-cached region */
 	if (ocm->nc.memtotal) {
 		ocm->nc.virt = __ioremap(ocm->nc.phys, ocm->nc.memtotal,
-					 _PAGE_EXEC | PAGE_KERNEL_NCG);
+			_PAGE_EXEC | _PAGE_BASE_NC |
+			_PAGE_KERNEL_RW | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
 		if (!ocm->nc.virt) {
 			printk(KERN_ERR
@@ -194,7 +195,8 @@ static void __init ocm_init_node(int count, struct device_node *node)
 
 	if (ocm->c.memtotal) {
 		ocm->c.virt = __ioremap(ocm->c.phys, ocm->c.memtotal,
-					_PAGE_EXEC | PAGE_KERNEL);
+					_PAGE_EXEC | _PAGE_BASE |
+					_PAGE_KERNEL_RW);
 
 		if (!ocm->c.virt) {
 			printk(KERN_ERR
-- 
2.20.1


             reply	other threads:[~2018-12-22 11:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-22 10:09 Christian Lamparter [this message]
2018-12-22 10:59 ` [PATCH] powerpc/4xx/ocm: fix compiler error christophe leroy
2018-12-22 11:27   ` Christian Lamparter
2018-12-22 13:08     ` christophe leroy
2018-12-22 14:32       ` Christian Lamparter
2018-12-22 17:16       ` Segher Boessenkool
2018-12-22 19:37         ` christophe leroy
2018-12-22 23:04           ` Segher Boessenkool
2018-12-23  8:29             ` Gabriel Paubert
2018-12-23  9:31               ` Segher Boessenkool
2018-12-23  9:58                 ` christophe leroy

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=20181222100934.8051-1-chunkeey@gmail.com \
    --to=chunkeey@gmail.com \
    --cc=elfring@users.sourceforge.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /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