Skip to content

Commit 4854cf9

Browse files
committed
Merge tag 'mips-fixes_6.8_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fixes from Thomas Bogendoerfer: - fix boot issue on single core Lantiq Danube devices - fix boot issue on Loongson64 platforms - fix improper FPU setup - fix missing prototypes issues * tag 'mips-fixes_6.8_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: mips: Call lose_fpu(0) before initializing fcr31 in mips_set_personality_nan MIPS: loongson64: set nid for reserved memblock region Revert "MIPS: loongson64: set nid for reserved memblock region" MIPS: lantiq: register smp_ops on non-smp platforms MIPS: loongson64: set nid for reserved memblock region MIPS: reserve exception vector space ONLY ONCE MIPS: BCM63XX: Fix missing prototypes MIPS: sgi-ip32: Fix missing prototypes MIPS: sgi-ip30: Fix missing prototypes MIPS: fw arc: Fix missing prototypes MIPS: sgi-ip27: Fix missing prototypes MIPS: Alchemy: Fix missing prototypes MIPS: Cobalt: Fix missing prototypes
2 parents 648f575 + 59be5c3 commit 4854cf9

File tree

34 files changed

+83
-230
lines changed

34 files changed

+83
-230
lines changed

arch/mips/alchemy/common/prom.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <linux/string.h>
4141

4242
#include <asm/bootinfo.h>
43+
#include <prom.h>
4344

4445
int prom_argc;
4546
char **prom_argv;

arch/mips/alchemy/common/setup.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@
3030
#include <linux/mm.h>
3131
#include <linux/dma-map-ops.h> /* for dma_default_coherent */
3232

33+
#include <asm/bootinfo.h>
3334
#include <asm/mipsregs.h>
3435

3536
#include <au1000.h>
3637

