summaryrefslogtreecommitdiff
path: root/usr/src/uts/sun4u/io/mach_rootnex.c
diff options
context:
space:
mode:
authorgovinda <none@none>2005-10-13 17:45:09 -0700
committergovinda <none@none>2005-10-13 17:45:09 -0700
commita195726fa33097e56cf1c25c31feddb827e140f0 (patch)
tree0d8a7063eb794f6d3697cb8cae5649c1363118a0 /usr/src/uts/sun4u/io/mach_rootnex.c
parent68ae3684389dbd334e0466478c9785b743f0b99b (diff)
downloadillumos-joyent-a195726fa33097e56cf1c25c31feddb827e140f0.tar.gz
PSARC/2005/561 Obsolete DDI Interrupt Interfaces
6330182 Implement PSARC/2005/561 changes 6255855 ddi_intr_get_nintrs() returns DDI_SUCCESS for type = -1 6255872 ddi_intr_get_cap() returns 0 for capability structure 6256554 process_intr_ops() should check for pdip value 6280180 memory leaks in ddi_add_intr /ddi_intr_alloc 6320326 interrupt state should not be touched during interrupt re-routing 6320368 default px driver configuration should be MSIX 6320374 px driver should call ndi_ra_alloc() with proper arguments 6323264 px_err_reg_disable() access fire regsiters with incorrect csrbase 6328321 update sparc.fdbg for new DDI interrupt data structures --HG-- rename : usr/src/uts/common/sys/nexusintr.h => deleted_files/usr/src/uts/common/sys/nexusintr.h rename : usr/src/uts/sun4/sys/nexusintr_impl.h => deleted_files/usr/src/uts/sun4/sys/nexusintr_impl.h
Diffstat (limited to 'usr/src/uts/sun4u/io/mach_rootnex.c')
-rw-r--r--usr/src/uts/sun4u/io/mach_rootnex.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/usr/src/uts/sun4u/io/mach_rootnex.c b/usr/src/uts/sun4u/io/mach_rootnex.c
index dfec28126a..2563b01621 100644
--- a/usr/src/uts/sun4u/io/mach_rootnex.c
+++ b/usr/src/uts/sun4u/io/mach_rootnex.c
@@ -62,7 +62,7 @@ int
rootnex_remove_intr_impl(dev_info_t *dip, dev_info_t *rdip,
ddi_intr_handle_impl_t *hdlp);
-void
+int
rootnex_get_intr_pri(dev_info_t *dip, dev_info_t *rdip,
ddi_intr_handle_impl_t *hdlp);
@@ -76,7 +76,6 @@ int
rootnex_add_intr_impl(dev_info_t *dip, dev_info_t *rdip,
ddi_intr_handle_impl_t *hdlp)
{
- ddi_ispec_t *ip = (ddi_ispec_t *)hdlp->ih_private;
volatile uint64_t *intr_mapping_reg;
volatile uint64_t mondo_vector;
int32_t r_upaid = -1;
@@ -90,15 +89,14 @@ rootnex_add_intr_impl(dev_info_t *dip, dev_info_t *rdip,
"upa-interrupt-slave", 0) != 0) {
/* Give slave devices pri of 5. e.g. fb's */
- ip->is_pil = 5;
- hdlp->ih_pri = ip->is_pil;
+ hdlp->ih_pri = 5;
}
/*
* Translate the interrupt property by stuffing in the
* portid for those devices which have a upa-portid.
*/
- *ip->is_intr |= (UPAID_TO_IGN(upa_portid) << 6);
+ hdlp->ih_vector |= (UPAID_TO_IGN(upa_portid) << 6);
}
/*
@@ -122,7 +120,6 @@ rootnex_add_intr_impl(dev_info_t *dip, dev_info_t *rdip,
return (DDI_FAILURE);
}
- hdlp->ih_vector = *ip->is_intr;
if ((ret = i_ddi_add_ivintr(hdlp)) != DDI_SUCCESS)
return (ret);
@@ -139,7 +136,7 @@ rootnex_add_intr_impl(dev_info_t *dip, dev_info_t *rdip,
* running under load.
*/
mondo_vector = cpu0.cpu_id << IMR_TID_SHIFT;
- mondo_vector |= (IMR_VALID | (uint64_t)*ip->is_intr);
+ mondo_vector |= (IMR_VALID | (uint64_t)hdlp->ih_vector);
/* Set the mapping register */
*intr_mapping_reg = mondo_vector;
@@ -159,7 +156,6 @@ int
rootnex_remove_intr_impl(dev_info_t *dip, dev_info_t *rdip,
ddi_intr_handle_impl_t *hdlp)
{
- ddi_ispec_t *ip = (ddi_ispec_t *)hdlp->ih_private;
int32_t upa_portid;
int len;
@@ -169,7 +165,7 @@ rootnex_remove_intr_impl(dev_info_t *dip, dev_info_t *rdip,
* Translate the interrupt property by stuffing in the
* portid for those devices which have a upa-portid.
*/
- *ip->is_intr |= (UPAID_TO_IGN(upa_portid) << 6);
+ hdlp->ih_vector |= (UPAID_TO_IGN(upa_portid) << 6);
}
/*
@@ -203,7 +199,6 @@ rootnex_remove_intr_impl(dev_info_t *dip, dev_info_t *rdip,
}
}
- hdlp->ih_vector = *ip->is_intr;
i_ddi_rem_ivintr(hdlp);
return (DDI_SUCCESS);
@@ -213,11 +208,11 @@ rootnex_remove_intr_impl(dev_info_t *dip, dev_info_t *rdip,
* rootnex_get_intr_pri:
*/
/*ARGSUSED*/
-void
+int
rootnex_get_intr_pri(dev_info_t *dip, dev_info_t *rdip,
ddi_intr_handle_impl_t *hdlp)
{
- ddi_ispec_t *ip = (ddi_ispec_t *)hdlp->ih_private;
+ int pri = hdlp->ih_pri;
if (ddi_prop_get_int(DDI_DEV_T_ANY, rdip, DDI_PROP_DONTPASS,
"upa-portid", -1) != -1) {
@@ -225,9 +220,11 @@ rootnex_get_intr_pri(dev_info_t *dip, dev_info_t *rdip,
"upa-interrupt-slave", 0) != 0) {
/* Give slave devices pri of 5. e.g. fb's */
- ip->is_pil = 5;
+ pri = 5;
}
}
+
+ return (pri);
}
int