summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-07-22 18:45:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-07-22 18:45:52 +0000
commit789f154baaec675b334ee405c5fc0ce00d31604e (patch)
tree1f71497a9a92c33a1a104c1e585dad126e345e2c /sys/arch
parent0ce330d43c73814da55f95ceec87f811685c0922 (diff)
Modify pci_intr_map() implementation to pass the pci_attach_args to the
per-platform implementation, instead of selected members of it; this allows us to get rid of some globals, and paves the way for better bridge support on some models.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/pci/pci_1000.c18
-rw-r--r--sys/arch/alpha/pci/pci_1000a.c21
-rw-r--r--sys/arch/alpha/pci/pci_2100_a50.c16
-rw-r--r--sys/arch/alpha/pci/pci_550.c16
-rw-r--r--sys/arch/alpha/pci/pci_6600.c15
-rw-r--r--sys/arch/alpha/pci/pci_axppci_33.c16
-rw-r--r--sys/arch/alpha/pci/pci_eb164.c16
-rw-r--r--sys/arch/alpha/pci/pci_eb64plus.c16
-rw-r--r--sys/arch/alpha/pci/pci_kn20aa.c16
-rw-r--r--sys/arch/alpha/pci/pci_kn300.c22
-rw-r--r--sys/arch/alpha/pci/pci_machdep.h7
-rw-r--r--sys/arch/alpha/pci/pci_up1000.c11
12 files changed, 85 insertions, 105 deletions
diff --git a/sys/arch/alpha/pci/pci_1000.c b/sys/arch/alpha/pci/pci_1000.c
index 1ba0e03a74d..0edcb89b8af 100644
--- a/sys/arch/alpha/pci/pci_1000.c
+++ b/sys/arch/alpha/pci/pci_1000.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_1000.c,v 1.7 2008/06/26 05:42:09 ray Exp $ */
+/* $OpenBSD: pci_1000.c,v 1.8 2008/07/22 18:45:50 miod Exp $ */
/* $NetBSD: pci_1000.c,v 1.12 2001/07/27 00:25:20 thorpej Exp $ */
/*
@@ -84,7 +84,7 @@
static bus_space_tag_t another_mystery_icu_iot;
static bus_space_handle_t another_mystery_icu_ioh;
-int dec_1000_intr_map(void *, pcitag_t, int, int, pci_intr_handle_t *);
+int dec_1000_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *dec_1000_intr_string(void *, pci_intr_handle_t);
int dec_1000_intr_line(void *, pci_intr_handle_t);
void *dec_1000_intr_establish(void *, pci_intr_handle_t,
@@ -100,7 +100,6 @@ void dec_1000_iointr(void *arg, unsigned long vec);
void dec_1000_enable_intr(int irq);
void dec_1000_disable_intr(int irq);
void pci_1000_imi(void);
-static pci_chipset_tag_t pc_tag;
void
pci_1000_pickintr(core, iot, memt, pc)
@@ -115,7 +114,6 @@ pci_1000_pickintr(core, iot, memt, pc)
another_mystery_icu_iot = iot;
- pc_tag = pc;
if (bus_space_map(iot, 0x536, 2, 0, &another_mystery_icu_ioh))
panic("pci_1000_pickintr");
pc->pc_intr_v = core;
@@ -142,20 +140,20 @@ pci_1000_pickintr(core, iot, memt, pc)
}
int
-dec_1000_intr_map(ccv, bustag, buspin, line, ihp)
- void *ccv;
- pcitag_t bustag;
- int buspin, line;
+dec_1000_intr_map(pa, ihp)
+ struct pci_attach_args *pa;
pci_intr_handle_t *ihp;
{
- int device;
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin;
+ int device;
if (buspin == 0) /* No IRQ used. */
return 1;
if (!(1 <= buspin && buspin <= 4))
goto bad;
- pci_decompose_tag(pc_tag, bustag, NULL, &device, NULL);
+ pci_decompose_tag(pa->pa_pc, bustag, NULL, &device, NULL);
switch(device) {
case 6:
diff --git a/sys/arch/alpha/pci/pci_1000a.c b/sys/arch/alpha/pci/pci_1000a.c
index 2841a7553a9..8998babe6b8 100644
--- a/sys/arch/alpha/pci/pci_1000a.c
+++ b/sys/arch/alpha/pci/pci_1000a.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_1000a.c,v 1.8 2008/07/19 19:25:18 miod Exp $ */
+/* $OpenBSD: pci_1000a.c,v 1.9 2008/07/22 18:45:50 miod Exp $ */
/* $NetBSD: pci_1000a.c,v 1.14 2001/07/27 00:25:20 thorpej Exp $ */
/*
@@ -73,6 +73,7 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
+#include <dev/pci/ppbreg.h>
#include <alpha/pci/pci_1000a.h>
@@ -90,8 +91,7 @@
static bus_space_tag_t mystery_icu_iot;
static bus_space_handle_t mystery_icu_ioh[2];
-int dec_1000a_intr_map(void *, pcitag_t, int, int,
- pci_intr_handle_t *);
+int dec_1000a_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *dec_1000a_intr_string(void *, pci_intr_handle_t);
int dec_1000a_intr_line(void *, pci_intr_handle_t);
void *dec_1000a_intr_establish(void *, pci_intr_handle_t,
@@ -104,7 +104,6 @@ void dec_1000a_iointr(void *arg, unsigned long vec);
void dec_1000a_enable_intr(int irq);
void dec_1000a_disable_intr(int irq);
void pci_1000a_imi(void);
-static pci_chipset_tag_t pc_tag;
void
pci_1000a_pickintr(core, iot, memt, pc)
@@ -112,14 +111,10 @@ pci_1000a_pickintr(core, iot, memt, pc)
bus_space_tag_t iot, memt;
pci_chipset_tag_t pc;
{
-#if 0
- char *cp;
-#endif
int i;
mystery_icu_iot = iot;
- pc_tag = pc;
if (bus_space_map(iot, 0x54a, 2, 0, mystery_icu_ioh + 0)
|| bus_space_map(iot, 0x54c, 2, 0, mystery_icu_ioh + 1))
panic("pci_1000a_pickintr");
@@ -146,12 +141,12 @@ pci_1000a_pickintr(core, iot, memt, pc)
}
int
-dec_1000a_intr_map(ccv, bustag, buspin, line, ihp)
- void *ccv;
- pcitag_t bustag;
- int buspin, line;
+dec_1000a_intr_map(pa, ihp)
+ struct pci_attach_args *pa;
pci_intr_handle_t *ihp;
{
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin, line = pa->pa_intrline;
int imrbit = 0, device;
/*
* Get bit number in mystery ICU imr
@@ -181,7 +176,7 @@ dec_1000a_intr_map(ccv, bustag, buspin, line, ihp)
if (!(1 <= buspin && buspin <= 4))
goto bad;
- pci_decompose_tag(pc_tag, bustag, NULL, &device, NULL);
+ pci_decompose_tag(pa->pa_pc, bustag, NULL, &device, NULL);
/*
* The console places the interrupt mapping in the "line" value.
diff --git a/sys/arch/alpha/pci/pci_2100_a50.c b/sys/arch/alpha/pci/pci_2100_a50.c
index fdeaa46396a..2ebaa224f30 100644
--- a/sys/arch/alpha/pci/pci_2100_a50.c
+++ b/sys/arch/alpha/pci/pci_2100_a50.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_2100_a50.c,v 1.20 2006/06/15 20:08:29 brad Exp $ */
+/* $OpenBSD: pci_2100_a50.c,v 1.21 2008/07/22 18:45:50 miod Exp $ */
/* $NetBSD: pci_2100_a50.c,v 1.12 1996/11/13 21:13:29 cgd Exp $ */
/*
@@ -52,8 +52,7 @@
#include "sio.h"
-int dec_2100_a50_intr_map(void *, pcitag_t, int, int,
- pci_intr_handle_t *);
+int dec_2100_a50_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *dec_2100_a50_intr_string(void *, pci_intr_handle_t);
int dec_2100_a50_intr_line(void *, pci_intr_handle_t);
void *dec_2100_a50_intr_establish(void *, pci_intr_handle_t,
@@ -97,14 +96,13 @@ pci_2100_a50_pickintr(acp)
}
int
-dec_2100_a50_intr_map(acv, bustag, buspin, line, ihp)
- void *acv;
- pcitag_t bustag;
- int buspin, line;
+dec_2100_a50_intr_map(pa, ihp)
+ struct pci_attach_args *pa;
pci_intr_handle_t *ihp;
{
- struct apecs_config *acp = acv;
- pci_chipset_tag_t pc = &acp->ac_pc;
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin;
+ pci_chipset_tag_t pc = pa->pa_pc;
int device, pirq;
pcireg_t pirqreg;
u_int8_t pirqline;
diff --git a/sys/arch/alpha/pci/pci_550.c b/sys/arch/alpha/pci/pci_550.c
index e4b6d9fd2fd..32515925ad3 100644
--- a/sys/arch/alpha/pci/pci_550.c
+++ b/sys/arch/alpha/pci/pci_550.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_550.c,v 1.18 2008/06/26 05:42:09 ray Exp $ */
+/* $OpenBSD: pci_550.c,v 1.19 2008/07/22 18:45:51 miod Exp $ */
/* $NetBSD: pci_550.c,v 1.18 2000/06/29 08:58:48 mrg Exp $ */
/*-
@@ -87,8 +87,7 @@
#include <alpha/pci/siovar.h>
#endif
-int dec_550_intr_map(void *, pcitag_t, int, int,
- pci_intr_handle_t *);
+int dec_550_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *dec_550_intr_string(void *, pci_intr_handle_t);
int dec_550_intr_line(void *, pci_intr_handle_t);
void *dec_550_intr_establish(void *, pci_intr_handle_t,
@@ -167,14 +166,13 @@ pci_550_pickintr(ccp)
}
int
-dec_550_intr_map(ccv, bustag, buspin, line, ihp)
- void *ccv;
- pcitag_t bustag;
- int buspin, line;
+dec_550_intr_map(pa, ihp)
+ struct pci_attach_args *pa;
pci_intr_handle_t *ihp;
{
- struct cia_config *ccp = ccv;
- pci_chipset_tag_t pc = &ccp->cc_pc;
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin, line = pa->pa_intrline;
+ pci_chipset_tag_t pc = pa->pa_pc;
int bus, device, function;
if (buspin == 0) {
diff --git a/sys/arch/alpha/pci/pci_6600.c b/sys/arch/alpha/pci/pci_6600.c
index fc3a4005a54..1cc504bc778 100644
--- a/sys/arch/alpha/pci/pci_6600.c
+++ b/sys/arch/alpha/pci/pci_6600.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_6600.c,v 1.16 2007/05/02 21:50:14 martin Exp $ */
+/* $OpenBSD: pci_6600.c,v 1.17 2008/07/22 18:45:51 miod Exp $ */
/* $NetBSD: pci_6600.c,v 1.5 2000/06/06 00:50:15 thorpej Exp $ */
/*-
@@ -81,7 +81,7 @@ void *dec_6600_intr_establish(void *, pci_intr_handle_t, int,
int (*func)(void *), void *, char *);
const char *dec_6600_intr_string(void *, pci_intr_handle_t);
int dec_6600_intr_line(void *, pci_intr_handle_t);
-int dec_6600_intr_map(void *, pcitag_t, int, int, pci_intr_handle_t *);
+int dec_6600_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
void *dec_6600_pciide_compat_intr_establish(void *, struct device *,
struct pci_attach_args *, int, int (*)(void *), void *);
void dec_6600_pciide_compat_intr_disestablish(void *, void *);
@@ -133,14 +133,13 @@ pci_6600_pickintr(pcp)
}
int
-dec_6600_intr_map(acv, bustag, buspin, line, ihp)
- void *acv;
- pcitag_t bustag;
- int buspin, line;
+dec_6600_intr_map(pa, ihp)
+ struct pci_attach_args *pa;
pci_intr_handle_t *ihp;
{
- struct tsp_config *pcp = acv;
- pci_chipset_tag_t pc = &pcp->pc_pc;
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin, line = pa->pa_intrline;
+ pci_chipset_tag_t pc = pa->pa_pc;
int bus, device, function;
if (buspin == 0) {
diff --git a/sys/arch/alpha/pci/pci_axppci_33.c b/sys/arch/alpha/pci/pci_axppci_33.c
index 17a506fbdaa..bf1db3a9764 100644
--- a/sys/arch/alpha/pci/pci_axppci_33.c
+++ b/sys/arch/alpha/pci/pci_axppci_33.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_axppci_33.c,v 1.18 2006/06/15 20:08:29 brad Exp $ */
+/* $OpenBSD: pci_axppci_33.c,v 1.19 2008/07/22 18:45:51 miod Exp $ */
/* $NetBSD: pci_axppci_33.c,v 1.10 1996/11/13 21:13:29 cgd Exp $ */
/*
@@ -52,8 +52,7 @@
#include "sio.h"
-int dec_axppci_33_intr_map(void *, pcitag_t, int, int,
- pci_intr_handle_t *);
+int dec_axppci_33_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *dec_axppci_33_intr_string(void *, pci_intr_handle_t);
int dec_axppci_33_intr_line(void *, pci_intr_handle_t);
void *dec_axppci_33_intr_establish(void *, pci_intr_handle_t,
@@ -98,14 +97,13 @@ pci_axppci_33_pickintr(lcp)
}
int
-dec_axppci_33_intr_map(lcv, bustag, buspin, line, ihp)
- void *lcv;
- pcitag_t bustag;
- int buspin, line;
+dec_axppci_33_intr_map(pa, ihp)
+ struct pci_attach_args *pa;
pci_intr_handle_t *ihp;
{
- struct lca_config *lcp = lcv;
- pci_chipset_tag_t pc = &lcp->lc_pc;
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin;
+ pci_chipset_tag_t pc = pa->pa_pc;
int device, pirq;
pcireg_t pirqreg;
u_int8_t pirqline;
diff --git a/sys/arch/alpha/pci/pci_eb164.c b/sys/arch/alpha/pci/pci_eb164.c
index 503d88c81c6..7478689b39c 100644
--- a/sys/arch/alpha/pci/pci_eb164.c
+++ b/sys/arch/alpha/pci/pci_eb164.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_eb164.c,v 1.21 2008/06/26 05:42:09 ray Exp $ */
+/* $OpenBSD: pci_eb164.c,v 1.22 2008/07/22 18:45:51 miod Exp $ */
/* $NetBSD: pci_eb164.c,v 1.27 2000/06/06 00:50:15 thorpej Exp $ */
/*-
@@ -87,8 +87,7 @@
#include <alpha/pci/siovar.h>
#endif
-int dec_eb164_intr_map(void *, pcitag_t, int, int,
- pci_intr_handle_t *);
+int dec_eb164_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *dec_eb164_intr_string(void *, pci_intr_handle_t);
int dec_eb164_intr_line(void *, pci_intr_handle_t);
void *dec_eb164_intr_establish(void *, pci_intr_handle_t,
@@ -157,14 +156,13 @@ pci_eb164_pickintr(ccp)
}
int
-dec_eb164_intr_map(ccv, bustag, buspin, line, ihp)
- void *ccv;
- pcitag_t bustag;
- int buspin, line;
+dec_eb164_intr_map(pa, ihp)
+ struct pci_attach_args *pa;
pci_intr_handle_t *ihp;
{
- struct cia_config *ccp = ccv;
- pci_chipset_tag_t pc = &ccp->cc_pc;
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin, line = pa->pa_intrline;
+ pci_chipset_tag_t pc = pa->pa_pc;
int bus, device, function;
u_int64_t variation;
diff --git a/sys/arch/alpha/pci/pci_eb64plus.c b/sys/arch/alpha/pci/pci_eb64plus.c
index f7241e88955..02a1a1eeef2 100644
--- a/sys/arch/alpha/pci/pci_eb64plus.c
+++ b/sys/arch/alpha/pci/pci_eb64plus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_eb64plus.c,v 1.10 2008/06/26 05:42:09 ray Exp $ */
+/* $OpenBSD: pci_eb64plus.c,v 1.11 2008/07/22 18:45:51 miod Exp $ */
/* $NetBSD: pci_eb64plus.c,v 1.10 2001/07/27 00:25:20 thorpej Exp $ */
/*-
@@ -84,8 +84,7 @@
#include <alpha/pci/siovar.h>
#endif
-int dec_eb64plus_intr_map(void *, pcitag_t, int, int,
- pci_intr_handle_t *);
+int dec_eb64plus_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *dec_eb64plus_intr_string(void *, pci_intr_handle_t);
void *dec_eb64plus_intr_establish(void *, pci_intr_handle_t,
int, int (*func)(void *), void *, char *);
@@ -139,14 +138,13 @@ pci_eb64plus_pickintr(acp)
}
int
-dec_eb64plus_intr_map(acv, bustag, buspin, line, ihp)
- void *acv;
- pcitag_t bustag;
- int buspin, line;
+dec_eb64plus_intr_map(pa, ihp)
+ struct pci_attach_args *pa;
pci_intr_handle_t *ihp;
{
- struct apecs_config *acp = acv;
- pci_chipset_tag_t pc = &acp->ac_pc;
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin, line = pa->pa_intrline;
+ pci_chipset_tag_t pc = pa->pa_pc;
int bus, device, function;
if (buspin == 0) {
diff --git a/sys/arch/alpha/pci/pci_kn20aa.c b/sys/arch/alpha/pci/pci_kn20aa.c
index c9678760ade..0409b4ea141 100644
--- a/sys/arch/alpha/pci/pci_kn20aa.c
+++ b/sys/arch/alpha/pci/pci_kn20aa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_kn20aa.c,v 1.22 2006/06/15 20:08:29 brad Exp $ */
+/* $OpenBSD: pci_kn20aa.c,v 1.23 2008/07/22 18:45:51 miod Exp $ */
/* $NetBSD: pci_kn20aa.c,v 1.21 1996/11/17 02:05:27 cgd Exp $ */
/*
@@ -54,8 +54,7 @@
#include <alpha/pci/siovar.h>
#endif
-int dec_kn20aa_intr_map(void *, pcitag_t, int, int,
- pci_intr_handle_t *);
+int dec_kn20aa_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *dec_kn20aa_intr_string(void *, pci_intr_handle_t);
int dec_kn20aa_intr_line(void *, pci_intr_handle_t);
void *dec_kn20aa_intr_establish(void *, pci_intr_handle_t,
@@ -104,14 +103,13 @@ pci_kn20aa_pickintr(ccp)
}
int
-dec_kn20aa_intr_map(ccv, bustag, buspin, line, ihp)
- void *ccv;
- pcitag_t bustag;
- int buspin, line;
+dec_kn20aa_intr_map(pa, ihp)
+ struct pci_attach_args *pa;
pci_intr_handle_t *ihp;
{
- struct cia_config *ccp = ccv;
- pci_chipset_tag_t pc = &ccp->cc_pc;
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin;
+ pci_chipset_tag_t pc = pa->pa_pc;
int device;
int kn20aa_irq;
diff --git a/sys/arch/alpha/pci/pci_kn300.c b/sys/arch/alpha/pci/pci_kn300.c
index 60e8a88a925..72b2a9bd9ae 100644
--- a/sys/arch/alpha/pci/pci_kn300.c
+++ b/sys/arch/alpha/pci/pci_kn300.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_kn300.c,v 1.1 2007/03/16 21:22:27 robert Exp $ */
+/* $OpenBSD: pci_kn300.c,v 1.2 2008/07/22 18:45:51 miod Exp $ */
/* $NetBSD: pci_kn300.c,v 1.28 2005/12/11 12:16:17 christos Exp $ */
/*
@@ -59,12 +59,12 @@
#include <alpha/pci/siovar.h>
#endif
-int dec_kn300_intr_map (void *, pcitag_t, int, int, pci_intr_handle_t *);
+int dec_kn300_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
-const char *dec_kn300_intr_string (void *, pci_intr_handle_t);
-void *dec_kn300_intr_establish (void *, pci_intr_handle_t,
+const char *dec_kn300_intr_string(void *, pci_intr_handle_t);
+void *dec_kn300_intr_establish(void *, pci_intr_handle_t,
int, int (*func)(void *), void *, char *);
-void dec_kn300_intr_disestablish (void *, void *);
+void dec_kn300_intr_disestablish(void *, void *);
#define KN300_PCEB_IRQ 16
#define NPIN 4
@@ -116,14 +116,14 @@ pci_kn300_pickintr(ccp, first)
}
int
-dec_kn300_intr_map(ccv, bustag, buspin, line, ihp)
- void *ccv;
- pcitag_t bustag;
- int buspin, line;
+dec_kn300_intr_map(pa, ihp)
+ struct pci_attach_args *pa;
pci_intr_handle_t *ihp;
{
- struct mcpcia_config *ccp = ccv;
- pci_chipset_tag_t pc = &ccp->cc_pc;
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin;
+ pci_chipset_tag_t pc = pa->pa_pc;
+ struct mcpcia_config *ccp = (struct mcpcia_config *)pc->pc_intr_v;
int device;
int mcpcia_irq;
diff --git a/sys/arch/alpha/pci/pci_machdep.h b/sys/arch/alpha/pci/pci_machdep.h
index 281334934e3..887004babff 100644
--- a/sys/arch/alpha/pci/pci_machdep.h
+++ b/sys/arch/alpha/pci/pci_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.h,v 1.20 2006/03/26 20:23:08 brad Exp $ */
+/* $OpenBSD: pci_machdep.h,v 1.21 2008/07/22 18:45:51 miod Exp $ */
/* $NetBSD: pci_machdep.h,v 1.6 1996/11/19 04:49:21 cgd Exp $ */
/*
@@ -60,7 +60,7 @@ struct alpha_pci_chipset {
void (*pc_conf_write)(void *, pcitag_t, int, pcireg_t);
void *pc_intr_v;
- int (*pc_intr_map)(void *, pcitag_t, int, int,
+ int (*pc_intr_map)(struct pci_attach_args *,
pci_intr_handle_t *);
const char *(*pc_intr_string)(void *, pci_intr_handle_t);
int (*pc_intr_line)(void *, pci_intr_handle_t);
@@ -101,8 +101,7 @@ int alpha_sysctl_chipset(int *, u_int, char *, size_t *);
#define pci_conf_write(c, t, r, v) \
(*(c)->pc_conf_write)((c)->pc_conf_v, (t), (r), (v))
#define pci_intr_map(pa, ihp) \
- (*((pa)->pa_pc)->pc_intr_map)((pa)->pa_pc->pc_intr_v, \
- (pa)->pa_intrtag, (pa)->pa_intrpin, (pa)->pa_intrline, (ihp))
+ (*((pa)->pa_pc)->pc_intr_map)((pa), (ihp))
#define pci_intr_string(c, ih) \
(*(c)->pc_intr_string)((c)->pc_intr_v, (ih))
#define pci_intr_line(c, ih) \
diff --git a/sys/arch/alpha/pci/pci_up1000.c b/sys/arch/alpha/pci/pci_up1000.c
index d8c88682d8b..cf1a9651777 100644
--- a/sys/arch/alpha/pci/pci_up1000.c
+++ b/sys/arch/alpha/pci/pci_up1000.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_up1000.c,v 1.13 2008/06/26 05:42:09 ray Exp $ */
+/* $OpenBSD: pci_up1000.c,v 1.14 2008/07/22 18:45:51 miod Exp $ */
/* $NetBSD: pci_up1000.c,v 1.6 2000/12/28 22:59:07 sommerfeld Exp $ */
/*-
@@ -58,7 +58,7 @@
#include "sio.h"
-int api_up1000_intr_map(void *, pcitag_t, int, int, pci_intr_handle_t *);
+int api_up1000_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *api_up1000_intr_string(void *, pci_intr_handle_t);
int api_up1000_intr_line(void *, pci_intr_handle_t);
void *api_up1000_intr_establish(void *, pci_intr_handle_t,
@@ -95,10 +95,11 @@ pci_up1000_pickintr(struct irongate_config *icp)
}
int
-api_up1000_intr_map(void *icv, pcitag_t bustag, int buspin, int line, pci_intr_handle_t *ihp)
+api_up1000_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
{
- struct irongate_config *icc = icv;
- pci_chipset_tag_t pc = &icc->ic_pc;
+ pcitag_t bustag = pa->pa_intrtag;
+ int buspin = pa->pa_intrpin, line = pa->pa_intrline;
+ pci_chipset_tag_t pc = pa->pa_pc;
int bus, device, function;
if (buspin == 0) {