37-
extern void __init board_setup(void);
38-
extern void __init alchemy_set_lpj(void);
39-
4038
static bool alchemy_dma_coherent(void)
4139
{
4240
switch (alchemy_get_cputype()) {

arch/mips/bcm63xx/boards/board_bcm963xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ static struct ssb_sprom bcm63xx_sprom = {
702702
.boardflags_hi = 0x0000,
703703
};
704704

705-
int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
705+
static int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
706706
{
707707
if (bus->bustype == SSB_BUSTYPE_PCI) {
708708
memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom));

arch/mips/bcm63xx/dev-rng.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static struct platform_device bcm63xx_rng_device = {
2626
.resource = rng_resources,
2727
};
2828

29-
int __init bcm63xx_rng_register(void)
29+
static int __init bcm63xx_rng_register(void)
3030
{
3131
if (!BCMCPU_IS_6368())
3232
return -ENODEV;

arch/mips/bcm63xx/dev-uart.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/kernel.h>
1111
#include <linux/platform_device.h>
1212
#include <bcm63xx_cpu.h>
13+
#include <bcm63xx_dev_uart.h>
1314

1415
static struct resource uart0_resources[] = {
1516
{

arch/mips/bcm63xx/dev-wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static struct platform_device bcm63xx_wdt_device = {
3434
},
3535
};
3636

37-
int __init bcm63xx_wdt_register(void)
37+
static int __init bcm63xx_wdt_register(void)
3838
{
3939
wdt_resources[0].start = bcm63xx_regset_address(RSET_WDT);
4040
wdt_resources[0].end = wdt_resources[0].start;

arch/mips/bcm63xx/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static inline int enable_irq_for_cpu(int cpu, struct irq_data *d,
7272
*/
7373

7474
#define BUILD_IPIC_INTERNAL(width) \
75-
void __dispatch_internal_##width(int cpu) \
75+
static void __dispatch_internal_##width(int cpu) \
7676
{ \
7777
u32 pending[width / 32]; \
7878
unsigned int src, tgt; \

arch/mips/bcm63xx/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void __init plat_mem_setup(void)
159159
board_setup();
160160
}
161161

162-
int __init bcm63xx_register_devices(void)
162+
static int __init bcm63xx_register_devices(void)
163163
{
164164
/* register gpiochip */
165165
bcm63xx_gpio_init();

arch/mips/bcm63xx/timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ int bcm63xx_timer_set(int id, int monotonic, unsigned int countdown_us)
178178

179179
EXPORT_SYMBOL(bcm63xx_timer_set);
180180

181-
int bcm63xx_timer_init(void)
181+
static int bcm63xx_timer_init(void)
182182
{
183183
int ret, irq;
184184
u32 reg;

arch/mips/cobalt/setup.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323

2424
#include <cobalt.h>
2525

26-
extern void cobalt_machine_restart(char *command);
27-
extern void cobalt_machine_halt(void);
28-
2926
const char *get_system_type(void)
3027
{
3128
switch (cobalt_board_id) {

arch/mips/fw/arc/memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static unsigned int nr_prom_mem __initdata;
3737
*/
3838
#define ARC_PAGE_SHIFT 12
3939

40-
struct linux_mdesc * __init ArcGetMemoryDescriptor(struct linux_mdesc *Current)
40+
static struct linux_mdesc * __init ArcGetMemoryDescriptor(struct linux_mdesc *Current)
4141
{
4242
return (struct linux_mdesc *) ARC_CALL1(get_mdesc, Current);
4343
}

arch/mips/include/asm/mach-au1x00/au1000.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,9 @@
597597

598598
#include <asm/cpu.h>
599599

600+
void alchemy_set_lpj(void);
601+
void board_setup(void);
602+
600603
/* helpers to access the SYS_* registers */
601604
static inline unsigned long alchemy_rdsys(int regofs)
602605
{

arch/mips/include/asm/mach-cobalt/cobalt.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ extern int cobalt_board_id;
1919
#define COBALT_BRD_ID_QUBE2 0x5
2020
#define COBALT_BRD_ID_RAQ2 0x6
2121

22+
void cobalt_machine_halt(void);
23+
void cobalt_machine_restart(char *command);
24+
2225
#endif /* __ASM_COBALT_H */

arch/mips/kernel/elf.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include <asm/cpu-features.h>
1313
#include <asm/cpu-info.h>
14+
#include <asm/fpu.h>
1415

1516
#ifdef CONFIG_MIPS_FP_SUPPORT
1617

@@ -309,6 +310,11 @@ void mips_set_personality_nan(struct arch_elf_state *state)
309310
struct cpuinfo_mips *c = &boot_cpu_data;
310311
struct task_struct *t = current;
311312

313+
/* Do this early so t->thread.fpu.fcr31 won't be clobbered in case
314+
* we are preempted before the lose_fpu(0) in start_thread.
315+
*/
316+
lose_fpu(0);
317+
312318
t->thread.fpu.fcr31 = c->fpu_csr31;
313319
switch (state->nan_2008) {
314320
case 0:

arch/mips/kernel/traps.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2007,7 +2007,13 @@ unsigned long vi_handlers[64];
20072007

20082008
void reserve_exception_space(phys_addr_t addr, unsigned long size)
20092009
{
2010-
memblock_reserve(addr, size);
2010+
/*
2011+
* reserve exception space on CPUs other than CPU0
2012+
* is too late, since memblock is unavailable when APs
2013+
* up
2014+
*/
2015+
if (smp_processor_id() == 0)
2016+
memblock_reserve(addr, size);
20112017
}
20122018

20132019
void __init *set_except_vector(int n, void *addr)

arch/mips/lantiq/prom.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,9 @@ void __init prom_init(void)
108108
prom_init_cmdline();
109109

110110
#if defined(CONFIG_MIPS_MT_SMP)
111-
if (cpu_has_mipsmt) {
112-
lantiq_smp_ops = vsmp_smp_ops;
111+
lantiq_smp_ops = vsmp_smp_ops;
112+
if (cpu_has_mipsmt)
113113
lantiq_smp_ops.init_secondary = lantiq_init_secondary;
114-
register_smp_ops(&lantiq_smp_ops);
115-
}
114+
register_smp_ops(&lantiq_smp_ops);
116115
#endif
117116
}

arch/mips/loongson64/init.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ void __init szmem(unsigned int node)
103103
if (loongson_sysconf.vgabios_addr)
104104
memblock_reserve(virt_to_phys((void *)loongson_sysconf.vgabios_addr),
105105
SZ_256K);
106+
/* set nid for reserved memory */
107+
memblock_set_node((u64)node << 44, (u64)(node + 1) << 44,
108+
&memblock.reserved, node);
106109
}
107110

108111
#ifndef CONFIG_NUMA

arch/mips/loongson64/numa.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ static void __init node_mem_init(unsigned int node)
132132

133133
/* Reserve pfn range 0~node[0]->node_start_pfn */
134134
memblock_reserve(0, PAGE_SIZE * start_pfn);
135+
/* set nid for reserved memory on node 0 */
136+
memblock_set_node(0, 1ULL << 44, &memblock.reserved, 0);
135137
}
136138
}
137139

arch/mips/sgi-ip27/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
obj-y := ip27-berr.o ip27-irq.o ip27-init.o ip27-klconfig.o \
77
ip27-klnuma.o ip27-memory.o ip27-nmi.o ip27-reset.o ip27-timer.o \
8-
ip27-hubio.o ip27-xtalk.o
8+
ip27-xtalk.o
99

1010
obj-$(CONFIG_EARLY_PRINTK) += ip27-console.o
1111
obj-$(CONFIG_SMP) += ip27-smp.o

arch/mips/sgi-ip27/ip27-berr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include <asm/traps.h>
2323
#include <linux/uaccess.h>
2424

25+
#include "ip27-common.h"
26+
2527
static void dump_hub_information(unsigned long errst0, unsigned long errst1)
2628
{
2729
static char *err_type[2][8] = {
@@ -57,7 +59,7 @@ static void dump_hub_information(unsigned long errst0, unsigned long errst1)
5759
[st0.pi_stat0_fmt.s0_err_type] ? : "invalid");
5860
}
5961

60-
int ip27_be_handler(struct pt_regs *regs, int is_fixup)
62+
static int ip27_be_handler(struct pt_regs *regs, int is_fixup)
6163
{
6264
unsigned long errst0, errst1;
6365
int data = regs->cp0_cause & 4;

arch/mips/sgi-ip27/ip27-common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ extern void hub_rt_clock_event_init(void);
1010
extern void hub_rtc_init(nasid_t nasid);
1111
extern void install_cpu_nmi_handler(int slice);
1212
extern void install_ipi(void);
13+
extern void ip27_be_init(void);
1314
extern void ip27_reboot_setup(void);
1415
extern const struct plat_smp_ops ip27_smp_ops;
1516
extern unsigned long node_getfirstfree(nasid_t nasid);
1617
extern void per_cpu_init(void);
1718
extern void replicate_kernel_text(void);
1819
extern void setup_replication_mask(void);
1920

21+
2022
#endif /* __IP27_COMMON_H */

0 commit comments

Comments
 (0)