diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2019-03-24 06:19:27 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2019-03-24 06:19:27 +0000 |
commit | 6bb64297ca06e895a560bc9c93f00ad6b946c17a (patch) | |
tree | 2de0a4f725225155ba8fdb11ae49a278ec583b06 /sys/arch | |
parent | 6bb840998034aa0dae0d79645b7b125530952d80 (diff) |
Add intr_{disable,restore}() for alpha.
Reminded by deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/include/cpu.h | 14 | ||||
-rw-r--r-- | sys/arch/alpha/include/intr.h | 3 | ||||
-rw-r--r-- | sys/arch/alpha/include/param.h | 6 |
3 files changed, 16 insertions, 7 deletions
diff --git a/sys/arch/alpha/include/cpu.h b/sys/arch/alpha/include/cpu.h index 137c1070d92..4a67099a8d5 100644 --- a/sys/arch/alpha/include/cpu.h +++ b/sys/arch/alpha/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.60 2018/12/05 10:28:21 jsg Exp $ */ +/* $OpenBSD: cpu.h,v 1.61 2019/03/24 06:19:26 visa Exp $ */ /* $NetBSD: cpu.h,v 1.45 2000/08/21 02:03:12 thorpej Exp $ */ /*- @@ -424,5 +424,17 @@ void alpha_enable_fp(struct proc *, int); #include <sys/mplock.h> #endif +static inline u_long +intr_disable(void) +{ + return (u_long)splhigh(); +} + +static inline void +intr_restore(u_long s) +{ + splx((int)s); +} + #endif /* _KERNEL */ #endif /* _MACHINE_CPU_H_ */ diff --git a/sys/arch/alpha/include/intr.h b/sys/arch/alpha/include/intr.h index 64ce4ee5d76..10349559f4f 100644 --- a/sys/arch/alpha/include/intr.h +++ b/sys/arch/alpha/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.48 2018/08/20 15:02:07 visa Exp $ */ +/* $OpenBSD: intr.h,v 1.49 2019/03/24 06:19:26 visa Exp $ */ /* $NetBSD: intr.h,v 1.26 2000/06/03 20:47:41 thorpej Exp $ */ /*- @@ -172,6 +172,7 @@ void splassert_check(int, const char *); /* IPL-raising functions/macros */ int splraise(int); +int spl0(void); #define splsoft() splraise(IPL_SOFTINT) #define splsoftserial() splsoft() diff --git a/sys/arch/alpha/include/param.h b/sys/arch/alpha/include/param.h index 3e261d0e6d0..b1e67f531c7 100644 --- a/sys/arch/alpha/include/param.h +++ b/sys/arch/alpha/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.42 2018/09/14 13:58:20 claudio Exp $ */ +/* $OpenBSD: param.h,v 1.43 2019/03/24 06:19:26 visa Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -84,10 +84,6 @@ void delay(unsigned long); #define DELAY(n) delay(n) -/* XXX THE FOLLOWING PROTOTYPE BELONGS IN INTR.H */ -int spl0(void); /* drop ipl to zero */ -/* XXX END INTR.H */ - /* XXX THE FOLLOWING PROTOTYPE SHOULD BE A BUS.H INTERFACE */ paddr_t alpha_XXX_dmamap(vaddr_t); /* XXX END BUS.H */ |