diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-11-03 16:21:47 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-11-03 16:21:47 +0000 |
commit | d608c982a1cc53555f1bc2cf8e639cb278d3b087 (patch) | |
tree | 9fd41e6a53775e66944bfd7e0d17a91501f32b30 /sys/powerpc/aim/trap.c | |
parent | 6604019e2651e5c8091a892c712c67a1c4278903 (diff) | |
download | FreeBSD-src-d608c982a1cc53555f1bc2cf8e639cb278d3b087.zip FreeBSD-src-d608c982a1cc53555f1bc2cf8e639cb278d3b087.tar.gz |
Fix two mistakes on 32-bit systems. The slbmte code in syscall() is 64-bit
only, and should be protected with an ifdef, and the no-execute bit in
32-bit set_user_sr() should be set before the comparison, not after, or
it will never match.
Diffstat (limited to 'sys/powerpc/aim/trap.c')
-rw-r--r-- | sys/powerpc/aim/trap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c index de4c6d8..fe2f795 100644 --- a/sys/powerpc/aim/trap.c +++ b/sys/powerpc/aim/trap.c @@ -455,12 +455,14 @@ syscall(struct trapframe *frame) td = PCPU_GET(curthread); td->td_frame = frame; +#ifdef __powerpc64__ /* * Speculatively restore last user SLB segment, which we know is * invalid already, since we are likely to do copyin()/copyout(). */ __asm __volatile ("slbmte %0, %1; isync" :: "r"(td->td_pcb->pcb_cpu.aim.usr_vsid), "r"(USER_SLB_SLBE)); +#endif error = syscallenter(td, &sa); syscallret(td, error, &sa); |