Remove the last dregs of trapframe_t. It turns out only arm was using

this type, so remove it to make arm code more consistant with other
platforms.  Thanks to bde@ for pointing out only arm used trapframe_t.
This commit is contained in:
ian 2013-10-27 17:09:23 +00:00
parent 1e4f45b18a
commit 564ed1a304
5 changed files with 31 additions and 23 deletions

View File

@ -1721,7 +1721,7 @@ int
early_abort_fixup(arg)
void *arg;
{
trapframe_t *frame = arg;
struct trapframe *frame = arg;
u_int fault_pc;
u_int fault_instruction;
int saved_lr = 0;
@ -1862,7 +1862,7 @@ int
late_abort_fixup(arg)
void *arg;
{
trapframe_t *frame = arg;
struct trapframe *frame = arg;
u_int fault_pc;
u_int fault_instruction;
int saved_lr = 0;

View File

@ -123,8 +123,8 @@ __FBSDID("$FreeBSD$");
#endif
void swi_handler(trapframe_t *);
void undefinedinstruction(trapframe_t *);
void swi_handler(struct trapframe *);
void undefinedinstruction(struct trapframe *);
#include <machine/disassem.h>
#include <machine/machdep.h>
@ -145,13 +145,17 @@ struct ksig {
u_long code;
};
struct data_abort {
int (*func)(trapframe_t *, u_int, u_int, struct thread *, struct ksig *);
int (*func)(struct trapframe *, u_int, u_int, struct thread *,
struct ksig *);
const char *desc;
};
static int dab_fatal(trapframe_t *, u_int, u_int, struct thread *, struct ksig *);
static int dab_align(trapframe_t *, u_int, u_int, struct thread *, struct ksig *);
static int dab_buserr(trapframe_t *, u_int, u_int, struct thread *, struct ksig *);
static int dab_fatal(struct trapframe *, u_int, u_int, struct thread *,
struct ksig *);
static int dab_align(struct trapframe *, u_int, u_int, struct thread *,
struct ksig *);
static int dab_buserr(struct trapframe *, u_int, u_int, struct thread *,
struct ksig *);
static const struct data_abort data_aborts[] = {
{dab_fatal, "Vector Exception"},
@ -196,7 +200,8 @@ call_trapsignal(struct thread *td, int sig, u_long code)
}
static __inline int
data_abort_fixup(trapframe_t *tf, u_int fsr, u_int far, struct thread *td, struct ksig *ksig)
data_abort_fixup(struct trapframe *tf, u_int fsr, u_int far, struct thread *td,
struct ksig *ksig)
{
#ifdef CPU_ABORT_FIXUP_REQUIRED
int error;
@ -226,7 +231,7 @@ data_abort_fixup(trapframe_t *tf, u_int fsr, u_int far, struct thread *td, struc
}
void
data_abort_handler(trapframe_t *tf)
data_abort_handler(struct trapframe *tf)
{
struct vm_map *map;
struct pcb *pcb;
@ -482,7 +487,8 @@ data_abort_handler(trapframe_t *tf)
* Note: If 'l' is NULL, we assume we're dealing with a prefetch abort.
*/
static int
dab_fatal(trapframe_t *tf, u_int fsr, u_int far, struct thread *td, struct ksig *ksig)
dab_fatal(struct trapframe *tf, u_int fsr, u_int far, struct thread *td,
struct ksig *ksig)
{
const char *mode;
@ -538,7 +544,8 @@ dab_fatal(trapframe_t *tf, u_int fsr, u_int far, struct thread *td, struct ksig
* deliver a bus error to the process.
*/
static int
dab_align(trapframe_t *tf, u_int fsr, u_int far, struct thread *td, struct ksig *ksig)
dab_align(struct trapframe *tf, u_int fsr, u_int far, struct thread *td,
struct ksig *ksig)
{
/* Alignment faults are always fatal if they occur in kernel mode */
@ -586,7 +593,8 @@ dab_align(trapframe_t *tf, u_int fsr, u_int far, struct thread *td, struct ksig
* In all other cases, these data aborts are considered fatal.
*/
static int
dab_buserr(trapframe_t *tf, u_int fsr, u_int far, struct thread *td, struct ksig *ksig)
dab_buserr(struct trapframe *tf, u_int fsr, u_int far, struct thread *td,
struct ksig *ksig)
{
struct pcb *pcb = td->td_pcb;
@ -607,7 +615,7 @@ dab_buserr(trapframe_t *tf, u_int fsr, u_int far, struct thread *td, struct ksig
* If the current trapframe is at the top of the kernel stack,
* the fault _must_ have come from user mode.
*/
if (tf != ((trapframe_t *)pcb->un_32.pcb32_sp) - 1) {
if (tf != ((struct trapframe *)pcb->un_32.pcb32_sp) - 1) {
/*
* Kernel mode. We're either about to die a
* spectacular death, or pcb_onfault will come
@ -660,7 +668,7 @@ dab_buserr(trapframe_t *tf, u_int fsr, u_int far, struct thread *td, struct ksig
}
static __inline int
prefetch_abort_fixup(trapframe_t *tf, struct ksig *ksig)
prefetch_abort_fixup(struct trapframe *tf, struct ksig *ksig)
{
#ifdef CPU_ABORT_FIXUP_REQUIRED
int error;
@ -691,7 +699,7 @@ prefetch_abort_fixup(trapframe_t *tf, struct ksig *ksig)
}
/*
* void prefetch_abort_handler(trapframe_t *tf)
* void prefetch_abort_handler(struct trapframe *tf)
*
* Abort handler called when instruction execution occurs at
* a non existent or restricted (access permissions) memory page.
@ -702,7 +710,7 @@ prefetch_abort_fixup(trapframe_t *tf, struct ksig *ksig)
* Otherwise fault the page in and try again.
*/
void
prefetch_abort_handler(trapframe_t *tf)
prefetch_abort_handler(struct trapframe *tf)
{
struct thread *td;
struct proc * p;
@ -907,7 +915,7 @@ cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa)
#include "../../kern/subr_syscall.c"
static void
syscall(struct thread *td, trapframe_t *frame)
syscall(struct thread *td, struct trapframe *frame)
{
struct syscall_args sa;
int error;
@ -932,7 +940,7 @@ syscall(struct thread *td, trapframe_t *frame)
}
void
swi_handler(trapframe_t *frame)
swi_handler(struct trapframe *frame)
{
struct thread *td = curthread;

View File

@ -166,7 +166,7 @@ undefined_init()
void
undefinedinstruction(trapframe_t *frame)
undefinedinstruction(struct trapframe *frame)
{
struct thread *td;
u_int fault_pc;

View File

@ -295,7 +295,7 @@ sf_buf_alloc(struct vm_page *m, int flags)
void
cpu_set_syscall_retval(struct thread *td, int error)
{
trapframe_t *frame;
struct trapframe *frame;
int fixup;
#ifdef __ARMEB__
uint32_t insn;

View File

@ -59,7 +59,7 @@
* Trap frame. Pushed onto the kernel stack on a trap (synchronous exception).
*/
typedef struct trapframe {
struct trapframe {
register_t tf_spsr; /* Zero on arm26 */
register_t tf_r0;
register_t tf_r1;
@ -80,7 +80,7 @@ typedef struct trapframe {
register_t tf_svc_lr; /* Not used on arm26 */
register_t tf_pc;
register_t tf_pad;
} trapframe_t;
};
/* Register numbers */
#define tf_r13 tf_usr_sp