summaryrefslogtreecommitdiff
path: root/sys/arch/riscv64/include
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2021-05-13 19:26:26 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2021-05-13 19:26:26 +0000
commitd417c92ccc4a2bfd646b7afd54f74685af53be26 (patch)
tree3c25586a565b2cbf570daf7e1f07bb711beb7787 /sys/arch/riscv64/include
parentcdf0def126e5fa5047343bfde82484874c4ddde9 (diff)
Use intr_enable()/int_disable()/intr_restore() instead of
enable_interrupts()/disable_interrupts()/restore_interrupts() and remove the latter interfaces. ok mlarkin@, drahn@
Diffstat (limited to 'sys/arch/riscv64/include')
-rw-r--r--sys/arch/riscv64/include/intr.h33
1 files changed, 1 insertions, 32 deletions
diff --git a/sys/arch/riscv64/include/intr.h b/sys/arch/riscv64/include/intr.h
index 613a472b64a..6cb462e7b6d 100644
--- a/sys/arch/riscv64/include/intr.h
+++ b/sys/arch/riscv64/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.3 2021/05/12 01:20:52 jsg Exp $ */
+/* $OpenBSD: intr.h,v 1.4 2021/05/13 19:26:25 kettenis Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -150,37 +150,6 @@ extern struct riscv_intr_func riscv_intr_func;
void intr_barrier(void *);
-static inline void
-enable_interrupts(void)
-{
- __asm volatile(
- "csrsi sstatus, %0"
- :: "i" (SSTATUS_SIE)
- );
-}
-
-static inline uint64_t
-disable_interrupts(void)
-{
- uint64_t ret;
-
- __asm volatile(
- "csrrci %0, sstatus, %1"
- : "=&r" (ret) : "i" (SSTATUS_SIE)
- );
-
- return (ret & (SSTATUS_SIE));
-}
-
-static inline void
-restore_interrupts(uint64_t s)
-{
- __asm volatile(
- "csrs sstatus, %0"
- :: "r" (s & (SSTATUS_SIE))
- );
-}
-
void riscv_init_smask(void); /* XXX */
extern uint32_t riscv_smask[NIPL];