cpufunc.h (210311) | cpufunc.h (212532) |
---|---|
1/* $OpenBSD: pio.h,v 1.2 1998/09/15 10:50:12 pefo Exp $ */ 2 3/*- 4 * Copyright (c) 2002-2004 Juli Mallett. 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: --- 39 unchanged lines hidden (view full) --- 48 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 49 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 50 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 53 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 54 * 55 * JNPR: cpufunc.h,v 1.5 2007/08/09 11:23:32 katta | 1/* $OpenBSD: pio.h,v 1.2 1998/09/15 10:50:12 pefo Exp $ */ 2 3/*- 4 * Copyright (c) 2002-2004 Juli Mallett. 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: --- 39 unchanged lines hidden (view full) --- 48 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 49 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 50 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 53 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 54 * 55 * JNPR: cpufunc.h,v 1.5 2007/08/09 11:23:32 katta |
56 * $FreeBSD: head/sys/mips/include/cpufunc.h 210311 2010-07-20 19:25:11Z jmallett $ | 56 * $FreeBSD: head/sys/mips/include/cpufunc.h 212532 2010-09-13 05:03:37Z jchandra $ |
57 */ 58 59#ifndef _MACHINE_CPUFUNC_H_ 60#define _MACHINE_CPUFUNC_H_ 61 62#include <sys/types.h> 63#include <machine/cpuregs.h> 64 --- 196 unchanged lines hidden (view full) --- 261static __inline void 262intr_restore(register_t ie) 263{ 264 if (ie == MIPS_SR_INT_IE) { 265 intr_enable(); 266 } 267} 268 | 57 */ 58 59#ifndef _MACHINE_CPUFUNC_H_ 60#define _MACHINE_CPUFUNC_H_ 61 62#include <sys/types.h> 63#include <machine/cpuregs.h> 64 --- 196 unchanged lines hidden (view full) --- 261static __inline void 262intr_restore(register_t ie) 263{ 264 if (ie == MIPS_SR_INT_IE) { 265 intr_enable(); 266 } 267} 268 |
269static __inline uint32_t 270set_intr_mask(uint32_t mask) 271{ 272 uint32_t ostatus; 273 274 ostatus = mips_rd_status(); 275 mask = (ostatus & ~MIPS_SR_INT_MASK) | (~mask & MIPS_SR_INT_MASK); 276 mips_wr_status(mask); 277 return (ostatus); 278} 279 280static __inline uint32_t 281get_intr_mask(void) 282{ 283 284 return (mips_rd_status() & MIPS_SR_INT_MASK); 285} 286 |
|
269static __inline void 270breakpoint(void) 271{ 272 __asm __volatile ("break"); 273} 274 275#if defined(__GNUC__) && !defined(__mips_o32) 276static inline uint64_t --- 116 unchanged lines hidden --- | 287static __inline void 288breakpoint(void) 289{ 290 __asm __volatile ("break"); 291} 292 293#if defined(__GNUC__) && !defined(__mips_o32) 294static inline uint64_t --- 116 unchanged lines hidden --- |