/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <sys/sysmacros.h>
#include <sys/autoconf.h>
/*
* MSI-X allocation limit.
*/
#endif
/*
* New DDI interrupt framework
*/
void
{
int supported_types;
(void *)dip));
return;
/* Save supported interrupt types information */
}
void
{
(void *)dip));
return;
/*
* devi_intr_handle_p will only be used for devices
* which are using the legacy DDI Interrupt interfaces.
*/
if (intr_p->devi_intr_handle_p) {
/* nintrs could be zero; so check for it first */
if (intr_p->devi_intr_sup_nintrs) {
sizeof (ddi_intr_handle_t));
}
}
/*
* devi_irm_req_p will only be used for devices which
* are mapped to an Interrupt Resource Management pool.
*/
if (intr_p->devi_irm_req_p)
(void) i_ddi_irm_remove(dip);
}
{
return (intr_p->devi_intr_sup_types);
(void *)&intr_types);
}
/*
* NOTE: This function is only called by i_ddi_dev_init().
*/
void
{
if (intr_p)
}
{
return (intr_p->devi_intr_sup_nintrs);
(void *)&nintrs);
}
/*
* NOTE: This function is only called by ddi_intr_alloc().
*/
void
{
if (intr_p)
}
{
}
/*
* NOTE: This function is only called by
* ddi_intr_alloc() and ddi_intr_free().
*/
void
{
if (intr_p)
}
{
}
/*
* NOTE: This function is only called by
* ddi_intr_alloc() and ddi_intr_free().
*/
void
{
if (intr_p)
}
{
}
void
{
if (intr_p)
}
/*
* i_ddi_intr_get_current_navail:
*
* Return the number of interrupts currently available.
* If a precise number set by IRM is not available, then
* return the limit determined by i_ddi_intr_get_limit().
*/
{
/* Check for a precise number from IRM */
/*
* Lock to be sure a rebalance is not in progress.
* (Should be changed to a rwlock.)
*/
return (navail);
}
/* Otherwise, return the limit */
}
/*
* i_ddi_intr_get_limit:
*
* Return the limit of how many interrupts a driver can allocate.
*/
{
/* Check for interrupt pool */
/* Get default limit, from interrupt pool or by INTROP method */
} else {
(void *)&limit) != DDI_SUCCESS)
return (0);
}
/* Get maximum supported by the device */
/* No limit if device and system both support IRM */
return (nintrs);
/* Limit cannot exceed what device supports */
/* Impose a global MSI-X limit on x86 */
if (type == DDI_INTR_TYPE_MSIX)
#endif
/* Impose a global MSI limit on all platforms */
if (type == DDI_INTR_TYPE_MSI)
return (limit);
}
{
}
void
{
if (intr_p)
}
{
return (NULL);
/*
* Changed this to a check and return NULL if an invalid inum
* is passed to retrieve a handle
*/
return (NULL);
return ((intr_p->devi_intr_handle_p) ?
}
void
{
return;
/*
* Changed this to a check and return if an invalid inum
* is passed to set a handle
*/
return;
/* nintrs could be zero; so check for it first */
if (intr_p->devi_intr_sup_nintrs)
sizeof (ddi_intr_handle_t) *
}
if (intr_p->devi_intr_handle_p)
}
/*
* The "ddi-intr-weight" property contains the weight of each interrupt
* associated with a dev_info node. For devices with multiple interrupts per
* dev_info node, the total load of the device is "devi_intr_weight * nintr",
* possibly spread out over multiple CPUs.
*
* Maintaining this as a property permits possible tweaking in the product
* in response to customer problems via driver.conf property definitions at
* the driver or the instance level. This does not mean that "ddi-intr_weight"
* is a formal or committed interface.
*/
{
if (weight < -1)
return (weight);
}
{
"ddi-intr-weight", weight);
return (oweight);
}
/*
* Old DDI interrupt framework
*
* NOTE:
* The following 4 busops entry points are obsoleted with version
* 9 or greater. Use i_ddi_intr_op interface in place of these
* obsolete interfaces.
*
* Remove these busops entry points and all related data structures
*/
/* ARGSUSED */
{
"for %s%d due to down-rev nexus driver %s%d",
return (NULL);
}
/* ARGSUSED */
int
{
"for %s%d due to down-rev nexus driver %s%d",
return (DDI_ENOTSUP);
}
/* ARGSUSED */
void
{
"for %s%d due to down-rev nexus driver %s%d",
}
/* ARGSUSED */
int
{
"for %s%d due to down-rev nexus driver %s%d",
return (DDI_ENOTSUP);
}
/*
*/
int
{
int ret;
(void *)hdlp));
return (DDI_EINVAL);
return (DDI_EINVAL);
}
*tgt_p));
if (ret == DDI_SUCCESS)
return (ret);
}
int
{
int ret;
return (DDI_EINVAL);
return (DDI_EINVAL);
}
if (ret == DDI_SUCCESS)
return (ret);
}
{
}
void
{
if (intr_p)
}
int
{
}
void
{
if (intr_p)
}
#endif