Skip to content

Commit 134984d

Browse files
committed
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
2 parents b96fbd6 + 727488e commit 134984d

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
lines changed

arch/mips/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2669,7 +2669,6 @@ config ARCH_FLATMEM_ENABLE
26692669

26702670
config ARCH_SPARSEMEM_ENABLE
26712671
bool
2672-
select SPARSEMEM_STATIC if !SGI_IP27
26732672

26742673
config NUMA
26752674
bool "NUMA Support"

arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,11 @@ EXPORT_SYMBOL_GPL(__cvmx_cmd_queue_state_ptr);
5757
static cvmx_cmd_queue_result_t __cvmx_cmd_queue_init_state_ptr(void)
5858
{
5959
char *alloc_name = "cvmx_cmd_queues";
60-
#if defined(CONFIG_CAVIUM_RESERVE32) && CONFIG_CAVIUM_RESERVE32
6160
extern uint64_t octeon_reserve32_memory;
62-
#endif
6361

6462
if (likely(__cvmx_cmd_queue_state_ptr))
6563
return CVMX_CMD_QUEUE_SUCCESS;
6664

67-
#if defined(CONFIG_CAVIUM_RESERVE32) && CONFIG_CAVIUM_RESERVE32
6865
if (octeon_reserve32_memory)
6966
__cvmx_cmd_queue_state_ptr =
7067
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)
7370
(CONFIG_CAVIUM_RESERVE32 <<
7471
20) - 1, 128, alloc_name);
7572
else
76-
#endif
7773
__cvmx_cmd_queue_state_ptr =
7874
cvmx_bootmem_alloc_named(sizeof(*__cvmx_cmd_queue_state_ptr),
7975
128,

arch/mips/cavium-octeon/octeon-irq.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,16 @@ static void octeon_irq_free_cd(struct irq_domain *d, unsigned int irq)
127127
static int octeon_irq_force_ciu_mapping(struct irq_domain *domain,
128128
int irq, int line, int bit)
129129
{
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+
130140
return irq_domain_associate(domain, irq, line << 6 | bit);
131141
}
132142

arch/mips/cavium-octeon/setup.c

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,8 @@ void octeon_crash_smp_send_stop(void)
284284

285285
#endif /* CONFIG_KEXEC */
286286

287-
#ifdef CONFIG_CAVIUM_RESERVE32
288287
uint64_t octeon_reserve32_memory;
289288
EXPORT_SYMBOL(octeon_reserve32_memory);
290-
#endif
291289

292290
#ifdef CONFIG_KEXEC
293291
/* crashkernel cmdline parameter is parsed _after_ memory setup
@@ -666,9 +664,6 @@ void __init prom_init(void)
666664
int i;
667665
u64 t;
668666
int argc;
669-
#ifdef CONFIG_CAVIUM_RESERVE32
670-
int64_t addr = -1;
671-
#endif
672667
/*
673668
* The bootloader passes a pointer to the boot descriptor in
674669
* $a3, this is available as fw_arg3.
@@ -783,7 +778,7 @@ void __init prom_init(void)
783778
cvmx_write_csr(CVMX_LED_UDD_DATX(1), 0);
784779
cvmx_write_csr(CVMX_LED_EN, 1);
785780
}
786-
#ifdef CONFIG_CAVIUM_RESERVE32
781+
787782
/*
788783
* We need to temporarily allocate all memory in the reserve32
789784
* region. This makes sure the kernel doesn't allocate this
@@ -794,14 +789,16 @@ void __init prom_init(void)
794789
* Allocate memory for RESERVED32 aligned on 2MB boundary. This
795790
* is in case we later use hugetlb entries with it.
796791
*/
797-
addr = cvmx_bootmem_phy_named_block_alloc(CONFIG_CAVIUM_RESERVE32 << 20,
798-
0, 0, 2 << 20,
799-
"CAVIUM_RESERVE32", 0);
800-
if (addr < 0)
801-
pr_err("Failed to allocate CAVIUM_RESERVE32 memory area\n");
802-
else
803-
octeon_reserve32_memory = addr;
804-
#endif
792+
if (CONFIG_CAVIUM_RESERVE32) {
793+
int64_t addr =
794+
cvmx_bootmem_phy_named_block_alloc(CONFIG_CAVIUM_RESERVE32 << 20,
795+
0, 0, 2 << 20,
796+
"CAVIUM_RESERVE32", 0);
797+
if (addr < 0)
798+
pr_err("Failed to allocate CAVIUM_RESERVE32 memory area\n");
799+
else
800+
octeon_reserve32_memory = addr;
801+
}
805802

806803
#ifdef CONFIG_CAVIUM_OCTEON_LOCK_L2
807804
if (cvmx_read_csr(CVMX_L2D_FUS3) & (3ull << 34)) {
@@ -1079,15 +1076,13 @@ void __init plat_mem_setup(void)
10791076
cvmx_bootmem_unlock();
10801077
#endif /* CONFIG_CRASH_DUMP */
10811078

1082-
#ifdef CONFIG_CAVIUM_RESERVE32
10831079
/*
10841080
* Now that we've allocated the kernel memory it is safe to
10851081
* free the reserved region. We free it here so that builtin
10861082
* drivers can use the memory.
10871083
*/
10881084
if (octeon_reserve32_memory)
10891085
cvmx_bootmem_free_named("CAVIUM_RESERVE32");
1090-
#endif /* CONFIG_CAVIUM_RESERVE32 */
10911086

10921087
if (total == 0)
10931088
panic("Unable to allocate memory from "

arch/mips/loongson32/ls1c/board.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ static struct platform_device *ls1c_platform_devices[] __initdata = {
1515
static int __init ls1c_platform_init(void)
1616
{
1717
ls1x_serial_set_uartclk(&ls1x_uart_pdev);
18-
ls1x_rtc_set_extclk(&ls1x_rtc_pdev);
1918

2019
return platform_add_devices(ls1c_platform_devices,
2120
ARRAY_SIZE(ls1c_platform_devices));

0 commit comments

Comments
 (0)