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

Merge tag 'mips_fixes_5.9_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS fixes from Thomas Bogendoerfer:
"A few MIPS fixes:

- fallthrough fallout fix

- BMIPS fixes

- MSA fix to avoid leaking MSA register contents

- Loongson perf and cpu feature fix

- SNI interrupt fix"

* tag 'mips_fixes_5.9_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
MIPS: SNI: Fix SCSI interrupt
MIPS: add missing MSACSR and upper MSA initialization
MIPS: perf: Fix wrong check condition of Loongson event IDs
mips/oprofile: Fix fallthrough placement
MIPS: Loongson64: Remove unnecessary inclusion of boot_param.h
MIPS: BMIPS: Also call bmips_cpu_setup() for secondary cores
MIPS: mm: BMIPS5000 has inclusive physical caches
MIPS: Loongson64: Do not override watch and ejtag feature

+25 -10
-2
arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h
··· 26 26 #define cpu_has_counter 1 27 27 #define cpu_has_dc_aliases (PAGE_SIZE < 0x4000) 28 28 #define cpu_has_divec 0 29 - #define cpu_has_ejtag 0 30 29 #define cpu_has_inclusive_pcaches 1 31 30 #define cpu_has_llsc 1 32 31 #define cpu_has_mcheck 0 ··· 41 42 #define cpu_has_veic 0 42 43 #define cpu_has_vint 0 43 44 #define cpu_has_vtag_icache 0 44 - #define cpu_has_watch 1 45 45 #define cpu_has_wsbh 1 46 46 #define cpu_has_ic_fills_f_dc 1 47 47 #define cpu_hwrena_impl_bits 0xc0000000
-2
arch/mips/include/asm/mach-loongson64/irq.h
··· 2 2 #ifndef __ASM_MACH_LOONGSON64_IRQ_H_ 3 3 #define __ASM_MACH_LOONGSON64_IRQ_H_ 4 4 5 - #include <boot_param.h> 6 - 7 5 /* cpu core interrupt numbers */ 8 6 #define NR_IRQS_LEGACY 16 9 7 #define NR_MIPS_CPU_IRQS 8
-1
arch/mips/include/asm/mach-loongson64/mmzone.h
··· 9 9 #ifndef _ASM_MACH_LOONGSON64_MMZONE_H 10 10 #define _ASM_MACH_LOONGSON64_MMZONE_H 11 11 12 - #include <boot_param.h> 13 12 #define NODE_ADDRSPACE_SHIFT 44 14 13 #define NODE0_ADDRSPACE_OFFSET 0x000000000000UL 15 14 #define NODE1_ADDRSPACE_OFFSET 0x100000000000UL
+2 -2
arch/mips/kernel/perf_event_mipsxx.c
··· 1898 1898 (base_id >= 64 && base_id < 90) || 1899 1899 (base_id >= 128 && base_id < 164) || 1900 1900 (base_id >= 192 && base_id < 200) || 1901 - (base_id >= 256 && base_id < 274) || 1902 - (base_id >= 320 && base_id < 358) || 1901 + (base_id >= 256 && base_id < 275) || 1902 + (base_id >= 320 && base_id < 361) || 1903 1903 (base_id >= 384 && base_id < 574)) 1904 1904 break; 1905 1905
+2
arch/mips/kernel/smp-bmips.c
··· 239 239 */ 240 240 static void bmips_init_secondary(void) 241 241 { 242 + bmips_cpu_setup(); 243 + 242 244 switch (current_cpu_type()) { 243 245 case CPU_BMIPS4350: 244 246 case CPU_BMIPS4380:
+12
arch/mips/kernel/traps.c
··· 1287 1287 err = own_fpu_inatomic(1); 1288 1288 if (msa && !err) { 1289 1289 enable_msa(); 1290 + /* 1291 + * with MSA enabled, userspace can see MSACSR 1292 + * and MSA regs, but the values in them are from 1293 + * other task before current task, restore them 1294 + * from saved fp/msa context 1295 + */ 1296 + write_msa_csr(current->thread.fpu.msacsr); 1297 + /* 1298 + * own_fpu_inatomic(1) just restore low 64bit, 1299 + * fix the high 64bit 1300 + */ 1301 + init_msa_upper(); 1290 1302 set_thread_flag(TIF_USEDMSA); 1291 1303 set_thread_flag(TIF_MSA_CTX_LIVE); 1292 1304 }
+4
arch/mips/mm/c-r4k.c
··· 1712 1712 printk("MIPS secondary cache %ldkB, %s, linesize %d bytes.\n", 1713 1713 scache_size >> 10, 1714 1714 way_string[c->scache.ways], c->scache.linesz); 1715 + 1716 + if (current_cpu_type() == CPU_BMIPS5000) 1717 + c->options |= MIPS_CPU_INCLUSIVE_CACHES; 1715 1718 } 1719 + 1716 1720 #else 1717 1721 if (!(c->scache.flags & MIPS_CACHE_NOT_PRESENT)) 1718 1722 panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
+3 -1
arch/mips/oprofile/op_model_mipsxx.c
··· 245 245 246 246 switch (counters) { 247 247 #define HANDLE_COUNTER(n) \ 248 - fallthrough; \ 249 248 case n + 1: \ 250 249 control = r_c0_perfctrl ## n(); \ 251 250 counter = r_c0_perfcntr ## n(); \ ··· 255 256 handled = IRQ_HANDLED; \ 256 257 } 257 258 HANDLE_COUNTER(3) 259 + fallthrough; 258 260 HANDLE_COUNTER(2) 261 + fallthrough; 259 262 HANDLE_COUNTER(1) 263 + fallthrough; 260 264 HANDLE_COUNTER(0) 261 265 } 262 266
+2 -2
arch/mips/sni/a20r.c
··· 222 222 irq_set_chip_and_handler(i, &a20r_irq_type, handle_level_irq); 223 223 sni_hwint = a20r_hwint; 224 224 change_c0_status(ST0_IM, IE_IRQ0); 225 - if (request_irq(SNI_A20R_IRQ_BASE + 3, sni_isa_irq_handler, 0, "ISA", 226 - NULL)) 225 + if (request_irq(SNI_A20R_IRQ_BASE + 3, sni_isa_irq_handler, 226 + IRQF_SHARED, "ISA", sni_isa_irq_handler)) 227 227 pr_err("Failed to register ISA interrupt\n"); 228 228 } 229 229