Skip to content

Commit 5a1e843

Browse files
committed
Merge tag 'mips_fixes_5.4_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fixes from Paul Burton: "A few MIPS fixes: - Fix VDSO time-related function behavior for systems where we need to fall back to syscalls, but were instead returning bogus results. - A fix to TLB exception handlers for Cavium Octeon systems where they would inadvertently clobber the $1/$at register. - A build fix for bcm63xx configurations. - Switch to using my @kernel.org email address" * tag 'mips_fixes_5.4_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: tlbex: Fix build_restore_pagemask KScratch restore MIPS: bmips: mark exception vectors as char arrays mips: vdso: Fix __arch_get_hw_counter() MAINTAINERS: Use @kernel.org address for Paul Burton
2 parents 2976895 + b42aa3f commit 5a1e843

File tree

7 files changed

+35
-25
lines changed

7 files changed

+35
-25
lines changed

.mailmap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ Oleksij Rempel <[email protected]> <[email protected]>
196196
197197
Paolo 'Blaisorblade' Giarrusso <[email protected]>
198198
Patrick Mochel <[email protected]>
199-
199+
200+
200201
Peter A Jonsson <[email protected]>
201202
Peter Oruba <[email protected]>
202203
Peter Oruba <[email protected]>

MAINTAINERS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3098,7 +3098,7 @@ S: Supported
30983098
F: arch/arm64/net/
30993099

31003100
BPF JIT for MIPS (32-BIT AND 64-BIT)
3101-
M: Paul Burton <[email protected]>
3101+
M: Paul Burton <[email protected]>
31023102
31033103
31043104
S: Maintained
@@ -8002,7 +8002,7 @@ S: Maintained
80028002
F: drivers/usb/atm/ueagle-atm.c
80038003

80048004
IMGTEC ASCII LCD DRIVER
8005-
M: Paul Burton <[email protected]>
8005+
M: Paul Burton <[email protected]>
80068006
S: Maintained
80078007
F: Documentation/devicetree/bindings/auxdisplay/img-ascii-lcd.txt
80088008
F: drivers/auxdisplay/img-ascii-lcd.c
@@ -10829,7 +10829,7 @@ F: drivers/usb/image/microtek.*
1082910829

1083010830
MIPS
1083110831
M: Ralf Baechle <[email protected]>
10832-
M: Paul Burton <[email protected]>
10832+
M: Paul Burton <[email protected]>
1083310833
M: James Hogan <[email protected]>
1083410834
1083510835
W: http://www.linux-mips.org/
@@ -10843,7 +10843,7 @@ F: arch/mips/
1084310843
F: drivers/platform/mips/
1084410844

1084510845
MIPS BOSTON DEVELOPMENT BOARD
10846-
M: Paul Burton <[email protected]>
10846+
M: Paul Burton <[email protected]>
1084710847
1084810848
S: Maintained
1084910849
F: Documentation/devicetree/bindings/clock/img,boston-clock.txt
@@ -10853,7 +10853,7 @@ F: drivers/clk/imgtec/clk-boston.c
1085310853
F: include/dt-bindings/clock/boston-clock.h
1085410854

1085510855
MIPS GENERIC PLATFORM
10856-
M: Paul Burton <[email protected]>
10856+
M: Paul Burton <[email protected]>
1085710857
1085810858
S: Supported
1085910859
F: Documentation/devicetree/bindings/power/mti,mips-cpc.txt

arch/mips/bcm63xx/prom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void __init prom_init(void)
8484
* Here we will start up CPU1 in the background and ask it to
8585
* reconfigure itself then go back to sleep.
8686
*/
87-
memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20);
87+
memcpy((void *)0xa0000200, bmips_smp_movevec, 0x20);
8888
__sync();
8989
set_c0_cause(C_SW0);
9090
cpumask_set_cpu(1, &bmips_booted_mask);

arch/mips/include/asm/bmips.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ static inline int register_bmips_smp_ops(void)
7575
#endif
7676
}
7777

