Deleted Added
full compact
cpufunc.h (87702) cpufunc.h (88088)
1/*-
2 * Copyright (c) 1998 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1998 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/powerpc/include/cpufunc.h 87702 2001-12-11 23:33:44Z jhb $
26 * $FreeBSD: head/sys/powerpc/include/cpufunc.h 88088 2001-12-18 00:27:18Z jhb $
27 */
28
29#ifndef _MACHINE_CPUFUNC_H_
30#define _MACHINE_CPUFUNC_H_
31
32#ifdef _KERNEL
33
34#include <sys/types.h>
35
36#include <machine/psl.h>
37
27 */
28
29#ifndef _MACHINE_CPUFUNC_H_
30#define _MACHINE_CPUFUNC_H_
31
32#ifdef _KERNEL
33
34#include <sys/types.h>
35
36#include <machine/psl.h>
37
38#define CRITICAL_FORK (mfmsr() |= PSL_EE)
39
38#ifdef __GNUC__
39
40static __inline void
41breakpoint(void)
42{
43
44 return;
45}

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

109 unsigned int msr;
110
111 msr = mfmsr();
112
113 return msr;
114}
115
116static __inline critical_t
40#ifdef __GNUC__
41
42static __inline void
43breakpoint(void)
44{
45
46 return;
47}

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

111 unsigned int msr;
112
113 msr = mfmsr();
114
115 return msr;
116}
117
118static __inline critical_t
117critical_enter(void)
119cpu_critical_enter(void)
118{
119
120 return ((critical_t)save_intr());
121}
122
123static __inline void
124restore_intr(unsigned int msr)
125{
126
127 mtmsr(msr);
128}
129
130static __inline void
120{
121
122 return ((critical_t)save_intr());
123}
124
125static __inline void
126restore_intr(unsigned int msr)
127{
128
129 mtmsr(msr);
130}
131
132static __inline void
131critical_exit(critical_t msr)
133cpu_critical_exit(critical_t msr)
132{
133
134 return (restore_intr((unsigned int)msr));
135}
136
137static __inline void
138powerpc_mb(void)
139{

--- 17 unchanged lines hidden ---
134{
135
136 return (restore_intr((unsigned int)msr));
137}
138
139static __inline void
140powerpc_mb(void)
141{

--- 17 unchanged lines hidden ---