Skip to contentSkip to conversation

c6x: asm: pgtable: Define dummy pgprot_writecombine for !MMU

PATCH New Chen Gang S 1 participant 1 message Mar 2, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 c6x: asm: pgtable: Define dummy pgprot_writecombine for !MMU

-------- Forwarded Message --------
Subject: [PATCH] c6x: asm: pgtable: Define dummy pgprot_writecombine for !MMU
Date: Tue, 03 Mar 2015 07:06:25 +0800
From: Chen Gang <[email protected]>
To: [email protected], [email protected]
CC: [email protected], Andrew Morton <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>

When !MMU, asm-generic will not define default pgprot_writecombine, so c6x needs to define it by itself. The related error:

CC [M] fs/pstore/ram_core.o
fs/pstore/ram_core.c: In function 'persistent_ram_vmap':
fs/pstore/ram_core.c:399:10: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration]

     prot = pgprot_writecombine(PAGE_KERNEL);
            ^
  fs/pstore/ram_core.c:399:8: error: incompatible types when assigning to type 'pgprot_t {aka struct <anonymous>}' from type 'int'
     prot = pgprot_writecombine(PAGE_KERNEL);
          ^
---
 arch/c6x/include/asm/pgtable.h | 5 +++++
 1 file changed, 5 insertions(+)
arch/c6x/include/asm/pgtable.h +5 -0
index 78d4483..ec4db6d 100644
@@ -67,6 +67,11 @@ extern unsigned long empty_zero_page;
  */
 #define pgtable_cache_init()   do { } while (0)
 
+/*
+ * c6x is !MMU, so define the simpliest implementation
+ */
+#define pgprot_writecombine pgprot_noncached
+
 #include <asm-generic/pgtable.h>
 
 #endif /* _ASM_C6X_PGTABLE_H */
Signature · 1 line
1.9.3