Date: Wed, 28 Dec 2016 03:40:54 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310653 - head/sys/powerpc/powerpc Message-ID: <201612280340.uBS3esDp064783@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Wed Dec 28 03:40:54 2016 New Revision: 310653 URL: https://svnweb.freebsd.org/changeset/base/310653 Log: Restrict SLB handler to powerpc64 and AIM Only Book-S has SLBs. Book-E does not, so restrict it to only Book-S (which we call AIM). Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Wed Dec 28 03:19:59 2016 (r310652) +++ head/sys/powerpc/powerpc/trap.c Wed Dec 28 03:40:54 2016 (r310653) @@ -88,7 +88,7 @@ static int fix_unaligned(struct thread * static int handle_onfault(struct trapframe *frame); static void syscall(struct trapframe *frame); -#ifdef __powerpc64__ +#if defined(__powerpc64__) && defined(AIM) void handle_kernel_slb_spill(int, register_t, register_t); static int handle_user_slb_spill(pmap_t pm, vm_offset_t addr); extern int n_slbs; @@ -208,7 +208,7 @@ trap(struct trapframe *frame) ucode = TRAP_TRACE; break; -#ifdef __powerpc64__ +#if defined(__powerpc64__) && defined(AIM) case EXC_ISE: case EXC_DSE: if (handle_user_slb_spill(&p->p_vmspace->vm_pmap, @@ -347,7 +347,7 @@ trap(struct trapframe *frame) } break; #endif -#ifdef __powerpc64__ +#if defined(__powerpc64__) && defined(AIM) case EXC_DSE: if ((frame->dar & SEGMENT_MASK) == USER_ADDR) { __asm __volatile ("slbmte %0, %1" :: @@ -578,7 +578,7 @@ syscall(struct trapframe *frame) td = curthread; td->td_frame = frame; -#ifdef __powerpc64__ +#if defined(__powerpc64__) && defined(AIM) /* * Speculatively restore last user SLB segment, which we know is * invalid already, since we are likely to do copyin()/copyout(). @@ -591,7 +591,7 @@ syscall(struct trapframe *frame) syscallret(td, error, &sa); } -#ifdef __powerpc64__ +#if defined(__powerpc64__) && defined(AIM) /* Handle kernel SLB faults -- runs in real mode, all seat belts off */ void handle_kernel_slb_spill(int type, register_t dar, register_t srr0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612280340.uBS3esDp064783>