Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/module.h>
#include <asm/fcx.h>
#include <asm/itcw.h>
Go to the source code of this file.
Data Structures | |
struct | itcw |
Macros | |
#define | CROSS4K(x, l) (((x) & ~4095) != ((x + l) & ~4095)) |
Functions | |
struct tcw * | itcw_get_tcw (struct itcw *itcw) |
EXPORT_SYMBOL (itcw_get_tcw) | |
size_t | itcw_calc_size (int intrg, int max_tidaws, int intrg_max_tidaws) |
EXPORT_SYMBOL (itcw_calc_size) | |
struct itcw * | itcw_init (void *buffer, size_t size, int op, int intrg, int max_tidaws, int intrg_max_tidaws) |
EXPORT_SYMBOL (itcw_init) | |
struct dcw * | itcw_add_dcw (struct itcw *itcw, u8 cmd, u8 flags, void *cd, u8 cd_count, u32 count) |
EXPORT_SYMBOL (itcw_add_dcw) | |
struct tidaw * | itcw_add_tidaw (struct itcw *itcw, u8 flags, void *addr, u32 count) |
EXPORT_SYMBOL (itcw_add_tidaw) | |
void | itcw_set_data (struct itcw *itcw, void *addr, int use_tidal) |
EXPORT_SYMBOL (itcw_set_data) | |
void | itcw_finalize (struct itcw *itcw) |
EXPORT_SYMBOL (itcw_finalize) | |
Variables | |
struct itcw | __attribute__ |
EXPORT_SYMBOL | ( | itcw_get_tcw | ) |
EXPORT_SYMBOL | ( | itcw_calc_size | ) |
EXPORT_SYMBOL | ( | itcw_init | ) |
EXPORT_SYMBOL | ( | itcw_add_dcw | ) |
EXPORT_SYMBOL | ( | itcw_add_tidaw | ) |
EXPORT_SYMBOL | ( | itcw_set_data | ) |
EXPORT_SYMBOL | ( | itcw_finalize | ) |
|
read |
itcw_add_dcw - add a dcw to the itcw : address of the itcw : the dcw command : flags for the dcw : address of control data for this dcw or NULL if none is required : number of control data bytes for this dcw : number of data bytes for this dcw
Add a new dcw to the specified itcw by writing the dcw information specified by , , , and to the tca of the tccb. Return a pointer to the newly added dcw on success or -ENOSPC if the new dcw would exceed the available space.
Note: the tcal field of the tccb header will be updated to reflect added content.
itcw_add_tidaw - add a tidaw to the itcw : address of the itcw : flags for the new tidaw : address value for the new tidaw : count value for the new tidaw
Add a new tidaw to the input/output data tidaw-list of the specified itcw (depending on the value of the r-flag and w-flag). Return a pointer to the new tidaw on success or -ENOSPC if the new tidaw would exceed the available space.
Note: TTIC tidaws are automatically added when needed, so explicitly calling this interface with the TTIC flag is not supported. The last-tidaw flag for the last tidaw in the list will be set by itcw_finalize.
itcw_calc_size - return the size of an itcw with the given parameters : if non-zero, add an interrogate tcw : maximum number of tidaws to be used for data addressing or zero if no tida is to be used. : maximum number of tidaws to be used for data addressing by the interrogate tcw, if specified
Calculate and return the number of bytes required to hold an itcw with the given parameters and assuming tccbs with maximum size.
Note that the resulting size also contains bytes needed for alignment padding as well as padding to ensure that data structures don't cross a 4k-boundary where required.
itcw_finalize - calculate length and count fields of the itcw : address of the itcw
Calculate tcw input-/output-count and tccbl fields and add a tcat the tccb. In case input- or output-tida is used, the tidaw-list must be stored in continuous storage (no ttic). The tcal field in the tccb must be up-to-date.
|
read |
itcw_init - initialize incremental tcw data structure : address of buffer to use for data structures : number of bytes in buffer : ITCW_OP_READ for a read operation tcw, ITCW_OP_WRITE for a write operation tcw : if non-zero, add and initialize an interrogate tcw : maximum number of tidaws to be used for data addressing or zero if no tida is to be used. : maximum number of tidaws to be used for data addressing by the interrogate tcw, if specified
Prepare the specified buffer to be used as an incremental tcw, i.e. a helper data structure that can be used to construct a valid tcw by successive calls to other helper functions. Note: the buffer needs to be located below the 2G address limit. The resulting tcw has the following restrictions:
On success, return pointer to the resulting incremental tcw data structure, ERR_PTR otherwise.
itcw_set_data - set data address and tida flag of the itcw : address of the itcw : the data address : zero of the data address specifies a contiguous block of data, non-zero if it specifies a list if tidaws.
Set the input/output data address of the itcw (depending on the value of the r-flag and w-flag). If is non-zero, the corresponding tida flag is set as well.