Commit 134984db authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents b96fbd60 727488e3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2669,7 +2669,6 @@ config ARCH_FLATMEM_ENABLE

config ARCH_SPARSEMEM_ENABLE
	bool
	select SPARSEMEM_STATIC if !SGI_IP27

config NUMA
	bool "NUMA Support"
+0 −4
Original line number Diff line number Diff line
@@ -57,14 +57,11 @@ EXPORT_SYMBOL_GPL(__cvmx_cmd_queue_state_ptr);
static cvmx_cmd_queue_result_t __cvmx_cmd_queue_init_state_ptr(void)
{
	char *alloc_name = "cvmx_cmd_queues";
#if defined(CONFIG_CAVIUM_RESERVE32) && CONFIG_CAVIUM_RESERVE32
	extern uint64_t octeon_reserve32_memory;
#endif

	if (likely(__cvmx_cmd_queue_state_ptr))
		return CVMX_CMD_QUEUE_SUCCESS;

#if defined(CONFIG_CAVIUM_RESERVE32) && CONFIG_CAVIUM_RESERVE32
	if (octeon_reserve32_memory)
		__cvmx_cmd_queue_state_ptr =
		    cvmx_bootmem_alloc_named_range(sizeof(*__cvmx_cmd_queue_state_ptr),
@@ -73,7 +70,6 @@ static cvmx_cmd_queue_result_t __cvmx_cmd_queue_init_state_ptr(void)
						   (CONFIG_CAVIUM_RESERVE32 <<
						    20) - 1, 128, alloc_name);
	else
#endif
		__cvmx_cmd_queue_state_ptr =
		    cvmx_bootmem_alloc_named(sizeof(*__cvmx_cmd_queue_state_ptr),
					    128,
+10 −0
Original line number Diff line number Diff line
@@ -127,6 +127,16 @@ static void octeon_irq_free_cd(struct irq_domain *d, unsigned int irq)
static int octeon_irq_force_ciu_mapping(struct irq_domain *domain,
					int irq, int line, int bit)
{
	struct device_node *of_node;
	int ret;

	of_node = irq_domain_get_of_node(domain);
	if (!of_node)
		return -EINVAL;
	ret = irq_alloc_desc_at(irq, of_node_to_nid(of_node));
	if (ret < 0)
		return ret;

	return irq_domain_associate(domain, irq, line << 6 | bit);
}

+11 −16
Original line number Diff line number Diff line
@@ -284,10 +284,8 @@ void octeon_crash_smp_send_stop(void)

#endif /* CONFIG_KEXEC */

#ifdef CONFIG_CAVIUM_RESERVE32
uint64_t octeon_reserve32_memory;
EXPORT_SYMBOL(octeon_reserve32_memory);
#endif

#ifdef CONFIG_KEXEC
/* crashkernel cmdline parameter is parsed _after_ memory setup
@@ -666,9 +664,6 @@ void __init prom_init(void)
	int i;
	u64 t;
	int argc;
#ifdef CONFIG_CAVIUM_RESERVE32
	int64_t addr = -1;
#endif
	/*
	 * The bootloader passes a pointer to the boot descriptor in
	 * $a3, this is available as fw_arg3.
@@ -783,7 +778,7 @@ void __init prom_init(void)
		cvmx_write_csr(CVMX_LED_UDD_DATX(1), 0);
		cvmx_write_csr(CVMX_LED_EN, 1);
	}
#ifdef CONFIG_CAVIUM_RESERVE32

	/*
	 * We need to temporarily allocate all memory in the reserve32
	 * region. This makes sure the kernel doesn't allocate this
@@ -794,14 +789,16 @@ void __init prom_init(void)
	 * Allocate memory for RESERVED32 aligned on 2MB boundary. This
	 * is in case we later use hugetlb entries with it.
	 */
	addr = cvmx_bootmem_phy_named_block_alloc(CONFIG_CAVIUM_RESERVE32 << 20,
	if (CONFIG_CAVIUM_RESERVE32) {
		int64_t addr =
			cvmx_bootmem_phy_named_block_alloc(CONFIG_CAVIUM_RESERVE32 << 20,
							   0, 0, 2 << 20,
							   "CAVIUM_RESERVE32", 0);
		if (addr < 0)
			pr_err("Failed to allocate CAVIUM_RESERVE32 memory area\n");
		else
			octeon_reserve32_memory = addr;
#endif
	}

#ifdef CONFIG_CAVIUM_OCTEON_LOCK_L2
	if (cvmx_read_csr(CVMX_L2D_FUS3) & (3ull << 34)) {
@@ -1079,7 +1076,6 @@ void __init plat_mem_setup(void)
	cvmx_bootmem_unlock();
#endif /* CONFIG_CRASH_DUMP */

#ifdef CONFIG_CAVIUM_RESERVE32
	/*
	 * Now that we've allocated the kernel memory it is safe to
	 * free the reserved region. We free it here so that builtin
@@ -1087,7 +1083,6 @@ void __init plat_mem_setup(void)
	 */
	if (octeon_reserve32_memory)
		cvmx_bootmem_free_named("CAVIUM_RESERVE32");
#endif /* CONFIG_CAVIUM_RESERVE32 */

	if (total == 0)
		panic("Unable to allocate memory from "
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ static struct platform_device *ls1c_platform_devices[] __initdata = {
static int __init ls1c_platform_init(void)
{
	ls1x_serial_set_uartclk(&ls1x_uart_pdev);
	ls1x_rtc_set_extclk(&ls1x_rtc_pdev);

	return platform_add_devices(ls1c_platform_devices,
				   ARRAY_SIZE(ls1c_platform_devices));