Commit 134984db authored by Linus Torvalds's avatar Linus Torvalds

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
parents b96fbd60 727488e3
...@@ -2669,7 +2669,6 @@ config ARCH_FLATMEM_ENABLE ...@@ -2669,7 +2669,6 @@ config ARCH_FLATMEM_ENABLE
config ARCH_SPARSEMEM_ENABLE config ARCH_SPARSEMEM_ENABLE
bool bool
select SPARSEMEM_STATIC if !SGI_IP27
config NUMA config NUMA
bool "NUMA Support" bool "NUMA Support"
......
...@@ -57,14 +57,11 @@ EXPORT_SYMBOL_GPL(__cvmx_cmd_queue_state_ptr); ...@@ -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) static cvmx_cmd_queue_result_t __cvmx_cmd_queue_init_state_ptr(void)
{ {
char *alloc_name = "cvmx_cmd_queues"; char *alloc_name = "cvmx_cmd_queues";
#if defined(CONFIG_CAVIUM_RESERVE32) && CONFIG_CAVIUM_RESERVE32
extern uint64_t octeon_reserve32_memory; extern uint64_t octeon_reserve32_memory;
#endif
if (likely(__cvmx_cmd_queue_state_ptr)) if (likely(__cvmx_cmd_queue_state_ptr))
return CVMX_CMD_QUEUE_SUCCESS; return CVMX_CMD_QUEUE_SUCCESS;
#if defined(CONFIG_CAVIUM_RESERVE32) && CONFIG_CAVIUM_RESERVE32
if (octeon_reserve32_memory) if (octeon_reserve32_memory)
__cvmx_cmd_queue_state_ptr = __cvmx_cmd_queue_state_ptr =
cvmx_bootmem_alloc_named_range(sizeof(*__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) ...@@ -73,7 +70,6 @@ static cvmx_cmd_queue_result_t __cvmx_cmd_queue_init_state_ptr(void)
(CONFIG_CAVIUM_RESERVE32 << (CONFIG_CAVIUM_RESERVE32 <<
20) - 1, 128, alloc_name); 20) - 1, 128, alloc_name);
else else
#endif
__cvmx_cmd_queue_state_ptr = __cvmx_cmd_queue_state_ptr =
cvmx_bootmem_alloc_named(sizeof(*__cvmx_cmd_queue_state_ptr), cvmx_bootmem_alloc_named(sizeof(*__cvmx_cmd_queue_state_ptr),
128, 128,
......
...@@ -127,6 +127,16 @@ static void octeon_irq_free_cd(struct irq_domain *d, unsigned int irq) ...@@ -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, static int octeon_irq_force_ciu_mapping(struct irq_domain *domain,
int irq, int line, int bit) 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); return irq_domain_associate(domain, irq, line << 6 | bit);
} }
......
...@@ -284,10 +284,8 @@ void octeon_crash_smp_send_stop(void) ...@@ -284,10 +284,8 @@ void octeon_crash_smp_send_stop(void)
#endif /* CONFIG_KEXEC */ #endif /* CONFIG_KEXEC */
#ifdef CONFIG_CAVIUM_RESERVE32
uint64_t octeon_reserve32_memory; uint64_t octeon_reserve32_memory;
EXPORT_SYMBOL(octeon_reserve32_memory); EXPORT_SYMBOL(octeon_reserve32_memory);
#endif
#ifdef CONFIG_KEXEC #ifdef CONFIG_KEXEC
/* crashkernel cmdline parameter is parsed _after_ memory setup /* crashkernel cmdline parameter is parsed _after_ memory setup
...@@ -666,9 +664,6 @@ void __init prom_init(void) ...@@ -666,9 +664,6 @@ void __init prom_init(void)
int i; int i;
u64 t; u64 t;
int argc; int argc;
#ifdef CONFIG_CAVIUM_RESERVE32
int64_t addr = -1;
#endif
/* /*
* The bootloader passes a pointer to the boot descriptor in * The bootloader passes a pointer to the boot descriptor in
* $a3, this is available as fw_arg3. * $a3, this is available as fw_arg3.
...@@ -783,7 +778,7 @@ void __init prom_init(void) ...@@ -783,7 +778,7 @@ void __init prom_init(void)
cvmx_write_csr(CVMX_LED_UDD_DATX(1), 0); cvmx_write_csr(CVMX_LED_UDD_DATX(1), 0);
cvmx_write_csr(CVMX_LED_EN, 1); cvmx_write_csr(CVMX_LED_EN, 1);
} }
#ifdef CONFIG_CAVIUM_RESERVE32
/* /*
* We need to temporarily allocate all memory in the reserve32 * We need to temporarily allocate all memory in the reserve32
* region. This makes sure the kernel doesn't allocate this * region. This makes sure the kernel doesn't allocate this
...@@ -794,14 +789,16 @@ void __init prom_init(void) ...@@ -794,14 +789,16 @@ void __init prom_init(void)
* Allocate memory for RESERVED32 aligned on 2MB boundary. This * Allocate memory for RESERVED32 aligned on 2MB boundary. This
* is in case we later use hugetlb entries with it. * 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, 0, 0, 2 << 20,
"CAVIUM_RESERVE32", 0); "CAVIUM_RESERVE32", 0);
if (addr < 0) if (addr < 0)
pr_err("Failed to allocate CAVIUM_RESERVE32 memory area\n"); pr_err("Failed to allocate CAVIUM_RESERVE32 memory area\n");
else else
octeon_reserve32_memory = addr; octeon_reserve32_memory = addr;
#endif }
#ifdef CONFIG_CAVIUM_OCTEON_LOCK_L2 #ifdef CONFIG_CAVIUM_OCTEON_LOCK_L2
if (cvmx_read_csr(CVMX_L2D_FUS3) & (3ull << 34)) { if (cvmx_read_csr(CVMX_L2D_FUS3) & (3ull << 34)) {
...@@ -1079,7 +1076,6 @@ void __init plat_mem_setup(void) ...@@ -1079,7 +1076,6 @@ void __init plat_mem_setup(void)
cvmx_bootmem_unlock(); cvmx_bootmem_unlock();
#endif /* CONFIG_CRASH_DUMP */ #endif /* CONFIG_CRASH_DUMP */
#ifdef CONFIG_CAVIUM_RESERVE32
/* /*
* Now that we've allocated the kernel memory it is safe to * Now that we've allocated the kernel memory it is safe to
* free the reserved region. We free it here so that builtin * free the reserved region. We free it here so that builtin
...@@ -1087,7 +1083,6 @@ void __init plat_mem_setup(void) ...@@ -1087,7 +1083,6 @@ void __init plat_mem_setup(void)
*/ */
if (octeon_reserve32_memory) if (octeon_reserve32_memory)
cvmx_bootmem_free_named("CAVIUM_RESERVE32"); cvmx_bootmem_free_named("CAVIUM_RESERVE32");
#endif /* CONFIG_CAVIUM_RESERVE32 */
if (total == 0) if (total == 0)
panic("Unable to allocate memory from " panic("Unable to allocate memory from "
......
...@@ -15,7 +15,6 @@ static struct platform_device *ls1c_platform_devices[] __initdata = { ...@@ -15,7 +15,6 @@ static struct platform_device *ls1c_platform_devices[] __initdata = {
static int __init ls1c_platform_init(void) static int __init ls1c_platform_init(void)
{ {
ls1x_serial_set_uartclk(&ls1x_uart_pdev); ls1x_serial_set_uartclk(&ls1x_uart_pdev);
ls1x_rtc_set_extclk(&ls1x_rtc_pdev);
return platform_add_devices(ls1c_platform_devices, return platform_add_devices(ls1c_platform_devices,
ARRAY_SIZE(ls1c_platform_devices)); ARRAY_SIZE(ls1c_platform_devices));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment