summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/arm/include/pci_machdep.h11
-rw-r--r--sys/arch/arm64/dev/acpipci.c10
-rw-r--r--sys/arch/arm64/dev/pciecam.c15
-rw-r--r--sys/arch/arm64/include/pci_machdep.h11
-rw-r--r--sys/arch/armv7/marvell/mvpcie.c10
-rw-r--r--sys/arch/armv7/vexpress/pciecam.c15
-rw-r--r--sys/dev/fdt/bcm2711_pcie.c10
-rw-r--r--sys/dev/fdt/dwpcie.c17
-rw-r--r--sys/dev/fdt/mvkpcie.c17
-rw-r--r--sys/dev/fdt/rkpcie.c14
10 files changed, 69 insertions, 61 deletions
diff --git a/sys/arch/arm/include/pci_machdep.h b/sys/arch/arm/include/pci_machdep.h
index 761a26f4813..cb8e39f3490 100644
--- a/sys/arch/arm/include/pci_machdep.h
+++ b/sys/arch/arm/include/pci_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.h,v 1.15 2018/07/09 09:53:06 patrick Exp $ */
+/* $OpenBSD: pci_machdep.h,v 1.16 2020/07/14 15:42:19 patrick Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -57,7 +57,8 @@ struct arm32_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 *);
};
@@ -87,7 +88,11 @@ struct arm32_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)
diff --git a/sys/arch/arm64/dev/acpipci.c b/sys/arch/arm64/dev/acpipci.c
index f7f556e822d..ff5e43a0134 100644
--- a/sys/arch/arm64/dev/acpipci.c
+++ b/sys/arch/arm64/dev/acpipci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpipci.c,v 1.16 2020/07/14 15:34:14 patrick Exp $ */
+/* $OpenBSD: acpipci.c,v 1.17 2020/07/14 15:42:19 patrick Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis
*
@@ -109,7 +109,7 @@ void acpipci_conf_write(void *, pcitag_t, int, pcireg_t);
int acpipci_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *acpipci_intr_string(void *, pci_intr_handle_t);
void *acpipci_intr_establish(void *, pci_intr_handle_t, int,
- int (*)(void *), void *, char *);
+ struct cpu_info *, int (*)(void *), void *, char *);
void acpipci_intr_disestablish(void *, void *);
uint32_t acpipci_iort_map_msi(pci_chipset_tag_t, pcitag_t);
@@ -432,7 +432,7 @@ acpipci_intr_string(void *v, pci_intr_handle_t ih)
void *
acpipci_intr_establish(void *v, pci_intr_handle_t ih, int level,
- int (*func)(void *), void *arg, char *name)
+ struct cpu_info *ci, int (*func)(void *), void *arg, char *name)
{
struct acpipci_softc *sc = v;
struct interrupt_controller *ic;
@@ -454,7 +454,7 @@ acpipci_intr_establish(void *v, pci_intr_handle_t ih, int level,
/* Map Requester ID through IORT to get sideband data. */
data = acpipci_iort_map_msi(ih.ih_pc, ih.ih_tag);
cookie = ic->ic_establish_msi(ic->ic_cookie, &addr,
- &data, level, NULL, func, arg, name);
+ &data, level, ci, func, arg, name);
if (cookie == NULL)
return NULL;
@@ -466,6 +466,8 @@ acpipci_intr_establish(void *v, pci_intr_handle_t ih, int level,
} else
pci_msi_enable(ih.ih_pc, ih.ih_tag, addr, data);
} else {
+ if (ci != NULL && !CPU_IS_PRIMARY(ci))
+ return NULL;
cookie = acpi_intr_establish(ih.ih_intrpin, 0, level,
func, arg, name);
}
diff --git a/sys/arch/arm64/dev/pciecam.c b/sys/arch/arm64/dev/pciecam.c
index 2a9fde7415d..11958dd20b6 100644
--- a/sys/arch/arm64/dev/pciecam.c
+++ b/sys/arch/arm64/dev/pciecam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciecam.c,v 1.9 2019/06/02 18:40:58 kettenis Exp $ */
+/* $OpenBSD: pciecam.c,v 1.10 2020/07/14 15:42:19 patrick Exp $ */
/*
* Copyright (c) 2013,2017 Patrick Wildt <patrick@blueri.se>
*
@@ -102,7 +102,8 @@ pcireg_t pciecam_conf_read(void *, pcitag_t, int);
void pciecam_conf_write(void *, pcitag_t, int, pcireg_t);
int pciecam_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *pciecam_intr_string(void *, pci_intr_handle_t);
-void *pciecam_intr_establish(void *, pci_intr_handle_t, int, int (*func)(void *), void *, char *);
+void *pciecam_intr_establish(void *, pci_intr_handle_t, int,
+ struct cpu_info *, int (*func)(void *), void *, char *);
void pciecam_intr_disestablish(void *, void *);
int pciecam_bs_map(bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *);
@@ -342,7 +343,7 @@ pciecam_intr_string(void *sc, pci_intr_handle_t ih)
void *
pciecam_intr_establish(void *self, pci_intr_handle_t ih, int level,
- int (*func)(void *), void *arg, char *name)
+ struct cpu_info *ci, int (*func)(void *), void *arg, char *name)
{
struct pciecam_softc *sc = (struct pciecam_softc *)self;
void *cookie;
@@ -354,8 +355,8 @@ pciecam_intr_establish(void *self, pci_intr_handle_t ih, int level,
/* Assume hardware passes Requester ID as sideband data. */
data = pci_requester_id(ih.ih_pc, ih.ih_tag);
- cookie = arm_intr_establish_fdt_msi(sc->sc_node, &addr,
- &data, level, func, arg, (void *)name);
+ cookie = fdt_intr_establish_msi_cpu(sc->sc_node, &addr,
+ &data, level, ci, func, arg, (void *)name);
if (cookie == NULL)
return NULL;
@@ -376,8 +377,8 @@ pciecam_intr_establish(void *self, pci_intr_handle_t ih, int level,
reg[1] = reg[2] = 0;
reg[3] = ih.ih_intrpin;
- cookie = arm_intr_establish_fdt_imap(sc->sc_node, reg,
- sizeof(reg), level, func, arg, name);
+ cookie = fdt_intr_establish_imap_cpu(sc->sc_node, reg,
+ sizeof(reg), level, ci, func, arg, name);
}
return cookie;
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)
diff --git a/sys/arch/armv7/marvell/mvpcie.c b/sys/arch/armv7/marvell/mvpcie.c
index bf09211749d..d0734973f76 100644
--- a/sys/arch/armv7/marvell/mvpcie.c
+++ b/sys/arch/armv7/marvell/mvpcie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mvpcie.c,v 1.1 2018/07/09 09:58:40 patrick Exp $ */
+/* $OpenBSD: mvpcie.c,v 1.2 2020/07/14 15:42:19 patrick Exp $ */
/*
* Copyright (c) 2018 Patrick Wildt <patrick@blueri.se>
* Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
@@ -201,7 +201,7 @@ int mvpcie_intr_map_msix(struct pci_attach_args *, int,
pci_intr_handle_t *);
const char *mvpcie_intr_string(void *, pci_intr_handle_t);
void *mvpcie_intr_establish(void *, pci_intr_handle_t, int,
- int (*)(void *), void *, char *);
+ struct cpu_info *ci, int (*)(void *), void *, char *);
void mvpcie_intr_disestablish(void *, void *);
void
@@ -823,7 +823,7 @@ mvpcie_intr_string(void *v, pci_intr_handle_t ihp)
void *
mvpcie_intr_establish(void *v, pci_intr_handle_t ihp, int level,
- int (*func)(void *), void *arg, char *name)
+ struct cpu_info *ci, int (*func)(void *), void *arg, char *name)
{
struct mvpcie_port *po = v;
struct mvpcie_intr_handle *ih = (struct mvpcie_intr_handle *)ihp;
@@ -837,8 +837,8 @@ mvpcie_intr_establish(void *v, pci_intr_handle_t ihp, int level,
reg[1] = reg[2] = 0;
reg[3] = ih->ih_intrpin;
- cookie = arm_intr_establish_fdt_imap(po->po_node, reg,
- sizeof(reg), level, func, arg, name);
+ cookie = arm_intr_establish_fdt_imap_cpu(po->po_node, reg,
+ sizeof(reg), level, ci, func, arg, name);
free(ih, M_DEVBUF, sizeof(struct mvpcie_intr_handle));
return cookie;
diff --git a/sys/arch/armv7/vexpress/pciecam.c b/sys/arch/armv7/vexpress/pciecam.c
index 0847365190d..8ab86f6f14c 100644
--- a/sys/arch/armv7/vexpress/pciecam.c
+++ b/sys/arch/armv7/vexpress/pciecam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciecam.c,v 1.1 2018/07/09 09:54:01 patrick Exp $ */
+/* $OpenBSD: pciecam.c,v 1.2 2020/07/14 15:42:19 patrick Exp $ */
/*
* Copyright (c) 2013,2017 Patrick Wildt <patrick@blueri.se>
*
@@ -102,7 +102,8 @@ int pciecam_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
int pciecam_intr_map_msi(struct pci_attach_args *, pci_intr_handle_t *);
int pciecam_intr_map_msix(struct pci_attach_args *, int, pci_intr_handle_t *);
const char *pciecam_intr_string(void *, pci_intr_handle_t);
-void *pciecam_intr_establish(void *, pci_intr_handle_t, int, int (*func)(void *), void *, char *);
+void *pciecam_intr_establish(void *, pci_intr_handle_t, int, struct cpu_info *,
+ int (*func)(void *), void *, char *);
void pciecam_intr_disestablish(void *, void *);
int pciecam_bs_map(void *, uint64_t, bus_size_t, int, bus_space_handle_t *);
@@ -368,7 +369,7 @@ pciecam_intr_string(void *sc, pci_intr_handle_t ihp)
void *
pciecam_intr_establish(void *self, pci_intr_handle_t ihp, int level,
- int (*func)(void *), void *arg, char *name)
+ struct cpu_info *ci, int (*func)(void *), void *arg, char *name)
{
struct pciecam_softc *sc = (struct pciecam_softc *)self;
struct pciecam_intr_handle *ih = (struct pciecam_intr_handle *)ihp;
@@ -379,8 +380,8 @@ pciecam_intr_establish(void *self, pci_intr_handle_t ihp, int level,
pcireg_t reg;
int off;
- cookie = arm_intr_establish_fdt_msi(sc->sc_node, &addr,
- &data, level, func, arg, (void *)name);
+ cookie = arm_intr_establish_fdt_msi_cpu(sc->sc_node, &addr,
+ &data, level, ci, func, arg, (void *)name);
if (cookie == NULL)
return NULL;
@@ -415,8 +416,8 @@ pciecam_intr_establish(void *self, pci_intr_handle_t ihp, int level,
reg[1] = reg[2] = 0;
reg[3] = ih->ih_intrpin;
- cookie = arm_intr_establish_fdt_imap(sc->sc_node, reg,
- sizeof(reg), level, func, arg, name);
+ cookie = arm_intr_establish_fdt_imap_cpu(sc->sc_node, reg,
+ sizeof(reg), level, ci, func, arg, name);
}
free(ih, M_DEVBUF, sizeof(struct pciecam_intr_handle));
diff --git a/sys/dev/fdt/bcm2711_pcie.c b/sys/dev/fdt/bcm2711_pcie.c
index 152d7cb2d02..05d1b28a206 100644
--- a/sys/dev/fdt/bcm2711_pcie.c
+++ b/sys/dev/fdt/bcm2711_pcie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcm2711_pcie.c,v 1.2 2020/04/20 16:01:39 kettenis Exp $ */
+/* $OpenBSD: bcm2711_pcie.c,v 1.3 2020/07/14 15:42:19 patrick Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
*
@@ -98,7 +98,7 @@ void bcmpcie_conf_write(void *, pcitag_t, int, pcireg_t);
int bcmpcie_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *bcmpcie_intr_string(void *, pci_intr_handle_t);
void *bcmpcie_intr_establish(void *, pci_intr_handle_t, int,
- int (*)(void *), void *, char *);
+ struct cpu_info *, int (*)(void *), void *, char *);
void bcmpcie_intr_disestablish(void *, void *);
int bcmpcie_bs_iomap(bus_space_tag_t, bus_addr_t, bus_size_t, int,
@@ -320,7 +320,7 @@ bcmpcie_intr_string(void *v, pci_intr_handle_t ih)
void *
bcmpcie_intr_establish(void *v, pci_intr_handle_t ih, int level,
- int (*func)(void *), void *arg, char *name)
+ struct cpu_info *ci, int (*func)(void *), void *arg, char *name)
{
struct bcmpcie_softc *sc = v;
int bus, dev, fn;
@@ -333,8 +333,8 @@ bcmpcie_intr_establish(void *v, pci_intr_handle_t ih, int level,
reg[1] = reg[2] = 0;
reg[3] = ih.ih_intrpin;
- return fdt_intr_establish_imap(sc->sc_node, reg, sizeof(reg),
- level, func, arg, name);
+ return fdt_intr_establish_imap_cpu(sc->sc_node, reg, sizeof(reg),
+ level, ci, func, arg, name);
}
void
diff --git a/sys/dev/fdt/dwpcie.c b/sys/dev/fdt/dwpcie.c
index cb91df25940..8b416e188e2 100644
--- a/sys/dev/fdt/dwpcie.c
+++ b/sys/dev/fdt/dwpcie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwpcie.c,v 1.21 2020/05/23 22:16:39 patrick Exp $ */
+/* $OpenBSD: dwpcie.c,v 1.22 2020/07/14 15:42:19 patrick Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
*
@@ -245,12 +245,9 @@ void dwpcie_conf_write(void *, pcitag_t, int, pcireg_t);
int dwpcie_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *dwpcie_intr_string(void *, pci_intr_handle_t);
void *dwpcie_intr_establish(void *, pci_intr_handle_t, int,
- int (*)(void *), void *, char *);
+ struct cpu_info *, int (*)(void *), void *, char *);
void dwpcie_intr_disestablish(void *, void *);
-void *dwpcie_armada8k_intr_establish(void *, pci_intr_handle_t, int,
- int (*)(void *), void *, char *);
-
int dwpcie_bs_iomap(bus_space_tag_t, bus_addr_t, bus_size_t, int,
bus_space_handle_t *);
int dwpcie_bs_memmap(bus_space_tag_t, bus_addr_t, bus_size_t, int,
@@ -1043,7 +1040,7 @@ dwpcie_intr_string(void *v, pci_intr_handle_t ih)
void *
dwpcie_intr_establish(void *v, pci_intr_handle_t ih, int level,
- int (*func)(void *), void *arg, char *name)
+ struct cpu_info *ci, int (*func)(void *), void *arg, char *name)
{
struct dwpcie_softc *sc = v;
void *cookie;
@@ -1055,8 +1052,8 @@ dwpcie_intr_establish(void *v, pci_intr_handle_t ih, int level,
/* Assume hardware passes Requester ID as sideband data. */
data = pci_requester_id(ih.ih_pc, ih.ih_tag);
- cookie = fdt_intr_establish_msi(sc->sc_node, &addr,
- &data, level, func, arg, (void *)name);
+ cookie = fdt_intr_establish_msi_cpu(sc->sc_node, &addr,
+ &data, level, ci, func, arg, (void *)name);
if (cookie == NULL)
return NULL;
@@ -1077,8 +1074,8 @@ dwpcie_intr_establish(void *v, pci_intr_handle_t ih, int level,
reg[1] = reg[2] = 0;
reg[3] = ih.ih_intrpin;
- cookie = fdt_intr_establish_imap(sc->sc_node, reg,
- sizeof(reg), level, func, arg, name);
+ cookie = fdt_intr_establish_imap_cpu(sc->sc_node, reg,
+ sizeof(reg), level, ci, func, arg, name);
}
return cookie;
diff --git a/sys/dev/fdt/mvkpcie.c b/sys/dev/fdt/mvkpcie.c
index 67a294d7b47..1e3c96b5ae4 100644
--- a/sys/dev/fdt/mvkpcie.c
+++ b/sys/dev/fdt/mvkpcie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mvkpcie.c,v 1.5 2020/07/14 15:34:15 patrick Exp $ */
+/* $OpenBSD: mvkpcie.c,v 1.6 2020/07/14 15:42:19 patrick Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
* Copyright (c) 2020 Patrick Wildt <patrick@blueri.se>
@@ -233,12 +233,9 @@ void mvkpcie_conf_write(void *, pcitag_t, int, pcireg_t);
int mvkpcie_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *mvkpcie_intr_string(void *, pci_intr_handle_t);
void *mvkpcie_intr_establish(void *, pci_intr_handle_t, int,
- int (*)(void *), void *, char *);
+ struct cpu_info *, int (*)(void *), void *, char *);
void mvkpcie_intr_disestablish(void *, void *);
-void *mvkpcie_intr_establish(void *, pci_intr_handle_t, int,
- int (*)(void *), void *, char *);
-
int mvkpcie_bs_iomap(bus_space_tag_t, bus_addr_t, bus_size_t, int,
bus_space_handle_t *);
int mvkpcie_bs_memmap(bus_space_tag_t, bus_addr_t, bus_size_t, int,
@@ -734,7 +731,7 @@ mvkpcie_intr_string(void *v, pci_intr_handle_t ih)
void *
mvkpcie_intr_establish(void *v, pci_intr_handle_t ih, int level,
- int (*func)(void *), void *arg, char *name)
+ struct cpu_info *ci, int (*func)(void *), void *arg, char *name)
{
struct mvkpcie_softc *sc = v;
void *cookie;
@@ -746,8 +743,8 @@ mvkpcie_intr_establish(void *v, pci_intr_handle_t ih, int level,
/* Assume hardware passes Requester ID as sideband data. */
data = pci_requester_id(ih.ih_pc, ih.ih_tag);
- cookie = fdt_intr_establish_msi(sc->sc_node, &addr,
- &data, level, func, arg, (void *)name);
+ cookie = fdt_intr_establish_msi_cpu(sc->sc_node, &addr,
+ &data, level, ci, func, arg, (void *)name);
if (cookie == NULL)
return NULL;
@@ -768,8 +765,8 @@ mvkpcie_intr_establish(void *v, pci_intr_handle_t ih, int level,
reg[1] = reg[2] = 0;
reg[3] = ih.ih_intrpin;
- cookie = fdt_intr_establish_imap(sc->sc_node, reg,
- sizeof(reg), level, func, arg, name);
+ cookie = fdt_intr_establish_imap_cpu(sc->sc_node, reg,
+ sizeof(reg), level, ci, func, arg, name);
}
return cookie;
diff --git a/sys/dev/fdt/rkpcie.c b/sys/dev/fdt/rkpcie.c
index 37f2b4d1d85..49765815fdf 100644
--- a/sys/dev/fdt/rkpcie.c
+++ b/sys/dev/fdt/rkpcie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rkpcie.c,v 1.10 2020/02/20 23:50:01 kurt Exp $ */
+/* $OpenBSD: rkpcie.c,v 1.11 2020/07/14 15:42:19 patrick Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
*
@@ -144,7 +144,7 @@ void rkpcie_conf_write(void *, pcitag_t, int, pcireg_t);
int rkpcie_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *rkpcie_intr_string(void *, pci_intr_handle_t);
void *rkpcie_intr_establish(void *, pci_intr_handle_t, int,
- int (*)(void *), void *, char *);
+ struct cpu_info *, int (*)(void *), void *, char *);
void rkpcie_intr_disestablish(void *, void *);
/*
@@ -580,7 +580,7 @@ rkpcie_intr_string(void *v, pci_intr_handle_t ih)
void *
rkpcie_intr_establish(void *v, pci_intr_handle_t ih, int level,
- int (*func)(void *), void *arg, char *name)
+ struct cpu_info *ci, int (*func)(void *), void *arg, char *name)
{
struct rkpcie_softc *sc = v;
void *cookie;
@@ -592,8 +592,8 @@ rkpcie_intr_establish(void *v, pci_intr_handle_t ih, int level,
/* Assume hardware passes Requester ID as sideband data. */
data = pci_requester_id(ih.ih_pc, ih.ih_tag);
- cookie = fdt_intr_establish_msi(sc->sc_node, &addr,
- &data, level, func, arg, name);
+ cookie = fdt_intr_establish_msi_cpu(sc->sc_node, &addr,
+ &data, level, ci, func, arg, name);
if (cookie == NULL)
return NULL;
@@ -610,8 +610,8 @@ rkpcie_intr_establish(void *v, pci_intr_handle_t ih, int level,
PCIE_CLIENT_INTA_UNMASK | PCIE_CLIENT_INTB_UNMASK |
PCIE_CLIENT_INTC_UNMASK | PCIE_CLIENT_INTD_UNMASK);
- cookie = fdt_intr_establish_idx(sc->sc_node, 1, level,
- func, arg, name);
+ cookie = fdt_intr_establish_idx_cpu(sc->sc_node, 1, level,
+ ci, func, arg, name);
}
return cookie;