Deleted Added
full compact
cpu.h (210158) cpu.h (232630)
1/* $OpenBSD: cpu.h,v 1.4 1998/09/15 10:50:12 pefo Exp $ */
2
3/*-
4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Ralph Campbell and Rick Macklem.

--- 27 unchanged lines hidden (view full) ---

36 * its documentation for any purpose and without fee is hereby granted,
37 * provided that the above copyright notice appears in all copies.
38 * Digital Equipment Corporation makes no representations about the
39 * suitability of this software for any purpose. It is provided "as is"
40 * without express or implied warranty.
41 *
42 * from: @(#)cpu.h 8.4 (Berkeley) 1/4/94
43 * JNPR: cpu.h,v 1.9.2.2 2007/09/10 08:23:46 girish
1/* $OpenBSD: cpu.h,v 1.4 1998/09/15 10:50:12 pefo Exp $ */
2
3/*-
4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Ralph Campbell and Rick Macklem.

--- 27 unchanged lines hidden (view full) ---

36 * its documentation for any purpose and without fee is hereby granted,
37 * provided that the above copyright notice appears in all copies.
38 * Digital Equipment Corporation makes no representations about the
39 * suitability of this software for any purpose. It is provided "as is"
40 * without express or implied warranty.
41 *
42 * from: @(#)cpu.h 8.4 (Berkeley) 1/4/94
43 * JNPR: cpu.h,v 1.9.2.2 2007/09/10 08:23:46 girish
44 * $FreeBSD: head/sys/mips/include/cpu.h 210158 2010-07-16 06:09:51Z imp $
44 * $FreeBSD: head/sys/mips/include/cpu.h 232630 2012-03-06 23:08:02Z jmallett $
45 */
46
47#ifndef _MACHINE_CPU_H_
48#define _MACHINE_CPU_H_
49
50#include <machine/endian.h>
51
52/* BEGIN: these are going away */
53
45 */
46
47#ifndef _MACHINE_CPU_H_
48#define _MACHINE_CPU_H_
49
50#include <machine/endian.h>
51
52/* BEGIN: these are going away */
53
54#define SR_KSU_MASK 0x00000018
55#define SR_KSU_USER 0x00000010
56#define SR_KSU_SUPER 0x00000008
57#define SR_KSU_KERNEL 0x00000000
58
59#define soft_int_mask(softintr) (1 << ((softintr) + 8))
60#define hard_int_mask(hardintr) (1 << ((hardintr) + 10))
61
62/* END: These are going away */
63
64/*
65 * Exported definitions unique to mips cpu support.
66 */
67
68#ifndef _LOCORE
69#include <machine/cpufunc.h>
70#include <machine/frame.h>
71
54#define soft_int_mask(softintr) (1 << ((softintr) + 8))
55#define hard_int_mask(hardintr) (1 << ((hardintr) + 10))
56
57/* END: These are going away */
58
59/*
60 * Exported definitions unique to mips cpu support.
61 */
62
63#ifndef _LOCORE
64#include <machine/cpufunc.h>
65#include <machine/frame.h>
66
72#define TRAPF_USERMODE(framep) (((framep)->sr & SR_KSU_USER) != 0)
67#define TRAPF_USERMODE(framep) (((framep)->sr & MIPS_SR_KSU_USER) != 0)
73#define TRAPF_PC(framep) ((framep)->pc)
74#define cpu_getstack(td) ((td)->td_frame->sp)
75#define cpu_setstack(td, nsp) ((td)->td_frame->sp = (nsp))
76#define cpu_spinwait() /* nothing */
77
78/*
79 * A machine-independent interface to the CPU's counter.
80 */

--- 14 unchanged lines hidden ---
68#define TRAPF_PC(framep) ((framep)->pc)
69#define cpu_getstack(td) ((td)->td_frame->sp)
70#define cpu_setstack(td, nsp) ((td)->td_frame->sp = (nsp))
71#define cpu_spinwait() /* nothing */
72
73/*
74 * A machine-independent interface to the CPU's counter.
75 */

--- 14 unchanged lines hidden ---