Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
"Resurrect Alchemy platforms by invoking the WAIT instructions with
interrupts enabled. This still leaves the race condition between
testing TIF_NEED_RESCHED and the WAIT instruction for Alchemy
platforms which need a different fix than other MIPS platforms. But
at least it gets MIPS platforms flying again.

There are also fixes for two build errors (CONFIG_FTRACE=y with
CONFIG_DYNAMIC_FTRACE=n) and CONFIG_VIRTUALIZATION without CONFIG_KVM"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MIPS: ftrace: Add missing CONFIG_DYNAMIC_FTRACE
MIPS: include: mmu_context.h: Replace VIRTUALIZATION with KVM
MIPS: Alchemy: fix wait function

+12 -7
+1 -1
arch/mips/include/asm/mmu_context.h
··· 117 117 if (! ((asid += ASID_INC) & ASID_MASK) ) { 118 118 if (cpu_has_vtag_icache) 119 119 flush_icache_all(); 120 - #ifdef CONFIG_VIRTUALIZATION 120 + #ifdef CONFIG_KVM 121 121 kvm_local_flush_tlb_all(); /* start new asid cycle */ 122 122 #else 123 123 local_flush_tlb_all(); /* start new asid cycle */
+4
arch/mips/kernel/ftrace.c
··· 25 25 #define MCOUNT_OFFSET_INSNS 4 26 26 #endif 27 27 28 + #ifdef CONFIG_DYNAMIC_FTRACE 29 + 28 30 /* Arch override because MIPS doesn't need to run this from stop_machine() */ 29 31 void arch_ftrace_update_code(int command) 30 32 { 31 33 ftrace_modify_all_code(command); 32 34 } 35 + 36 + #endif 33 37 34 38 /* 35 39 * Check if the address is in kernel space
+7 -6
arch/mips/kernel/idle.c
··· 93 93 } 94 94 95 95 /* 96 - * The Au1xxx wait is available only if using 32khz counter or 97 - * external timer source, but specifically not CP0 Counter. 98 - * alchemy/common/time.c may override cpu_wait! 96 + * Au1 'wait' is only useful when the 32kHz counter is used as timer, 97 + * since coreclock (and the cp0 counter) stops upon executing it. Only an 98 + * interrupt can wake it, so they must be enabled before entering idle modes. 99 99 */ 100 100 static void au1k_wait(void) 101 101 { 102 + unsigned long c0status = read_c0_status() | 1; /* irqs on */ 103 + 102 104 __asm__( 103 105 " .set mips3 \n" 104 106 " cache 0x14, 0(%0) \n" 105 107 " cache 0x14, 32(%0) \n" 106 108 " sync \n" 107 - " nop \n" 109 + " mtc0 %1, $12 \n" /* wr c0status */ 108 110 " wait \n" 109 111 " nop \n" 110 112 " nop \n" 111 113 " nop \n" 112 114 " nop \n" 113 115 " .set mips0 \n" 114 - : : "r" (au1k_wait)); 115 - local_irq_enable(); 116 + : : "r" (au1k_wait), "r" (c0status)); 116 117 } 117 118 118 119 static int __initdata nowait;