* CONFIG_64BIT && CONFIG_MIPS_HUGE_TLB_SUPPORT build broken
@ 2015-06-01 5:17 Joshua Kinard
2015-06-02 15:37 ` Maciej W. Rozycki
0 siblings, 1 reply; 2+ messages in thread
From: Joshua Kinard @ 2015-06-01 5:17 UTC (permalink / raw)
To: Linux MIPS List
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 errors
scripts/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:
http://git.linux-mips.org/cgit/ralf/linux.git/commit/arch/mips/include/asm/pgtable-bits.h?id=be0c37c985eddc46d0d67543898c086f60460e2e
--J
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-02 15:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-01 5:17 CONFIG_64BIT && CONFIG_MIPS_HUGE_TLB_SUPPORT build broken Joshua Kinard
2015-06-02 15:37 ` Maciej W. Rozycki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.