summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2016-01-10 16:42:14 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2016-01-10 16:42:14 +0000
commitf5d714b876f969adce2affd720c9237b29047693 (patch)
tree27594a95bb41f2c889fd13be830d29451361e818 /sys/powerpc/include
parentd42a26ab2089d53213cf28c22508023ea16e7efb (diff)
downloadFreeBSD-src-f5d714b876f969adce2affd720c9237b29047693.zip
FreeBSD-src-f5d714b876f969adce2affd720c9237b29047693.tar.gz
Use setjmp() instead of the identical-except-for-having-a-wrong-prototype
setfault() when testing for faults. This should also help the compiler do the right thing with this complicated-to-optimize function.
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r--sys/powerpc/include/pcb.h4
-rw-r--r--sys/powerpc/include/setjmp.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/powerpc/include/pcb.h b/sys/powerpc/include/pcb.h
index 6caf5d2..094949e 100644
--- a/sys/powerpc/include/pcb.h
+++ b/sys/powerpc/include/pcb.h
@@ -35,7 +35,7 @@
#ifndef _MACHINE_PCB_H_
#define _MACHINE_PCB_H_
-typedef register_t faultbuf[25];
+#include <machine/setjmp.h>
struct pcb {
register_t pcb_context[20]; /* non-volatile r14-r31 */
@@ -44,7 +44,7 @@ struct pcb {
register_t pcb_toc; /* toc pointer */
register_t pcb_lr; /* link register */
struct pmap *pcb_pm; /* pmap of our vmspace */
- faultbuf *pcb_onfault; /* For use during
+ jmp_buf *pcb_onfault; /* For use during
copyin/copyout */
int pcb_flags;
#define PCB_FPU 1 /* Process uses FPU */
diff --git a/sys/powerpc/include/setjmp.h b/sys/powerpc/include/setjmp.h
index e453044..b95a111 100644
--- a/sys/powerpc/include/setjmp.h
+++ b/sys/powerpc/include/setjmp.h
@@ -8,7 +8,11 @@
#include <sys/cdefs.h>
+#ifdef _KERNEL
+#define _JBLEN 25 /* Kernel doesn't save FP and Altivec regs */
+#else
#define _JBLEN 100
+#endif
/*
* jmp_buf and sigjmp_buf are encapsulated in different structs to force
OpenPOWER on IntegriCloud