Skip to content

Commit

Permalink
Merge tag 'mips_fixes_5.4_3' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/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
  • Loading branch information
torvalds committed Oct 26, 2019
2 parents 2976895 + b42aa3f commit 5a1e843
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ Oleksij Rempel <[email protected]> <[email protected]>
Oleksij Rempel <[email protected]> <[email protected]>
Paolo 'Blaisorblade' Giarrusso <[email protected]>
Patrick Mochel <[email protected]>
Paul Burton <[email protected]> <[email protected]>
Paul Burton <[email protected]> <[email protected]>
Paul Burton <[email protected]> <[email protected]>
Peter A Jonsson <[email protected]>
Peter Oruba <[email protected]>
Peter Oruba <[email protected]>
Expand Down
10 changes: 5 additions & 5 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3098,7 +3098,7 @@ S: Supported
F: arch/arm64/net/

BPF JIT for MIPS (32-BIT AND 64-BIT)
M: Paul Burton <[email protected]>
M: Paul Burton <[email protected]>
L: [email protected]
L: [email protected]
S: Maintained
Expand Down Expand Up @@ -8002,7 +8002,7 @@ S: Maintained
F: drivers/usb/atm/ueagle-atm.c

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

MIPS
M: Ralf Baechle <[email protected]>
M: Paul Burton <[email protected]>
M: Paul Burton <[email protected]>
M: James Hogan <[email protected]>
L: [email protected]
W: http://www.linux-mips.org/
Expand All @@ -10843,7 +10843,7 @@ F: arch/mips/
F: drivers/platform/mips/

MIPS BOSTON DEVELOPMENT BOARD
M: Paul Burton <[email protected]>
M: Paul Burton <[email protected]>
L: [email protected]
S: Maintained
F: Documentation/devicetree/bindings/clock/img,boston-clock.txt
Expand All @@ -10853,7 +10853,7 @@ F: drivers/clk/imgtec/clk-boston.c
F: include/dt-bindings/clock/boston-clock.h

MIPS GENERIC PLATFORM
M: Paul Burton <[email protected]>
M: Paul Burton <[email protected]>
L: [email protected]
S: Supported
F: Documentation/devicetree/bindings/power/mti,mips-cpc.txt
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/bcm63xx/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void __init prom_init(void)
* Here we will start up CPU1 in the background and ask it to
* reconfigure itself then go back to sleep.
*/
memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20);
memcpy((void *)0xa0000200, bmips_smp_movevec, 0x20);
__sync();
set_c0_cause(C_SW0);
cpumask_set_cpu(1, &bmips_booted_mask);
Expand Down
10 changes: 5 additions & 5 deletions arch/mips/include/asm/bmips.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ static inline int register_bmips_smp_ops(void)
#endif
}

extern char bmips_reset_nmi_vec;
extern char bmips_reset_nmi_vec_end;
extern char bmips_smp_movevec;
extern char bmips_smp_int_vec;
extern char bmips_smp_int_vec_end;
extern char bmips_reset_nmi_vec[];
extern char bmips_reset_nmi_vec_end[];
extern char bmips_smp_movevec[];
extern char bmips_smp_int_vec[];
extern char bmips_smp_int_vec_end[];

extern int bmips_smp_enabled;
extern int bmips_cpu_offset;
Expand Down
4 changes: 3 additions & 1 deletion arch/mips/include/asm/vdso/gettimeofday.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#define VDSO_HAS_CLOCK_GETRES 1

#define __VDSO_USE_SYSCALL ULLONG_MAX

#ifdef CONFIG_MIPS_CLOCK_VSYSCALL

static __always_inline long gettimeofday_fallback(
Expand Down Expand Up @@ -205,7 +207,7 @@ static __always_inline u64 __arch_get_hw_counter(s32 clock_mode)
break;
#endif
default:
cycle_now = 0;
cycle_now = __VDSO_USE_SYSCALL;
break;
}

Expand Down
8 changes: 4 additions & 4 deletions arch/mips/kernel/smp-bmips.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,10 @@ static void bmips_wr_vec(unsigned long dst, char *start, char *end)

static inline void bmips_nmi_handler_setup(void)
{
bmips_wr_vec(BMIPS_NMI_RESET_VEC, &bmips_reset_nmi_vec,
&bmips_reset_nmi_vec_end);
bmips_wr_vec(BMIPS_WARM_RESTART_VEC, &bmips_smp_int_vec,
&bmips_smp_int_vec_end);
bmips_wr_vec(BMIPS_NMI_RESET_VEC, bmips_reset_nmi_vec,
bmips_reset_nmi_vec_end);
bmips_wr_vec(BMIPS_WARM_RESTART_VEC, bmips_smp_int_vec,
bmips_smp_int_vec_end);
}

struct reset_vec_info {
Expand Down
23 changes: 15 additions & 8 deletions arch/mips/mm/tlbex.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,13 @@ static void build_restore_pagemask(u32 **p, struct uasm_reloc **r,
int restore_scratch)
{
if (restore_scratch) {
/*
* Ensure the MFC0 below observes the value written to the
* KScratch register by the prior MTC0.
*/
if (scratch_reg >= 0)
uasm_i_ehb(p);

/* Reset default page size */
if (PM_DEFAULT_MASK >> 16) {
uasm_i_lui(p, tmp, PM_DEFAULT_MASK >> 16);
Expand All @@ -667,12 +674,10 @@ static void build_restore_pagemask(u32 **p, struct uasm_reloc **r,
uasm_i_mtc0(p, 0, C0_PAGEMASK);
uasm_il_b(p, r, lid);
}
if (scratch_reg >= 0) {
uasm_i_ehb(p);
if (scratch_reg >= 0)
UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
} else {
else
UASM_i_LW(p, 1, scratchpad_offset(0), 0);
}
} else {
/* Reset default page size */
if (PM_DEFAULT_MASK >> 16) {
Expand Down Expand Up @@ -921,6 +926,10 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
}
if (mode != not_refill && check_for_high_segbits) {
uasm_l_large_segbits_fault(l, *p);

if (mode == refill_scratch && scratch_reg >= 0)
uasm_i_ehb(p);

/*
* We get here if we are an xsseg address, or if we are
* an xuseg address above (PGDIR_SHIFT+PGDIR_BITS) boundary.
Expand All @@ -939,12 +948,10 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
uasm_i_jr(p, ptr);

if (mode == refill_scratch) {
if (scratch_reg >= 0) {
uasm_i_ehb(p);
if (scratch_reg >= 0)
UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
} else {
else
UASM_i_LW(p, 1, scratchpad_offset(0), 0);
}
} else {
uasm_i_nop(p);
}
Expand Down

0 comments on commit 5a1e843

Please sign in to comment.