svn commit: r257217 - in head/sys/arm: arm include
Ian Lepore
ian at FreeBSD.org
Sun Oct 27 17:09:25 UTC 2013
Author: ian
Date: Sun Oct 27 17:09:23 2013
New Revision: 257217
URL: http://svnweb.freebsd.org/changeset/base/257217
Log:
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.
Modified:
head/sys/arm/arm/cpufunc.c
head/sys/arm/arm/trap.c
head/sys/arm/arm/undefined.c
head/sys/arm/arm/vm_machdep.c
head/sys/arm/include/frame.h
Modified: head/sys/arm/arm/cpufunc.c
==============================================================================
--- head/sys/arm/arm/cpufunc.c Sun Oct 27 16:31:12 2013 (r257216)
+++ head/sys/arm/arm/cpufunc.c Sun Oct 27 17:09:23 2013 (r257217)
@@ -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;
Modified: head/sys/arm/arm/trap.c
==============================================================================
--- head/sys/arm/arm/trap.c Sun Oct 27 16:31:12 2013 (r257216)
+++ head/sys/arm/arm/trap.c Sun Oct 27 17:09:23 2013 (r257217)
@@ -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 s
}
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
}
void
-data_abort_handler(trapframe_t *tf)
+data_abort_handler(struct trapframe *tf)
{
struct vm_map *map;
struct pcb *pcb;
@@ -482,7 +487,8 @@ out:
* 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_
* 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_
* 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
* 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
}
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, st
}
/*
- * 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, st
* 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
#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 *
}
void
-swi_handler(trapframe_t *frame)
+swi_handler(struct trapframe *frame)
{
struct thread *td = curthread;
Modified: head/sys/arm/arm/undefined.c
==============================================================================
--- head/sys/arm/arm/undefined.c Sun Oct 27 16:31:12 2013 (r257216)
+++ head/sys/arm/arm/undefined.c Sun Oct 27 17:09:23 2013 (r257217)
@@ -166,7 +166,7 @@ undefined_init()
void
-undefinedinstruction(trapframe_t *frame)
+undefinedinstruction(struct trapframe *frame)
{
struct thread *td;
u_int fault_pc;
Modified: head/sys/arm/arm/vm_machdep.c
==============================================================================
--- head/sys/arm/arm/vm_machdep.c Sun Oct 27 16:31:12 2013 (r257216)
+++ head/sys/arm/arm/vm_machdep.c Sun Oct 27 17:09:23 2013 (r257217)
@@ -295,7 +295,7 @@ done:
void
cpu_set_syscall_retval(struct thread *td, int error)
{
- trapframe_t *frame;
+ struct trapframe *frame;
int fixup;
#ifdef __ARMEB__
uint32_t insn;
Modified: head/sys/arm/include/frame.h
==============================================================================
--- head/sys/arm/include/frame.h Sun Oct 27 16:31:12 2013 (r257216)
+++ head/sys/arm/include/frame.h Sun Oct 27 17:09:23 2013 (r257217)
@@ -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
More information about the svn-src-head
mailing list