Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123391
b: refs/heads/master
c: 8d74e32
h: refs/heads/master
i:
  123389: 1004d01
  123387: 35cce25
  123383: 61d95c9
  123375: d94bfad
  123359: 786d32c
  123327: ee35405
  123263: c6cdd48
  123135: a9f2548
  122879: b3224e7
v: v3
  • Loading branch information
Sam Ravnborg authored and David S. Miller committed Dec 8, 2008
1 parent bd6a85c commit e86c2c0
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85bfbf44c37e403d4fcbcd630b3ca2377b156485
refs/heads/master: 8d74e32a537e8dbb22a1d5e9005d11111dab979a
35 changes: 35 additions & 0 deletions trunk/arch/sparc/kernel/entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,40 @@
#include <linux/types.h>
#include <linux/init.h>

#ifdef CONFIG_SPARC32
/* traps */
extern void do_hw_interrupt(struct pt_regs *regs, unsigned long type);
extern void do_illegal_instruction(struct pt_regs *regs, unsigned long pc,
unsigned long npc, unsigned long psr);

extern void do_priv_instruction(struct pt_regs *regs, unsigned long pc,
unsigned long npc, unsigned long psr);
extern void do_memaccess_unaligned(struct pt_regs *regs, unsigned long pc,
unsigned long npc,
unsigned long psr);
extern void do_fpd_trap(struct pt_regs *regs, unsigned long pc,
unsigned long npc, unsigned long psr);
extern void do_fpe_trap(struct pt_regs *regs, unsigned long pc,
unsigned long npc, unsigned long psr);
extern void handle_tag_overflow(struct pt_regs *regs, unsigned long pc,
unsigned long npc, unsigned long psr);
extern void handle_watchpoint(struct pt_regs *regs, unsigned long pc,
unsigned long npc, unsigned long psr);
extern void handle_reg_access(struct pt_regs *regs, unsigned long pc,
unsigned long npc, unsigned long psr);
extern void handle_cp_disabled(struct pt_regs *regs, unsigned long pc,
unsigned long npc, unsigned long psr);
extern void handle_cp_exception(struct pt_regs *regs, unsigned long pc,
unsigned long npc, unsigned long psr);



/* entry.S */
extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
void *fpqueue, unsigned long *fpqdepth);
extern void fpload(unsigned long *fpregs, unsigned long *fsr);

#else /* CONFIG_SPARC32 */
extern void __init per_cpu_patch(void);
extern void __init sun4v_patch(void);
extern void __init boot_cpu_id_too_large(int cpu);
Expand Down Expand Up @@ -189,4 +223,5 @@ extern void handler_irq(int irq, struct pt_regs *regs);
extern void init_irqwork_curcpu(void);
extern void __cpuinit sun4v_register_mondo_queues(int this_cpu);

#endif /* CONFIG_SPARC32 */
#endif /* _ENTRY_H */
9 changes: 9 additions & 0 deletions trunk/arch/sparc/kernel/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,14 @@ extern const char *sparc_fpu_type;

extern unsigned int fsr_storage;

#ifdef CONFIG_SPARC32
/* cpu.c */
extern void cpu_probe(void);

/* traps_32.c */
extern void handle_hw_divzero(struct pt_regs *regs, unsigned long pc,
unsigned long npc, unsigned long psr);
/* muldiv.c */
extern int do_user_muldiv (struct pt_regs *, unsigned long);
#else /* CONFIG_SPARC32 */
#endif
5 changes: 2 additions & 3 deletions trunk/arch/sparc/kernel/muldiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include <asm/system.h>
#include <asm/uaccess.h>

#include "kernel.h"

/* #define DEBUG_MULDIV */

static inline int has_imm13(int insn)
Expand Down Expand Up @@ -88,9 +90,6 @@ store_reg(unsigned int result, unsigned int reg, struct pt_regs *regs)
return (put_user(result, &win->locals[reg - 16]));
}
}

extern void handle_hw_divzero (struct pt_regs *regs, unsigned long pc,
unsigned long npc, unsigned long psr);

/* Should return 0 if mul/div emulation succeeded and SIGILL should
* not be issued.
Expand Down
34 changes: 3 additions & 31 deletions trunk/arch/sparc/kernel/traps_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,10 @@
#include <asm/unistd.h>
#include <asm/traps.h>

/* #define TRAP_DEBUG */

struct trap_trace_entry {
unsigned long pc;
unsigned long type;
};

void syscall_trace_entry(struct pt_regs *regs)
{
printk("%s[%d]: ", current->comm, task_pid_nr(current));
printk("scall<%d> (could be %d)\n", (int) regs->u_regs[UREG_G1],
(int) regs->u_regs[UREG_I0]);
}

void syscall_trace_exit(struct pt_regs *regs)
{
}
#include "entry.h"
#include "kernel.h"

void sun4d_nmi(struct pt_regs *regs)
{
printk("Aieee: sun4d NMI received!\n");
printk("you lose buddy boy...\n");
show_regs(regs);
prom_halt();
}
/* #define TRAP_DEBUG */

static void instruction_dump(unsigned long *pc)
{
Expand Down Expand Up @@ -134,7 +113,6 @@ void do_hw_interrupt(struct pt_regs *regs, unsigned long type)
void do_illegal_instruction(struct pt_regs *regs, unsigned long pc, unsigned long npc,
unsigned long psr)
{
extern int do_user_muldiv (struct pt_regs *, unsigned long);
siginfo_t info;

if(psr & PSR_PS)
Expand Down Expand Up @@ -195,10 +173,6 @@ void do_memaccess_unaligned(struct pt_regs *regs, unsigned long pc, unsigned lon
send_sig_info(SIGBUS, &info, current);
}

extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
void *fpqueue, unsigned long *fpqdepth);
extern void fpload(unsigned long *fpregs, unsigned long *fsr);

static unsigned long init_fsr = 0x0UL;
static unsigned long init_fregs[32] __attribute__ ((aligned (8))) =
{ ~0UL, ~0UL, ~0UL, ~0UL, ~0UL, ~0UL, ~0UL, ~0UL,
Expand Down Expand Up @@ -456,8 +430,6 @@ void do_BUG(const char *file, int line)
* up here so that timer interrupts work during initialization.
*/

extern void sparc_cpu_startup(void);

void trap_init(void)
{
extern void thread_info_offsets_are_bolixed_pete(void);
Expand Down

0 comments on commit e86c2c0

Please sign in to comment.