diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/include/cpufunc.h | 8 | ||||
-rw-r--r-- | sys/arch/i386/include/cpufunc.h | 8 | ||||
-rw-r--r-- | sys/dev/acpi/acpi.c | 10 |
3 files changed, 19 insertions, 7 deletions
diff --git a/sys/arch/amd64/include/cpufunc.h b/sys/arch/amd64/include/cpufunc.h index a647eaab8b1..60c9de76725 100644 --- a/sys/arch/amd64/include/cpufunc.h +++ b/sys/arch/amd64/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpufunc.h,v 1.25 2018/04/24 20:33:28 mlarkin Exp $ */ +/* $OpenBSD: cpufunc.h,v 1.26 2018/06/30 10:16:35 kettenis Exp $ */ /* $NetBSD: cpufunc.h,v 1.3 2003/05/08 10:27:43 fvdl Exp $ */ /*- @@ -179,6 +179,12 @@ write_rflags(u_long ef) __asm volatile("pushq %0; popfq" : : "r" (ef)); } +static __inline void +intr_enable(void) +{ + enable_intr(); +} + static __inline u_long intr_disable(void) { diff --git a/sys/arch/i386/include/cpufunc.h b/sys/arch/i386/include/cpufunc.h index 194197d574a..6d0dba811fe 100644 --- a/sys/arch/i386/include/cpufunc.h +++ b/sys/arch/i386/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpufunc.h,v 1.28 2018/04/11 15:44:08 bluhm Exp $ */ +/* $OpenBSD: cpufunc.h,v 1.29 2018/06/30 10:16:35 kettenis Exp $ */ /* $NetBSD: cpufunc.h,v 1.8 1994/10/27 04:15:59 cgd Exp $ */ /* @@ -183,6 +183,12 @@ write_eflags(u_int ef) __asm volatile("pushl %0; popfl" : : "r" (ef)); } +static inline void +intr_enable(void) +{ + enable_intr(); +} + static inline u_long intr_disable(void) { diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 8a4ee6657cb..9e42f1899e6 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.349 2018/06/29 17:39:18 kettenis Exp $ */ +/* $OpenBSD: acpi.c,v 1.350 2018/06/30 10:16:35 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -2360,7 +2360,7 @@ acpi_sleep_pm(struct acpi_softc *sc, int state) uint16_t rega, regb, regra, regrb; int retry = 0; - disable_intr(); + intr_disable(); /* Clear WAK_STS bit */ acpi_write_pmreg(sc, ACPIREG_PM1_STS, 0, ACPI_PM1_WAK_STS); @@ -2562,7 +2562,7 @@ acpi_sleep_state(struct acpi_softc *sc, int sleepmode) resettodr(); s = splhigh(); - disable_intr(); /* PSL_I for resume; PIC/APIC broken until repair */ + intr_disable(); /* PSL_I for resume; PIC/APIC broken until repair */ cold = 2; /* Force other code to delay() instead of tsleep() */ if (config_suspend_all(DVACT_SUSPEND) != 0) @@ -2610,7 +2610,7 @@ fail_pts: fail_suspend: cold = 0; - enable_intr(); + intr_enable(); splx(s); acpibtn_disable_psw(); /* disable _LID for wakeup */ @@ -2681,7 +2681,7 @@ acpi_powerdown(void) return; s = splhigh(); - disable_intr(); + intr_disable(); cold = 1; /* 1st powerdown AML step: _PTS(tostate) */ |