78-
extern char bmips_reset_nmi_vec;
79-
extern char bmips_reset_nmi_vec_end;
80-
extern char bmips_smp_movevec;
81-
extern char bmips_smp_int_vec;
82-
extern char bmips_smp_int_vec_end;
78+
extern char bmips_reset_nmi_vec[];
79+
extern char bmips_reset_nmi_vec_end[];
80+
extern char bmips_smp_movevec[];
81+
extern char bmips_smp_int_vec[];
82+
extern char bmips_smp_int_vec_end[];
8383

8484
extern int bmips_smp_enabled;
8585
extern int bmips_cpu_offset;

arch/mips/include/asm/vdso/gettimeofday.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
#define VDSO_HAS_CLOCK_GETRES 1
2626

27+
#define __VDSO_USE_SYSCALL ULLONG_MAX
28+
2729
#ifdef CONFIG_MIPS_CLOCK_VSYSCALL
2830

2931
static __always_inline long gettimeofday_fallback(
@@ -205,7 +207,7 @@ static __always_inline u64 __arch_get_hw_counter(s32 clock_mode)
205207
break;
206208
#endif
207209
default:
208-
cycle_now = 0;
210+
cycle_now = __VDSO_USE_SYSCALL;
209211
break;
210212
}
211213

arch/mips/kernel/smp-bmips.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,10 @@ static void bmips_wr_vec(unsigned long dst, char *start, char *end)
464464

465465
static inline void bmips_nmi_handler_setup(void)
466466
{
467-
bmips_wr_vec(BMIPS_NMI_RESET_VEC, &bmips_reset_nmi_vec,
468-
&bmips_reset_nmi_vec_end);
469-
bmips_wr_vec(BMIPS_WARM_RESTART_VEC, &bmips_smp_int_vec,
470-
&bmips_smp_int_vec_end);
467+
bmips_wr_vec(BMIPS_NMI_RESET_VEC, bmips_reset_nmi_vec,
468+
bmips_reset_nmi_vec_end);
469+
bmips_wr_vec(BMIPS_WARM_RESTART_VEC, bmips_smp_int_vec,
470+
bmips_smp_int_vec_end);
471471
}
472472

473473
struct reset_vec_info {

arch/mips/mm/tlbex.c

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,13 @@ static void build_restore_pagemask(u32 **p, struct uasm_reloc **r,
653653
int restore_scratch)
654654
{
655655
if (restore_scratch) {
656+
/*
657+
* Ensure the MFC0 below observes the value written to the
658+
* KScratch register by the prior MTC0.
659+
*/
660+
if (scratch_reg >= 0)
661+
uasm_i_ehb(p);
662+
656663
/* Reset default page size */
657664
if (PM_DEFAULT_MASK >> 16) {
658665
uasm_i_lui(p, tmp, PM_DEFAULT_MASK >> 16);
@@ -667,12 +674,10 @@ static void build_restore_pagemask(u32 **p, struct uasm_reloc **r,
667674
uasm_i_mtc0(p, 0, C0_PAGEMASK);
668675
uasm_il_b(p, r, lid);
669676
}
670-
if (scratch_reg >= 0) {
671-
uasm_i_ehb(p);
677+
if (scratch_reg >= 0)
672678
UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
673-
} else {
679+
else
674680
UASM_i_LW(p, 1, scratchpad_offset(0), 0);
675-
}
676681
} else {
677682
/* Reset default page size */
678683
if (PM_DEFAULT_MASK >> 16) {
@@ -921,6 +926,10 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
921926
}
922927
if (mode != not_refill && check_for_high_segbits) {
923928
uasm_l_large_segbits_fault(l, *p);
929+
930+
if (mode == refill_scratch && scratch_reg >= 0)
931+
uasm_i_ehb(p);
932+
924933
/*
925934
* We get here if we are an xsseg address, or if we are
926935
* an xuseg address above (PGDIR_SHIFT+PGDIR_BITS) boundary.
@@ -939,12 +948,10 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
939948
uasm_i_jr(p, ptr);
940949

941950
if (mode == refill_scratch) {
942-
if (scratch_reg >= 0) {
943-
uasm_i_ehb(p);
951+
if (scratch_reg >= 0)
944952
UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
945-
} else {
953+
else
946954
UASM_i_LW(p, 1, scratchpad_offset(0), 0);
947-
}
948955
} else {
949956
uasm_i_nop(p);
950957
}

0 commit comments

Comments
 (0)