* [PATCH v2] powerpc/4xx/ocm: fix compilation error
@ 2018-12-22 14:35 Christian Lamparter
2018-12-22 15:46 ` christophe leroy
2019-01-02 11:31 ` [v2] " Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Christian Lamparter @ 2018-12-22 14:35 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Paul Mackerras, Markus Elfring
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: 56f3c1413f5c ("powerpc/mm: properly set PAGE_KERNEL flags in ioremap()")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
---
arch/powerpc/platforms/4xx/ocm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/4xx/ocm.c b/arch/powerpc/platforms/4xx/ocm.c
index 561b09de69bf..de3565353153 100644
--- a/arch/powerpc/platforms/4xx/ocm.c
+++ b/arch/powerpc/platforms/4xx/ocm.c
@@ -179,7 +179,7 @@ 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 | pgprot_val(PAGE_KERNEL_NCG));
if (!ocm->nc.virt) {
printk(KERN_ERR
@@ -194,7 +194,7 @@ 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 | pgprot_val(PAGE_KERNEL));
if (!ocm->c.virt) {
printk(KERN_ERR
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] powerpc/4xx/ocm: fix compilation error
2018-12-22 14:35 [PATCH v2] powerpc/4xx/ocm: fix compilation error Christian Lamparter
@ 2018-12-22 15:46 ` christophe leroy
2019-01-02 11:31 ` [v2] " Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: christophe leroy @ 2018-12-22 15:46 UTC (permalink / raw)
To: Christian Lamparter, Michael Ellerman
Cc: Paul Mackerras, linuxppc-dev, Markus Elfring, stable
Le 22/12/2018 à 15:35, Christian Lamparter a écrit :
> 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: 56f3c1413f5c ("powerpc/mm: properly set PAGE_KERNEL flags in ioremap()")
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: stable@vger.kernel.org
> ---
> arch/powerpc/platforms/4xx/ocm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/4xx/ocm.c b/arch/powerpc/platforms/4xx/ocm.c
> index 561b09de69bf..de3565353153 100644
> --- a/arch/powerpc/platforms/4xx/ocm.c
> +++ b/arch/powerpc/platforms/4xx/ocm.c
> @@ -179,7 +179,7 @@ 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 | pgprot_val(PAGE_KERNEL_NCG));
>
> if (!ocm->nc.virt) {
> printk(KERN_ERR
> @@ -194,7 +194,7 @@ 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 | pgprot_val(PAGE_KERNEL));
>
> if (!ocm->c.virt) {
> printk(KERN_ERR
>
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [v2] powerpc/4xx/ocm: fix compilation error
2018-12-22 14:35 [PATCH v2] powerpc/4xx/ocm: fix compilation error Christian Lamparter
2018-12-22 15:46 ` christophe leroy
@ 2019-01-02 11:31 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2019-01-02 11:31 UTC (permalink / raw)
To: Christian Lamparter, linuxppc-dev; +Cc: Paul Mackerras, Markus Elfring
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 912 bytes --]
On Sat, 2018-12-22 at 14:35:38 UTC, Christian Lamparter wrote:
> 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: 56f3c1413f5c ("powerpc/mm: properly set PAGE_KERNEL flags in ioremap()")
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/d0757237d7b18b1ce74293be7c077d
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-02 11:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-22 14:35 [PATCH v2] powerpc/4xx/ocm: fix compilation error Christian Lamparter
2018-12-22 15:46 ` christophe leroy
2019-01-02 11:31 ` [v2] " Michael Ellerman
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).