Merge tag 'mips-fixes_6.0_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS fixes from Thomas Bogendoerfer:

- fix for loongson32 starup hang

- fix for octeon irq setup problem

- fix compiler warning for new CONFIG option

- switch to SPARSEMEM_EXTREME for all platforms selecting SPARSEMEM

* tag 'mips-fixes_6.0_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
mips: Select SPARSEMEM_EXTREME
MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping()
MIPS: octeon: Get rid of preprocessor directives around RESERVE32
MIPS: loongson32: ls1c: Fix hang during startup

Changed files
+21 -22
arch
mips
cavium-octeon
loongson32
ls1c
-1
arch/mips/Kconfig
··· 2669 2669 2670 2670 config ARCH_SPARSEMEM_ENABLE 2671 2671 bool 2672 - select SPARSEMEM_STATIC if !SGI_IP27 2673 2672 2674 2673 config NUMA 2675 2674 bool "NUMA Support"
-4
arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c
··· 57 57 static cvmx_cmd_queue_result_t __cvmx_cmd_queue_init_state_ptr(void) 58 58 { 59 59 char *alloc_name = "cvmx_cmd_queues"; 60 - #if defined(CONFIG_CAVIUM_RESERVE32) && CONFIG_CAVIUM_RESERVE32 61 60 extern uint64_t octeon_reserve32_memory; 62 - #endif 63 61 64 62 if (likely(__cvmx_cmd_queue_state_ptr)) 65 63 return CVMX_CMD_QUEUE_SUCCESS; 66 64 67 - #if defined(CONFIG_CAVIUM_RESERVE32) && CONFIG_CAVIUM_RESERVE32 68 65 if (octeon_reserve32_memory) 69 66 __cvmx_cmd_queue_state_ptr = 70 67 cvmx_bootmem_alloc_named_range(sizeof(*__cvmx_cmd_queue_state_ptr), ··· 70 73 (CONFIG_CAVIUM_RESERVE32 << 71 74 20) - 1, 128, alloc_name); 72 75 else 73 - #endif 74 76 __cvmx_cmd_queue_state_ptr = 75 77 cvmx_bootmem_alloc_named(sizeof(*__cvmx_cmd_queue_state_ptr), 76 78 128,
+10
arch/mips/cavium-octeon/octeon-irq.c
··· 127 127 static int octeon_irq_force_ciu_mapping(struct irq_domain *domain, 128 128 int irq, int line, int bit) 129 129 { 130 + struct device_node *of_node; 131 + int ret; 132 + 133 + of_node = irq_domain_get_of_node(domain); 134 + if (!of_node) 135 + return -EINVAL; 136 + ret = irq_alloc_desc_at(irq, of_node_to_nid(of_node)); 137 + if (ret < 0) 138 + return ret; 139 + 130 140 return irq_domain_associate(domain, irq, line << 6 | bit); 131 141 } 132 142
+11 -16
arch/mips/cavium-octeon/setup.c
··· 284 284 285 285 #endif /* CONFIG_KEXEC */ 286 286 287 - #ifdef CONFIG_CAVIUM_RESERVE32 288 287 uint64_t octeon_reserve32_memory; 289 288 EXPORT_SYMBOL(octeon_reserve32_memory); 290 - #endif 291 289 292 290 #ifdef CONFIG_KEXEC 293 291 /* crashkernel cmdline parameter is parsed _after_ memory setup ··· 664 666 int i; 665 667 u64 t; 666 668 int argc; 667 - #ifdef CONFIG_CAVIUM_RESERVE32 668 - int64_t addr = -1; 669 - #endif 670 669 /* 671 670 * The bootloader passes a pointer to the boot descriptor in 672 671 * $a3, this is available as fw_arg3. ··· 778 783 cvmx_write_csr(CVMX_LED_UDD_DATX(1), 0); 779 784 cvmx_write_csr(CVMX_LED_EN, 1); 780 785 } 781 - #ifdef CONFIG_CAVIUM_RESERVE32 786 + 782 787 /* 783 788 * We need to temporarily allocate all memory in the reserve32 784 789 * region. This makes sure the kernel doesn't allocate this ··· 789 794 * Allocate memory for RESERVED32 aligned on 2MB boundary. This 790 795 * is in case we later use hugetlb entries with it. 791 796 */ 792 - addr = cvmx_bootmem_phy_named_block_alloc(CONFIG_CAVIUM_RESERVE32 << 20, 793 - 0, 0, 2 << 20, 794 - "CAVIUM_RESERVE32", 0); 795 - if (addr < 0) 796 - pr_err("Failed to allocate CAVIUM_RESERVE32 memory area\n"); 797 - else 798 - octeon_reserve32_memory = addr; 799 - #endif 797 + if (CONFIG_CAVIUM_RESERVE32) { 798 + int64_t addr = 799 + cvmx_bootmem_phy_named_block_alloc(CONFIG_CAVIUM_RESERVE32 << 20, 800 + 0, 0, 2 << 20, 801 + "CAVIUM_RESERVE32", 0); 802 + if (addr < 0) 803 + pr_err("Failed to allocate CAVIUM_RESERVE32 memory area\n"); 804 + else 805 + octeon_reserve32_memory = addr; 806 + } 800 807 801 808 #ifdef CONFIG_CAVIUM_OCTEON_LOCK_L2 802 809 if (cvmx_read_csr(CVMX_L2D_FUS3) & (3ull << 34)) { ··· 1076 1079 cvmx_bootmem_unlock(); 1077 1080 #endif /* CONFIG_CRASH_DUMP */ 1078 1081 1079 - #ifdef CONFIG_CAVIUM_RESERVE32 1080 1082 /* 1081 1083 * Now that we've allocated the kernel memory it is safe to 1082 1084 * free the reserved region. We free it here so that builtin ··· 1083 1087 */ 1084 1088 if (octeon_reserve32_memory) 1085 1089 cvmx_bootmem_free_named("CAVIUM_RESERVE32"); 1086 - #endif /* CONFIG_CAVIUM_RESERVE32 */ 1087 1090 1088 1091 if (total == 0) 1089 1092 panic("Unable to allocate memory from "
-1
arch/mips/loongson32/ls1c/board.c
··· 15 15 static int __init ls1c_platform_init(void) 16 16 { 17 17 ls1x_serial_set_uartclk(&ls1x_uart_pdev); 18 - ls1x_rtc_set_extclk(&ls1x_rtc_pdev); 19 18 20 19 return platform_add_devices(ls1c_platform_devices, 21 20 ARRAY_SIZE(ls1c_platform_devices));