summaryrefslogtreecommitdiff
path: root/sys/arch/arm64/include
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2020-07-16 12:57:31 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2020-07-16 12:57:31 +0000
commite772ce60137edb470694363d7c0a54e35ce8fee1 (patch)
tree69abd4409c6f98cbc37f1d53c871ef905f9972d6 /sys/arch/arm64/include
parent51f68d0ea30910e7e9d6abc60d15edd634fc40ec (diff)
To be able to have intr_barrier() on arm64, we need to be able to
somehow gain access to the struct cpu_info * used to establish the interrupt. One possibility is to store the pointer in the cookie returned by the establish methods. A better way would be to ask the interrupt controller directly to do barrier. This means that all external facing interrupt establish functions need to wrap the cookie in a common way. We already do this for FDT-based interrupts. Also most PCI controllers already return the cookie from the FDT API, which is already wrapped. So arm64's acpi_intr_establish() and acpipci(4) now need to explicitly wrap it, since they call ic->ic_establish directly, which does not wrap. ok dlg@
Diffstat (limited to 'sys/arch/arm64/include')
-rw-r--r--sys/arch/arm64/include/intr.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/arm64/include/intr.h b/sys/arch/arm64/include/intr.h
index 212c388da0a..c3aad4cb9ee 100644
--- a/sys/arch/arm64/include/intr.h
+++ b/sys/arch/arm64/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.13 2020/07/14 15:34:14 patrick Exp $ */
+/* $OpenBSD: intr.h,v 1.14 2020/07/16 12:57:30 patrick Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -90,6 +90,11 @@ void arm_set_intr_handler(int (*raise)(int), int (*lower)(int),
void (*x)(int), void (*setipl)(int),
void (*intr_handle)(void *));
+struct arm_intr_handle {
+ struct interrupt_controller *ih_ic;
+ void *ih_ih;
+};
+
struct arm_intr_func {
int (*raise)(int);
int (*lower)(int);