summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2022-02-01 18:09:01 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2022-02-01 18:09:01 +0000
commit37b6e53e336e1319bbeca5a85564a574d4f9192a (patch)
tree5eb592cec6bf09991d94239ed3e07a197a74824e /sys/dev
parent757cb4c907be3387480b19d514315ac0cee35f6e (diff)
GPE_DIRECT is calling the AML parser from interrupt context, which is
not permitted. Luckily nothing is using GPE_DIRECT anymore, so this code can be deleted. ok kettenis
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpi.c22
-rw-r--r--sys/dev/acpi/acpivar.h3
2 files changed, 6 insertions, 19 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index dd0c4d1e847..acbaa1b07c0 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.406 2022/01/26 14:39:07 kettenis Exp $ */
+/* $OpenBSD: acpi.c,v 1.407 2022/02/01 18:09:00 deraadt Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -2092,21 +2092,9 @@ acpi_interrupt(void *arg)
/* Signal this GPE */
gpe = idx + jdx;
- if (sc->gpe_table[gpe].flags & GPE_DIRECT) {
- dnprintf(10, "directly handle gpe: %x\n",
- gpe);
- sc->gpe_table[gpe].handler(sc, gpe,
- sc->gpe_table[gpe].arg);
- if (sc->gpe_table[gpe].flags &
- GPE_LEVEL)
- acpi_gpe(sc, gpe,
- sc->gpe_table[gpe].arg);
- } else {
- sc->gpe_table[gpe].active = 1;
- dnprintf(10, "queue gpe: %x\n", gpe);
- acpi_addtask(sc, acpi_gpe_task, NULL,
- gpe);
- }
+ sc->gpe_table[gpe].active = 1;
+ dnprintf(10, "queue gpe: %x\n", gpe);
+ acpi_addtask(sc, acpi_gpe_task, NULL, gpe);
/*
* Edge interrupts need their STS bits cleared
@@ -2281,7 +2269,7 @@ acpi_set_gpehandler(struct acpi_softc *sc, int gpe, int (*handler)
return -EINVAL;
if (!(flags & (GPE_LEVEL | GPE_EDGE)))
return -EINVAL;
- if (ptbl->handler != NULL && !(flags & GPE_DIRECT))
+ if (ptbl->handler != NULL)
printf("%s: GPE 0x%.2x already enabled\n", DEVNAME(sc), gpe);
dnprintf(50, "Adding GPE handler 0x%.2x (%s)\n", gpe,
diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h
index ff544e70911..9058193e4b4 100644
--- a/sys/dev/acpi/acpivar.h
+++ b/sys/dev/acpi/acpivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpivar.h,v 1.116 2022/01/12 11:18:30 patrick Exp $ */
+/* $OpenBSD: acpivar.h,v 1.117 2022/02/01 18:09:00 deraadt Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -295,7 +295,6 @@ extern struct acpi_softc *acpi_softc;
#define GPE_NONE 0x00
#define GPE_LEVEL 0x01
#define GPE_EDGE 0x02
-#define GPE_DIRECT 0x04
struct acpi_table {
int offset;