svn commit: r278630 - in stable/10/sys/arm: arm include
Ian Lepore
ian at FreeBSD.org
Thu Feb 12 19:35:48 UTC 2015
Author: ian
Date: Thu Feb 12 19:35:46 2015
New Revision: 278630
URL: https://svnweb.freebsd.org/changeset/base/278630
Log:
MFC r276206:
For data and instruction prefetch aborts, call the same handler in the C
code, passing a 0/1 flag that indicates which type of abort it was. This
sets the stage for unifying the handling of page faults in a single routine.
Modified:
stable/10/sys/arm/arm/exception.S
stable/10/sys/arm/arm/trap.c
stable/10/sys/arm/include/machdep.h
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/arm/arm/exception.S
==============================================================================
--- stable/10/sys/arm/arm/exception.S Thu Feb 12 19:32:07 2015 (r278629)
+++ stable/10/sys/arm/arm/exception.S Thu Feb 12 19:35:46 2015 (r278630)
@@ -320,7 +320,8 @@ ASENTRY_NP(prefetch_abort_entry)
PUSHFRAMEINSVC /* mode stack, build trapframe there. */
adr lr, exception_exit /* Return from handler via standard */
mov r0, sp /* exception exit routine. Pass the */
- b prefetch_abort_handler /* trapframe to the handler. */
+ mov r1, #1 /* Type flag */
+ b _C_LABEL(abort_handler)
END(prefetch_abort_entry)
/*
@@ -337,9 +338,10 @@ ASENTRY_NP(data_abort_entry)
#endif
sub lr, lr, #8 /* Adjust the lr. Transition to scv32 */
PUSHFRAMEINSVC /* mode stack, build trapframe there. */
- adr lr, exception_exit /* Return from handler via standard */
- mov r0, sp /* exception exit routine. Pass the */
- b data_abort_handler /* trapframe to the handler. */
+ adr lr, exception_exit /* Exception exit routine */
+ mov r0, sp /* Trapframe to the handler */
+ mov r1, #0 /* Type flag */
+ b _C_LABEL(abort_handler)
END(data_abort_entry)
/*
Modified: stable/10/sys/arm/arm/trap.c
==============================================================================
--- stable/10/sys/arm/arm/trap.c Thu Feb 12 19:32:07 2015 (r278629)
+++ stable/10/sys/arm/arm/trap.c Thu Feb 12 19:35:46 2015 (r278630)
@@ -152,6 +152,7 @@ static int dab_align(struct trapframe *,
struct ksig *);
static int dab_buserr(struct trapframe *, u_int, u_int, struct thread *,
struct ksig *);
+static void prefetch_abort_handler(struct trapframe *);
static const struct data_abort data_aborts[] = {
{dab_fatal, "Vector Exception"},
@@ -196,7 +197,7 @@ call_trapsignal(struct thread *td, int s
}
void
-data_abort_handler(struct trapframe *tf)
+abort_handler(struct trapframe *tf, int type)
{
struct vm_map *map;
struct pcb *pcb;
@@ -209,6 +210,8 @@ data_abort_handler(struct trapframe *tf)
struct ksig ksig;
struct proc *p;
+ if (type == 1)
+ return (prefetch_abort_handler(tf));
/* Grab FAR/FSR before enabling interrupts */
far = cpu_faultaddress();
@@ -625,7 +628,7 @@ dab_buserr(struct trapframe *tf, u_int f
* does no have read permission so send it a signal.
* Otherwise fault the page in and try again.
*/
-void
+static void
prefetch_abort_handler(struct trapframe *tf)
{
struct thread *td;
Modified: stable/10/sys/arm/include/machdep.h
==============================================================================
--- stable/10/sys/arm/include/machdep.h Thu Feb 12 19:32:07 2015 (r278629)
+++ stable/10/sys/arm/include/machdep.h Thu Feb 12 19:35:46 2015 (r278630)
@@ -20,8 +20,7 @@ struct trapframe;
void arm_lock_cache_line(vm_offset_t);
void init_proc0(vm_offset_t kstack);
void halt(void);
-void data_abort_handler(struct trapframe *);
-void prefetch_abort_handler(struct trapframe *);
+void abort_handler(struct trapframe *, int );
void set_stackptrs(int cpu);
void undefinedinstruction_bounce(struct trapframe *);
More information about the svn-src-all
mailing list