Revert commits preventing platforms from booting.
cover Revert commits preventing platforms from booting.
These revert two patches that prevent all MTI and bcm63xx platforms from booting. The kernel boot quietly hangs and gives not indication of what happened.
Steven J. Hill (2):
Revert "MIPS: Move definition of SMP processor id register to header
file"
Revert "MIPS: mm: Use scratch for PGD when
!CONFIG_MIPS_PGD_C0_CONTEXT"
arch/mips/include/asm/mmu_context.h | 22 ++++-- arch/mips/include/asm/stackframe.h | 24 +++++-- arch/mips/include/asm/thread_info.h | 30 +-------- arch/mips/mm/tlbex.c | 135 ++++++++++++++++++++--------------- 4 files changed, 111 insertions(+), 100 deletions(-)
Signature · 1 line
1.7.2.5
PATCH 2/2 Revert "MIPS: mm: Use scratch for PGD when !CONFIG_MIPS_PGD_C0_CONTEXT"
This reverts commit 89460ce8912200429c8ed141a01eabd226683614.
This prevents all MTI platforms and bcm63xx from booting.
--- arch/mips/include/asm/mmu_context.h | 7 +- arch/mips/mm/tlbex.c | 142 +++++++++++++---------------------- 2 files changed, 57 insertions(+), 92 deletions(-)
arch/mips/include/asm/mmu_context.h +5 -2
@@ -24,6 +24,8 @@#endif /* SMTC */ #include <asm-generic/mm_hooks.h> +#ifdef CONFIG_MIPS_PGD_C0_CONTEXT +#define TLBMISS_HANDLER_SETUP_PGD (pgd) \ do { \ void (*tlbmiss_handler_setup_pgd)(unsigned long); \
@@ -34,8 +36,6 @@ do { \tlbmiss_handler_setup_pgd ((unsigned long )(pgd)); \ } while (0) - -#ifdef CONFIG_MIPS_PGD_C0_CONTEXT #define TLBMISS_HANDLER_SETUP () \ do { \ TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir); \
@@ -51,6 +51,9 @@ do { \*/ extern unsigned long pgd_current[]; +#define TLBMISS_HANDLER_SETUP_PGD (pgd) \ + pgd_current[smp_processor_id()] = (unsigned long)(pgd) +#ifdef CONFIG_32BIT #define TLBMISS_HANDLER_SETUP () \ write_c0_context((unsigned long) smp_processor_id() << 25); \
arch/mips/mm/tlbex.c +52 -90
221 lines not on this page · raw message
Signature · 1 line
1.7.2.5
PATCH 1/2 Revert "MIPS: Move definition of SMP processor id register to header file"
In reply to Steven J. HillThis reverts commit 59ff6f198e4944348547cfad905b414c05573f9a.
This prevents all MTI platforms and bcm63xx from booting.
--- arch/mips/include/asm/mmu_context.h | 17 ++++++-- arch/mips/include/asm/stackframe.h | 24 ++++++++--- arch/mips/include/asm/thread_info.h | 30 +------------- arch/mips/mm/tlbex.c | 75 ++++++++++++++++++++++++++++++----- 4 files changed, 96 insertions(+), 50 deletions(-)
arch/mips/include/asm/mmu_context.h +12 -5
@@ -34,15 +34,15 @@ do { \tlbmiss_handler_setup_pgd ((unsigned long )(pgd)); \ } while (0) +#ifdef CONFIG_MIPS_PGD_C0_CONTEXT #define TLBMISS_HANDLER_SETUP () \ do { \ TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir); \ - write_c0_xcontext((unsigned long) smp_processor_id() << \ - SMP_CPUID_REGSHIFT); \ + write_c0_xcontext((unsigned long) smp_processor_id() << 51); \ } while (0) -#else /* !CONFIG_MIPS_PGD_C0_CONTEXT: using pgd_current*/ +#else /* CONFIG_MIPS_PGD_C0_CONTEXT: using pgd_current*/ /* * For the fast tlb miss handlers, we keep a per cpu array of pointers
@@ -51,11 +51,18 @@ do { \*/ extern unsigned long pgd_current[]; +#ifdef CONFIG_32BIT +#define TLBMISS_HANDLER_SETUP () \ + write_c0_context((unsigned long) smp_processor_id() << 25); \ + back_to_back_c0_hazard(); \ + TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) +#endif +#ifdef CONFIG_64BIT #define TLBMISS_HANDLER_SETUP () \ - write_c0_context((unsigned long) smp_processor_id() << \ - SMP_CPUID_REGSHIFT); \ + write_c0_context((unsigned long) smp_processor_id() << 26); \ back_to_back_c0_hazard(); \ TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) +#endif #endif /* CONFIG_MIPS_PGD_C0_CONTEXT*/ #if defined(CONFIG_CPU_R3000 ) || defined(CONFIG_CPU_TX39XX )
arch/mips/include/asm/stackframe.h +18 -6
@@ -17,7 +17,6 @@#include <asm/asmmacro.h> #include <asm/mipsregs.h> #include <asm/asm-offsets.h> -#include <asm/thread_info.h> /* * For SMTC kernel, global IE should be left set, and interrupts
@@ -86,8 +85,21 @@ .endm#ifdef CONFIG_SMP +#ifdef CONFIG_MIPS_MT_SMTC +#define PTEBASE_SHIFT 19/* TCBIND */ +#define CPU_ID_REG CP0_TCBIND +#define CPU_ID_MFC0 mfc0 +#elif defined(CONFIG_MIPS_PGD_C0_CONTEXT ) +#define PTEBASE_SHIFT 48/* XCONTEXT */ +#define CPU_ID_REG CP0_XCONTEXT +#define CPU_ID_MFC0 MFC0 +#else +#define PTEBASE_SHIFT 23/* CONTEXT */ +#define CPU_ID_REG CP0_CONTEXT +#define CPU_ID_MFC0 MFC0 +#endif .macro get_saved_sp /* SMP variation */ - ASM_CPUID_MFC0 k0, $SMP_CPUID_REG + CPU_ID_MFC0 k0, CPU_ID_REG#if defined(CONFIG_32BIT ) || defined(KBUILD_64BIT_SYM32 ) lui k1, %hi(kernelsp) #else
@@ -97,17 +109,17 @@ daddiu k1, %hi(kernelsp) dsll k1, 16 #endif - LONG_SRL k0, SMP_CPUID_PTRSHIFT + LONG_SRL k0, PTEBASE_SHIFT LONG_ADDU k1, k0 LONG_L k1, %lo(kernelsp)(k1) .endm .macro set_saved_sp stackp temp temp2 - ASM_CPUID_MFC0 \temp, $SMP_CPUID_REG - LONG_SRL \temp, SMP_CPUID_PTRSHIFT + CPU_ID_MFC0 \temp, CPU_ID_REG + LONG_SRL \temp, PTEBASE_SHIFT LONG_S \stackp, kernelsp(\temp) .endm -#else /* !CONFIG_SMP */ +#else .macro get_saved_sp /* Uniprocessor variation */ #ifdef CONFIG_CPU_JUMP_WORKAROUNDS/*
arch/mips/include/asm/thread_info.h +1 -29
@@ -147,34 +147,6 @@ static inline struct thread_info *current_thread_info(void)#define _TIF_ALLWORK_MASK (_TIF_NOHZ | _TIF_WORK_MASK | \ _TIF_WORK_SYSCALL_EXIT) -/* -* We stash processor id into a COP0 register to retrieve it fast -* at kernel exception entry. -*/ -#if defined(CONFIG_MIPS_MT_SMTC ) -#define SMP_CPUID_REG 2, 2/* TCBIND */ -#define SMP_CPUID_PTRSHIFT 19 -#elif defined(CONFIG_MIPS_PGD_C0_CONTEXT ) -#define SMP_CPUID_REG 20, 0/* XCONTEXT */ -#define SMP_CPUID_PTRSHIFT 48 -#else -#define SMP_CPUID_REG 4, 0/* CONTEXT */ -#define SMP_CPUID_PTRSHIFT 23 -#endif - -#ifdef CONFIG_64BIT -#define SMP_CPUID_REGSHIFT (SMP_CPUID_PTRSHIFT + 3) -#else -#define SMP_CPUID_REGSHIFT (SMP_CPUID_PTRSHIFT + 2) -#endif - -#ifdef CONFIG_MIPS_MT_SMTC -#define ASM_CPUID_MFC0 mfc0 -#define UASM_i_CPUID_MFC0 uasm_i_mfc0 -#else -#define ASM_CPUID_MFC0 MFC0 -#define UASM_i_CPUID_MFC0 UASM_i_MFC0 -#endif -#endif /* __KERNEL__ */ +#endif /* _ASM_THREAD_INFO_H */
arch/mips/mm/tlbex.c +65 -10
114 lines not on this page · raw message
Signature · 1 line
1.7.2.5
Quoted 3 lines · Steven J. Hill
These revert two patches that prevent all MTI and bcm63xx platforms from booting. The kernel boot quietly hangs and gives not indication of what happened.
One issue which could cause this was fixed in the latest upstream-sfr.git, but if this is happening again, can you please send me a .config which shows the problem?
I have tested different malta configurations on qemu and none of them show the issue.
Thanks,
JC.