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

sh: Disable MMUCR_AT for SH-4 nommu.

Presently address translation is default-enabled regardless of whether
CONFIG_MMU is set or not in the SH-4 case, this fixes it up, and also
makes the control init word a bit more readable in the process.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

+9 -2
+9 -2
arch/sh/include/cpu-sh4/cpu/mmu_context.h
··· 32 32 #define MMU_UTLB_DATA_ARRAY2 0xF7800000 33 33 #define MMU_PAGE_ASSOC_BIT 0x80 34 34 35 - #define MMUCR_TI (1<<2) 35 + #ifdef CONFIG_MMU 36 + #define MMUCR_AT (1 << 0) 37 + #else 38 + #define MMUCR_AT (0) 39 + #endif 40 + 41 + #define MMUCR_TI (1 << 2) 36 42 37 43 #define MMUCR_URB 0x00FC0000 38 44 #define MMUCR_URB_SHIFT 18 ··· 71 65 #endif 72 66 73 67 #define MMU_NTLB_ENTRIES 64 74 - #define MMU_CONTROL_INIT (0x05|MMUCR_SQMD|MMUCR_ME|MMUCR_SE|MMUCR_AEX) 68 + #define MMU_CONTROL_INIT (MMUCR_AT | MMUCR_TI | MMUCR_SQMD | \ 69 + MMUCR_ME | MMUCR_SE | MMUCR_AEX) 75 70 76 71 #define TRA 0xff000020 77 72 #define EXPEVT 0xff000024