From owner-svn-src-head@freebsd.org Wed Dec 28 03:40:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 058A4C94B91; Wed, 28 Dec 2016 03:40:56 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0E62179A; Wed, 28 Dec 2016 03:40:55 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBS3esA4064784; Wed, 28 Dec 2016 03:40:54 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBS3esDp064783; Wed, 28 Dec 2016 03:40:54 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201612280340.uBS3esDp064783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 28 Dec 2016 03:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310653 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Dec 2016 03:40:56 -0000 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)