wrsm_intr.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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
*/
/*
* Copyright (c) 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _WRSM_INTR_H
#define _WRSM_INTR_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef _ASM
#include <sys/wrsm_common.h>
#include <sys/wrsm_cmmu.h>
#include <sys/processor.h>
#endif /* _ASM */
#ifdef __cplusplus
extern "C" {
#endif
/* Limit for rsm_intr_t */
#define WRSM_INTR_TYPE_MAX RSM_INTR_T_NSVC
/* Flags for wrsm_intr_create_recvq */
#define WRSM_CREATE_RECVQ_NOFLAGS 0x0
#define WRSM_CREATE_RECVQ_SLEEP 0x1
#define WRSM_CREATE_RECVQ_USER 0x2
#define WRSM_CREATE_RECVQ_INVALID 0x4
/* Default value for is_wait in wrsm_intr_send() */
#define WRSM_INTR_WAIT_DEFAULT -1
#ifndef _ASM
/*
* Receive Queue structures
*/
struct wrsm_intr_recvq;
typedef struct wrsm_intr_recvq wrsm_intr_recvq_t;
/*
* Client functions
*/
/* Initialize the interrupt component for this network */
int wrsm_intr_init(wrsm_network_t *);
/* Destroy the interrupt component for this network */
void wrsm_intr_fini(wrsm_network_t *);
/* The following prints all intr data structures, for debug only */
void wrsm_intr_print(wrsm_network_t *);
/*
* WCI Functions
*/
/* Inform the interrupt component of a new WCI. Returns -1 if add_intr fails */
/* Inform the interrupt component that a WCI is going away */
/*
* Handler Management Functions
*/
/* Registers a handler for a specific interrupt type - rsmpi function */
/* Registers a handler for a specific interrupt type - driver function */
/* Unregisters a handler - rsmpi function */
/* Unregisters a handler - driver function */
/*
* Receive Queue Functions
*/
/*
* Creates a receive queue of a given type. User must have allocated a
* CMMU tuple in advance.
*/
/* Destroys the receive queue. Caller must free the CMMU tuple. */
/* Flushes in progress interrupts for the receive queue. */
void wrsm_intr_flush_recvq(wrsm_intr_recvq_t *);
/* Sends a message */
/*
* RSMPI Functions
*/
/* Initializes RSMPI portions of intr */
void wrsm_intr_rsminit(wrsm_network_t *);
/* Cleans-up RSMPI portions of intr */
void wrsm_intr_rsmfini(wrsm_network_t *);
/* Creates a send queue */
/* Reconfigure some of the attributes of an interrupt queue */
/* Destroys an interrupt queue, freeing all resources allocated */
/* Enqueues a datagram on an interrupt queue */
/*
* Performs a 64-byte block remote read.
* Assumes source addressis 64-byte aligned, and does no checking.
*/
/*
* Performs a 64-byte block write.
* Assumes destination address is 64-byte aligned, and does no checking.
*/
#endif /* _ASM */
#ifdef __cplusplus
}
#endif
#endif /* _WRSM_INTR_H */