History

Merge tag 'mips_fixes_5.1_1' into mips-next

A small batch of MIPS fixes for 5.1: - An interrupt masking fix for Loongson-based Lemote 2F systems (fixing a regression from v3.19). - A relocation fix for configurations in which the devicetree is stored in an ELF section (fixing a regression from v4.7). - Fix jump labels for MIPSr6 kernels where they previously could inadvertently place a control transfer instruction in a forbidden slot & take unexpected exceptions (fixing MIPSr6 support added in v4.0). - Extend an existing USB power workaround for the Netgear WNDR3400 to v2 boards in addition to the v3 ones that already used it. - Remove the custom MIPS32 definition of __kernel_fsid_t to make it consistent with MIPS64 & every other architecture, in particular resolving issues for code which tries to print the val field whose type previously differed (though had identical memory layout). Merged into mips-next to gain the MIPSr6 jump label fix before enabling jump labels by default for generic kernel builds.

Paul Burton committed 7 years ago

Commit ec86e542 parents e6046b5 f6cab795 files · +13 −17Browse files

Unified · Split

5 files
  1. arch/mips/bcm47xx/workarounds.c +1 −0
  2. arch/mips/include/asm/jump_label.h +4 −4
  3. arch/mips/include/uapi/asm/posix_types.h +0 −7
  4. arch/mips/kernel/vmlinux.lds.S +7 −5
  5. arch/mips/loongson64/lemote-2f/irq.c +1 −1
arch/mips/bcm47xx/workarounds.c+1−0
@@ -24,6 +24,7 @@ void __init bcm47xx_workarounds(void) · 23 unmodified lines
2424 case BCM47XX_BOARD_NETGEAR_WNR3500L:
2525 bcm47xx_workarounds_enable_usb_power(12);
2626 break;
27+ case BCM47XX_BOARD_NETGEAR_WNDR3400V2:
2728 case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
2829 bcm47xx_workarounds_enable_usb_power(21);
2930 break;
arch/mips/include/asm/jump_label.h+4−4
@@ -21,15 +21,15 @@ · 20 unmodified lines
2121 #endif
2222
2323 #ifdef CONFIG_CPU_MICROMIPS
24−#define NOP_INSN "nop32"
24+#define B_INSN "b32"
2525 #else
26−#define NOP_INSN "nop"
26+#define B_INSN "b"
2727 #endif
2828
2929 static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
3030 {
31− asm_volatile_goto("1:\t" NOP_INSN "\n\t"
32− "nop\n\t"
31+ asm_volatile_goto("1:\t" B_INSN " 2f\n\t"
32+ "2:\tnop\n\t"
3333 ".pushsection __jump_table, \"aw\"\n\t"
3434 WORD_INSN " 1b, %l[l_yes], %0\n\t"
3535 ".popsection\n\t"
arch/mips/include/uapi/asm/posix_types.h+0−7
@@ -21,13 +21,6 @@ · 20 unmodified lines
2121 typedef long __kernel_daddr_t;
2222 #define __kernel_daddr_t __kernel_daddr_t
2323
24−#if (_MIPS_SZLONG == 32)
25−typedef struct {
26− long val[2];
27−} __kernel_fsid_t;
28−#define __kernel_fsid_t __kernel_fsid_t
29−#endif
30−
3124 #include <asm-generic/posix_types.h>
3225
3326 #endif /* _ASM_POSIX_TYPES_H */
arch/mips/kernel/vmlinux.lds.S+7−5
@@ -140,6 +140,13 @@ SECTIONS · 139 unmodified lines
140140 PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
141141 #endif
142142
143+#ifdef CONFIG_MIPS_ELF_APPENDED_DTB
144+ .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) {
145+ *(.appended_dtb)
146+ KEEP(*(.appended_dtb))
147+ }
148+#endif
149+
143150 #ifdef CONFIG_RELOCATABLE
144151 . = ALIGN(4);
145152
@@ -164,11 +171,6 @@ SECTIONS · 18 unmodified lines
164171 __appended_dtb = .;
165172 /* leave space for appended DTB */
166173 . += 0x100000;
167−#elif defined(CONFIG_MIPS_ELF_APPENDED_DTB)
168− .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) {
169− *(.appended_dtb)
170− KEEP(*(.appended_dtb))
171− }
172174 #endif
173175 /*
174176 * Align to 64K in attempt to eliminate holes before the
arch/mips/loongson64/lemote-2f/irq.c+1−1
@@ -103,7 +103,7 @@ static struct irqaction ip6_irqaction = { · 102 unmodified lines
103103 static struct irqaction cascade_irqaction = {
104104 .handler = no_action,
105105 .name = "cascade",
106− .flags = IRQF_NO_THREAD,
106+ .flags = IRQF_NO_THREAD | IRQF_NO_SUSPEND,
107107 };
108108
109109 void __init mach_init_irq(void)