trap.c (225474) | trap.c (228869) |
---|---|
1/*- 2 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 3 * Copyright (C) 1995, 1996 TooLs GmbH. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * 31 * $NetBSD: trap.c,v 1.58 2002/03/04 04:07:35 dbj Exp $ 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 3 * Copyright (C) 1995, 1996 TooLs GmbH. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * 31 * $NetBSD: trap.c,v 1.58 2002/03/04 04:07:35 dbj Exp $ 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/powerpc/aim/trap.c 225474 2011-09-11 16:05:09Z kib $"); | 35__FBSDID("$FreeBSD: head/sys/powerpc/aim/trap.c 228869 2011-12-24 19:34:52Z jhibbits $"); |
36 | 36 |
37#include "opt_hwpmc_hooks.h" 38 |
|
37#include <sys/param.h> 38#include <sys/kdb.h> 39#include <sys/proc.h> 40#include <sys/ktr.h> 41#include <sys/lock.h> 42#include <sys/mutex.h> 43#include <sys/pioctl.h> 44#include <sys/ptrace.h> 45#include <sys/reboot.h> 46#include <sys/syscall.h> 47#include <sys/sysent.h> 48#include <sys/systm.h> 49#include <sys/uio.h> 50#include <sys/signalvar.h> 51#include <sys/vmmeter.h> | 39#include <sys/param.h> 40#include <sys/kdb.h> 41#include <sys/proc.h> 42#include <sys/ktr.h> 43#include <sys/lock.h> 44#include <sys/mutex.h> 45#include <sys/pioctl.h> 46#include <sys/ptrace.h> 47#include <sys/reboot.h> 48#include <sys/syscall.h> 49#include <sys/sysent.h> 50#include <sys/systm.h> 51#include <sys/uio.h> 52#include <sys/signalvar.h> 53#include <sys/vmmeter.h> |
54#ifdef HWPMC_HOOKS 55#include <sys/pmckern.h> 56#endif |
|
52 53#include <security/audit/audit.h> 54 55#include <vm/vm.h> 56#include <vm/pmap.h> 57#include <vm/vm_extern.h> 58#include <vm/vm_param.h> 59#include <vm/vm_kern.h> --- 94 unchanged lines hidden (view full) --- 154 155 type = ucode = frame->exc; 156 sig = 0; 157 user = frame->srr1 & PSL_PR; 158 159 CTR3(KTR_TRAP, "trap: %s type=%s (%s)", td->td_name, 160 trapname(type), user ? "user" : "kernel"); 161 | 57 58#include <security/audit/audit.h> 59 60#include <vm/vm.h> 61#include <vm/pmap.h> 62#include <vm/vm_extern.h> 63#include <vm/vm_param.h> 64#include <vm/vm_kern.h> --- 94 unchanged lines hidden (view full) --- 159 160 type = ucode = frame->exc; 161 sig = 0; 162 user = frame->srr1 & PSL_PR; 163 164 CTR3(KTR_TRAP, "trap: %s type=%s (%s)", td->td_name, 165 trapname(type), user ? "user" : "kernel"); 166 |
167#ifdef HWPMC_HOOKS 168 if (type == EXC_PERF && (pmc_intr != NULL)) { 169#ifdef notyet 170 (*pmc_intr)(PCPU_GET(cpuid), frame); 171 if (!user) 172 return; 173#endif 174 } 175 else 176#endif |
|
162 if (user) { 163 td->td_pticks = 0; 164 td->td_frame = frame; 165 if (td->td_ucred != p->p_ucred) 166 cred_update_thread(td); 167 168 /* User Mode Traps */ 169 switch (type) { --- 539 unchanged lines hidden --- | 177 if (user) { 178 td->td_pticks = 0; 179 td->td_frame = frame; 180 if (td->td_ucred != p->p_ucred) 181 cred_update_thread(td); 182 183 /* User Mode Traps */ 184 switch (type) { --- 539 unchanged lines hidden --- |