Skip to content

Commit d075723

Browse files
chunkeeympe
authored andcommitted
powerpc/4xx/ocm: Fix compilation error due to PAGE_KERNEL usage
This patch fixes a recent compilation regression in ocm: ocm.c: In function ‘ocm_init_node’: ocm.c:182:18: error: invalid operands to binary | (have ‘int’ and ‘pgprot_t’ {aka ‘struct <anonymous>’}) _PAGE_EXEC | PAGE_KERNEL_NCG); ^ ocm.c:197:17: error: invalid operands to binary | (have ‘int’ and ‘pgprot_t’ {aka ‘struct <anonymous>’}) _PAGE_EXEC | PAGE_KERNEL); ^ Fixes: 56f3c14 ("powerpc/mm: properly set PAGE_KERNEL flags in ioremap()") Cc: stable@vger.kernel.org # v4.20 Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 039daac commit d075723

File tree

1 file changed

+2
-2
lines changed
  • arch/powerpc/platforms/4xx

1 file changed

+2
-2
lines changed

arch/powerpc/platforms/4xx/ocm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static void __init ocm_init_node(int count, struct device_node *node)
179179
/* ioremap the non-cached region */
180180
if (ocm->nc.memtotal) {
181181
ocm->nc.virt = __ioremap(ocm->nc.phys, ocm->nc.memtotal,
182-
_PAGE_EXEC | PAGE_KERNEL_NCG);
182+
_PAGE_EXEC | pgprot_val(PAGE_KERNEL_NCG));
183183

184184
if (!ocm->nc.virt) {
185185
printk(KERN_ERR
@@ -194,7 +194,7 @@ static void __init ocm_init_node(int count, struct device_node *node)
194194

195195
if (ocm->c.memtotal) {
196196
ocm->c.virt = __ioremap(ocm->c.phys, ocm->c.memtotal,
197-
_PAGE_EXEC | PAGE_KERNEL);
197+
_PAGE_EXEC | pgprot_val(PAGE_KERNEL));
198198

199199
if (!ocm->c.virt) {
200200
printk(KERN_ERR

0 commit comments

Comments
 (0)