diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-07-14 15:42:20 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-07-14 15:42:20 +0000 |
commit | c67ff7c5849eed1af4c6ae3ec3c5c86715242e9c (patch) | |
tree | 412ee54088a69dfc1e51251fc5be4c6b4008eec0 /sys/arch/arm64/include | |
parent | 0840bd11f40b2d645fadc2aad753fe79916db7da (diff) |
Implement pci_intr_establish_cpu() on arm64 and armv7. The function pointer
in the chipset tag for establishing interrupts now takes a struct cpu_info *.
The normal pci_intr_establish() macro passes NULL as ci, which indicates that
the primary CPU is to be used.
The PCI controller drivers can then simply pass the ci on to our arm64/armv7
interrupt establish "framework".
Prompted by dlg@
ok kettenis@
Diffstat (limited to 'sys/arch/arm64/include')
-rw-r--r-- | sys/arch/arm64/include/pci_machdep.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/arm64/include/pci_machdep.h b/sys/arch/arm64/include/pci_machdep.h index 24234175250..06259db8e9d 100644 --- a/sys/arch/arm64/include/pci_machdep.h +++ b/sys/arch/arm64/include/pci_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.h,v 1.6 2019/06/25 16:46:32 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.7 2020/07/14 15:42:19 patrick Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -69,7 +69,8 @@ struct arm64_pci_chipset { int, pci_intr_handle_t *); const char *(*pc_intr_string)(void *, pci_intr_handle_t); void *(*pc_intr_establish)(void *, pci_intr_handle_t, - int, int (*)(void *), void *, char *); + int, struct cpu_info *, int (*)(void *), void *, + char *); void (*pc_intr_disestablish)(void *, void *); }; @@ -99,7 +100,11 @@ struct arm64_pci_chipset { #define pci_intr_string(c, ih) \ (*(c)->pc_intr_string)((c)->pc_intr_v, (ih)) #define pci_intr_establish(c, ih, l, h, a, nm) \ - (*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (h), (a), (nm)) + (*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), NULL, (h), (a),\ + (nm)) +#define pci_intr_establish_cpu(c, ih, l, ci, h, a, nm) \ + (*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (ci), (h), (a),\ + (nm)) #define pci_intr_disestablish(c, iv) \ (*(c)->pc_intr_disestablish)((c)->pc_intr_v, (iv)) #define pci_probe_device_hook(c, a) (0) |