CONFIG_64BIT && CONFIG_MIPS_HUGE_TLB_SUPPORT build broken
Looks like this particular build configuration has problems:
CC arch/mips/kernel/cpu-probe.o
In file included from ./arch/mips/include/asm/io.h:27:0,
from include/linux/io.h:22,
from ./arch/mips/include/asm/mips-cm.h:14,
from ./arch/mips/include/asm/smp-ops.h:16,
from ./arch/mips/include/asm/smp.h:21,
from include/linux/smp.h:59,
from ./arch/mips/include/asm/cpu-type.h:12,
from ./arch/mips/include/asm/timex.h:19,
from include/linux/timex.h:65,
from include/linux/sched.h:19,
from include/linux/ptrace.h:5,
from arch/mips/kernel/cpu-probe.c:16:./arch/mips/include/asm/pgtable-bits.h:164:0: error: "_PAGE_GLOBAL_SHIFT" redefined [-Werror]
#define _PAGE_GLOBAL_SHIFT (_PAGE_MODIFIED_SHIFT + 1)
^./arch/mips/include/asm/pgtable-bits.h:141:0: note: this is the location of the previous definition
#define _PAGE_GLOBAL_SHIFT (_PAGE_SPLITTING_SHIFT + 1)
^
cc1: all warnings being treated as errorsscripts/Makefile.build:258: recipe for target 'arch/mips/kernel/cpu-probe.o' failed make[2]: *** [arch/mips/kernel/cpu-probe.o] Error 1 scripts/Makefile.build:403: recipe for target 'arch/mips/kernel' failed make[1]: *** [arch/mips/kernel] Error 2
Makefile:946: recipe for target 'arch/mips' failed
make: *** [arch/mips] Error 2
Caused by these two blocks:
#if defined(CONFIG_64BIT) && defined(CONFIG_MIPS_HUGE_TLB_SUPPORT) /* Huge TLB page */ #define _PAGE_HUGE_SHIFT (_PAGE_MODIFIED_SHIFT + 1) #define _PAGE_HUGE (1 << _PAGE_HUGE_SHIFT) #define _PAGE_SPLITTING_SHIFT (_PAGE_HUGE_SHIFT + 1) #define _PAGE_SPLITTING (1 << _PAGE_SPLITTING_SHIFT)
/* Only R2 or newer cores have the XI bit */
#ifdef CONFIG_CPU_MIPSR2
#define _PAGE_NO_EXEC_SHIFT (_PAGE_SPLITTING_SHIFT + 1)
#else
-> #define _PAGE_GLOBAL_SHIFT (_PAGE_SPLITTING_SHIFT + 1)
#define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT)
#endif /* CONFIG_CPU_MIPSR2 */
#endif /* CONFIG_64BIT && CONFIG_MIPS_HUGE_TLB_SUPPORT */
And ...
#ifdef CONFIG_CPU_MIPSR2 /* XI - page cannot be executed */ #ifndef _PAGE_NO_EXEC_SHIFT #define _PAGE_NO_EXEC_SHIFT (_PAGE_MODIFIED_SHIFT + 1) #endif #define _PAGE_NO_EXEC (cpu_has_rixi ? (1 << _PAGE_NO_EXEC_SHIFT) : 0) /* RI - page cannot be read */ #define _PAGE_READ_SHIFT (_PAGE_NO_EXEC_SHIFT + 1) #define _PAGE_READ (cpu_has_rixi ? 0 : (1 << _PAGE_READ_SHIFT)) #define _PAGE_NO_READ_SHIFT _PAGE_READ_SHIFT #define _PAGE_NO_READ (cpu_has_rixi ? (1 << _PAGE_READ_SHIFT) : 0) #define _PAGE_GLOBAL_SHIFT (_PAGE_NO_READ_SHIFT + 1) #define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT)
#else /* !CONFIG_CPU_MIPSR2 */
-> #define _PAGE_GLOBAL_SHIFT (_PAGE_MODIFIED_SHIFT + 1)
#define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT)
#endif /* CONFIG_CPU_MIPSR2 */
Since this is dealing with R2 stuff, not sure what the best fix is. Looks like this is the problem commit:
--J
Quoted 4 lines · Joshua Kinard
Since this is dealing with R2 stuff, not sure what the best fix is. Looks like this is the problem commit:
Try <http://patchwork.linux-mips.org/patch/9960/>.
Maciej