Skip to contentSkip to conversation

parisc: fix compilation errrors

PATCH In review Qian Cai 4 participants 5 messages Aug 15, 2019 – Aug 22, 2019 PA-RISC architecture

lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH 1/1 parisc: fix compilation errrors

The commit 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used") converted a few functions from macros to static inline, which causes parisc to complain,

In file included from ./include/asm-generic/4level-fixup.h:38:0,

                 from ./arch/parisc/include/asm/pgtable.h:5,
                 from ./arch/parisc/include/asm/io.h:6,
                 from ./include/linux/io.h:13,
                 from sound/core/memory.c:9:
./include/asm-generic/5level-fixup.h:14:18: error: unknown type name
'pgd_t'; did you mean 'pid_t'?
 #define p4d_t    pgd_t
                  ^
./include/asm-generic/5level-fixup.h:24:28: note: in expansion of macro
'p4d_t'
 static inline int p4d_none(p4d_t p4d)
                            ^~~~~

It is because "4level-fixup.h" is included before "asm/page.h" where "pgd_t" is defined.

Fixes 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used")
---
 arch/parisc/include/asm/pgtable.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/parisc/include/asm/pgtable.h +1 -2
index a39b079e73f2..6d58c1739b42 100644
@@ -2,6 +2,7 @@
 #ifndef _PARISC_PGTABLE_H
 #define _PARISC_PGTABLE_H
 
+#include <asm/page.h>
 #include <asm-generic/4level-fixup.h>
 
 #include <asm/fixmap.h>
@@ -98,8 +99,6 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
 
 #endif /* !__ASSEMBLY__ */
 
-#include <asm/page.h>
-
 #define pte_ERROR(e) \
 	printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
 #define pmd_ERROR(e) \
Signature · 1 line
2.20.1 (Apple Git-117)
Tested-by on v1 1/1
#1 lore raw
Quoted 18 lines · Qian Cai

The commit 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used") converted a few functions from macros to static inline, which causes parisc to complain,

In file included from ./include/asm-generic/4level-fixup.h:38:0,

                 from ./arch/parisc/include/asm/pgtable.h:5,
                 from ./arch/parisc/include/asm/io.h:6,
                 from ./include/linux/io.h:13,
                 from sound/core/memory.c:9:
./include/asm-generic/5level-fixup.h:14:18: error: unknown type name
'pgd_t'; did you mean 'pid_t'?
 #define p4d_t    pgd_t
                  ^
./include/asm-generic/5level-fixup.h:24:28: note: in expansion of macro
'p4d_t'
 static inline int p4d_none(p4d_t p4d)
                            ^~~~~
Quoted 6 lines

It is because "4level-fixup.h" is included before "asm/page.h" where "pgd_t" is defined.

Fixes 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used")
maintainer Acked-by
#2 lore raw
Quoted 19 lines · Guenter Roeck
Quoted 18 lines · Qian Cai

The commit 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used") converted a few functions from macros to static inline, which causes parisc to complain,

In file included from ./include/asm-generic/4level-fixup.h:38:0,

                  from ./arch/parisc/include/asm/pgtable.h:5,
                  from ./arch/parisc/include/asm/io.h:6,
                  from ./include/linux/io.h:13,
                  from sound/core/memory.c:9:
./include/asm-generic/5level-fixup.h:14:18: error: unknown type name
'pgd_t'; did you mean 'pid_t'?
  #define p4d_t    pgd_t
                   ^
./include/asm-generic/5level-fixup.h:24:28: note: in expansion of macro
'p4d_t'
  static inline int p4d_none(p4d_t p4d)
                             ^~~~~
Quoted 8 lines
Quoted 6 lines

It is because "4level-fixup.h" is included before "asm/page.h" where "pgd_t" is defined.

Fixes 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used")

Helge

#3 lore raw
Quoted 27 lines · Helge Deller
Quoted 26 lines · Guenter Roeck
Quoted 24 lines · Qian Cai

The commit 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used") converted a few functions from macros to static inline, which causes parisc to complain,

In file included from ./include/asm-generic/4level-fixup.h:38:0, from ./arch/parisc/include/asm/pgtable.h:5, from ./arch/parisc/include/asm/io.h:6, from ./include/linux/io.h:13,
                  from sound/core/memory.c:9:
./include/asm-generic/5level-fixup.h:14:18: error: unknown type name 'pgd_t'; did you mean 'pid_t'?
  #define p4d_t    pgd_t
                   ^ ./include/asm-generic/5level-fixup.h:24:28: note: in expansion of macro 'p4d_t'
  static inline int p4d_none(p4d_t p4d)
                             ^~~~~

It is because "4level-fixup.h" is included before "asm/page.h" where "pgd_t" is defined.

Fixes 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used")
Quoted 6 lines
Quoted 1 line

Helge

Any chance to push this patch into mainline anytime soon ? It has been applied to -next, but all parisc builds in mainline are still broken.

Thanks,
Guenter

#4 lore raw
Quoted 6 lines · On Thu, 22 Aug 2019 16:04:38 -0700 Guenter Roeck <[email protected]> wrote:
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Fixes 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used")
Quoted 7 lines
Quoted 4 lines

Helge

Any chance to push this patch into mainline anytime soon ? It has been applied to -next, but all parisc builds in mainline are still broken.

I'll be including it in tomorrow's patchpile->Linus.