Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc updates from David Miller:
 "Some 32-bit kgdb cleanups from Sam Ravnborg, and a hugepage TLB flush
  overhead fix on 64-bit from Nitin Gupta"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Reduce TLB flushes during hugepte changes
  aeroflex/greth: fix warning about unused variable
  openprom: fix warning
  sparc32: drop superfluous cast in calls to __nocache_pa()
  sparc32: fix build with STRICT_MM_TYPECHECKS
  sparc32: use proper prototype for trapbase
  sparc32: drop local prototype in kgdb_32
  sparc32: drop hardcoding trap_level in kgdb_trap
This commit is contained in:
Linus Torvalds
2016-05-22 19:24:13 -07:00
19 changed files with 147 additions and 110 deletions

View File

@@ -1225,20 +1225,18 @@ breakpoint_trap:
RESTORE_ALL
#ifdef CONFIG_KGDB
.align 4
.globl kgdb_trap_low
.type kgdb_trap_low,#function
kgdb_trap_low:
ENTRY(kgdb_trap_low)
rd %wim,%l3
SAVE_ALL
wr %l0, PSR_ET, %psr
WRITE_PAUSE
mov %l7, %o0 ! trap_level
call kgdb_trap
add %sp, STACKFRAME_SZ, %o0
add %sp, STACKFRAME_SZ, %o1 ! struct pt_regs *regs
RESTORE_ALL
.size kgdb_trap_low,.-kgdb_trap_low
ENDPROC(kgdb_trap_low)
#endif
.align 4

View File

@@ -127,6 +127,7 @@ extern unsigned int t_nmi[];
extern unsigned int linux_trap_ipi15_sun4d[];
extern unsigned int linux_trap_ipi15_sun4m[];
extern struct tt_entry trapbase;
extern struct tt_entry trapbase_cpu1;
extern struct tt_entry trapbase_cpu2;
extern struct tt_entry trapbase_cpu3;

View File

@@ -12,7 +12,8 @@
#include <asm/irq.h>
#include <asm/cacheflush.h>
extern unsigned long trapbase;
#include "kernel.h"
#include "entry.h"
void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
{
@@ -133,21 +134,19 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
return -1;
}
extern void do_hw_interrupt(struct pt_regs *regs, unsigned long type);
asmlinkage void kgdb_trap(struct pt_regs *regs)
asmlinkage void kgdb_trap(unsigned long trap_level, struct pt_regs *regs)
{
unsigned long flags;
if (user_mode(regs)) {
do_hw_interrupt(regs, 0xfd);
do_hw_interrupt(regs, trap_level);
return;
}
flushw_all();
local_irq_save(flags);
kgdb_handle_exception(0x172, SIGTRAP, 0, regs);
kgdb_handle_exception(trap_level, SIGTRAP, 0, regs);
local_irq_restore(flags);
}

View File

@@ -68,8 +68,6 @@ struct screen_info screen_info = {
* prints out pretty messages and returns.
*/
extern unsigned long trapbase;
/* Pretty sick eh? */
static void prom_sync_me(void)
{
@@ -300,7 +298,7 @@ void __init setup_arch(char **cmdline_p)
int i;
unsigned long highest_paddr;
sparc_ttable = (struct tt_entry *) &trapbase;
sparc_ttable = &trapbase;
/* Initialize PROM console and command line. */
*cmdline_p = prom_getbootargs();