Skip to content

Commit 4ea6553

Browse files
committed
Merge tag 'mips_fixes_5.4_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fixes from Paul Burton: - Build fixes for Cavium Octeon & PMC-Sierra MSP systems, as well as all pre-MIPSr6 configurations built with binutils < 2.25. - Boot fixes for 64-bit Loongson systems & SGI IP28 systems. - Wire up the new clone3 syscall. - Clean ups for a few build-time warnings. * tag 'mips_fixes_5.4_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: fw/arc: Remove unused addr variable MIPS: pmcs-msp71xx: Remove unused addr variable MIPS: pmcs-msp71xx: Add missing MAX_PROM_MEM definition mips: Loongson: Fix the link time qualifier of 'serial_exit()' MIPS: init: Prevent adding memory before PHYS_OFFSET MIPS: init: Fix reservation of memory between PHYS_OFFSET and mem start MIPS: VDSO: Fix build for binutils < 2.25 MIPS: VDSO: Remove unused gettimeofday.c MIPS: Wire up clone3 syscall MIPS: octeon: Include required header; fix octeon ethernet build MIPS: cpu-bugs64: Mark inline functions as __always_inline MIPS: dts: ar9331: fix interrupt-controller size MIPS: Loongson64: Fix boot failure after dropping boot_mem_map
2 parents 812ad49 + 6822c29 commit 4ea6553

File tree

16 files changed

+41
-313
lines changed

16 files changed

+41
-313
lines changed

arch/mips/boot/dts/qca/ar9331.dtsi

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

100100
miscintc: interrupt-controller@18060010 {
101101
compatible = "qca,ar7240-misc-intc";
102-
reg = <0x18060010 0x4>;
102+
reg = <0x18060010 0x8>;
103103

104104
interrupt-parent = <&cpuintc>;
105105
interrupts = <6>;

arch/mips/fw/arc/memory.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ void __init prom_meminit(void)
160160

161161
void __init prom_free_prom_memory(void)
162162
{
163-
unsigned long addr;
164163
int i;
165164

166165
if (prom_flags & PROM_FLAG_DONT_FREE_TEMP)

arch/mips/include/asm/octeon/cvmx-ipd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <asm/octeon/octeon-feature.h>
3737

3838
#include <asm/octeon/cvmx-ipd-defs.h>
39+
#include <asm/octeon/cvmx-pip-defs.h>
3940

4041
enum cvmx_ipd_mode {
4142
CVMX_IPD_OPC_MODE_STT = 0LL, /* All blocks DRAM, not cached in L2 */

arch/mips/include/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
# endif
5353
#define __ARCH_WANT_SYS_FORK
5454
#define __ARCH_WANT_SYS_CLONE
55+
#define __ARCH_WANT_SYS_CLONE3
5556

5657
/* whitelists for checksyscalls */
5758
#define __IGNORE_fadvise64_64

arch/mips/kernel/cpu-bugs64.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ static char r4kwar[] __initdata =
2424
static char daddiwar[] __initdata =
2525
"Enable CPU_DADDI_WORKAROUNDS to rectify.";
2626

27-
static inline void align_mod(const int align, const int mod)
27+
static __always_inline __init
28+
void align_mod(const int align, const int mod)
2829
{
2930
asm volatile(
3031
".set push\n\t"
@@ -38,8 +39,9 @@ static inline void align_mod(const int align, const int mod)
3839
: "n"(align), "n"(mod));
3940
}
4041

41-
static __always_inline void mult_sh_align_mod(long *v1, long *v2, long *w,
42-
const int align, const int mod)
42+
static __always_inline __init
43+
void mult_sh_align_mod(long *v1, long *v2, long *w,
44+
const int align, const int mod)
4345
{
4446
unsigned long flags;
4547
int m1, m2;
@@ -113,7 +115,7 @@ static __always_inline void mult_sh_align_mod(long *v1, long *v2, long *w,
113115
*w = lw;
114116
}
115117

116-
static inline void check_mult_sh(void)
118+
static __always_inline __init void check_mult_sh(void)
117119
{
118120
long v1[8], v2[8], w[8];
119121
int bug, fix, i;
@@ -176,7 +178,7 @@ asmlinkage void __init do_daddi_ov(struct pt_regs *regs)
176178
exception_exit(prev_state);
177179
}
178180

179-
static inline void check_daddi(void)
181+
static __init void check_daddi(void)
180182
{
181183
extern asmlinkage void handle_daddi_ov(void);
182184
unsigned long flags;
@@ -242,7 +244,7 @@ static inline void check_daddi(void)
242244

243245
int daddiu_bug = IS_ENABLED(CONFIG_CPU_MIPSR6) ? 0 : -1;
244246

245-
static inline void check_daddiu(void)
247+
static __init void check_daddiu(void)
246248
{
247249
long v, w, tmp;
248250

arch/mips/kernel/setup.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ void __init add_memory_region(phys_addr_t start, phys_addr_t size, long type)
108108
return;
109109
}
110110

111+
if (start < PHYS_OFFSET)
112+
return;
113+
111114
memblock_add(start, size);
112115
/* Reserve any memory except the ordinary RAM ranges. */
113116
switch (type) {
@@ -321,7 +324,7 @@ static void __init bootmem_init(void)
321324
* Reserve any memory between the start of RAM and PHYS_OFFSET
322325
*/
323326
if (ramstart > PHYS_OFFSET)
324-
memblock_reserve(PHYS_OFFSET, PFN_UP(ramstart) - PHYS_OFFSET);
327+
memblock_reserve(PHYS_OFFSET, ramstart - PHYS_OFFSET);
325328

326329
if (PFN_UP(ramstart) > ARCH_PFN_OFFSET) {
327330
pr_info("Wasting %lu bytes for tracking %lu unused pages\n",

arch/mips/kernel/syscall.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ SYSCALL_DEFINE6(mips_mmap2, unsigned long, addr, unsigned long, len,
8080

8181
save_static_function(sys_fork);
8282
save_static_function(sys_clone);
83+
save_static_function(sys_clone3);
8384

8485
SYSCALL_DEFINE1(set_thread_area, unsigned long, addr)
8586
{

arch/mips/kernel/syscalls/syscall_n32.tbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,4 +373,4 @@
373373
432 n32 fsmount sys_fsmount
374374
433 n32 fspick sys_fspick
375375
434 n32 pidfd_open sys_pidfd_open
376-
# 435 reserved for clone3
376+
435 n32 clone3 __sys_clone3

arch/mips/kernel/syscalls/syscall_n64.tbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,4 +349,4 @@
349349
432 n64 fsmount sys_fsmount
350350
433 n64 fspick sys_fspick
351351
434 n64 pidfd_open sys_pidfd_open
352-
# 435 reserved for clone3
352+
435 n64 clone3 __sys_clone3

arch/mips/kernel/syscalls/syscall_o32.tbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,4 +422,4 @@
422422
432 o32 fsmount sys_fsmount
423423
433 o32 fspick sys_fspick
424424
434 o32 pidfd_open sys_pidfd_open
425-
# 435 reserved for clone3
425+
435 o32 clone3 __sys_clone3

0 commit comments

Comments
 (0)