/* * Architecture-specific constants for drivers to * extract attributes of the device using vio_get_attribute()
*/ #define VETH_MAC_ADDR "local-mac-address" #define VETH_MCAST_FILTER_SIZE "ibm,mac-address-filters"
/* * VIO CMO minimum entitlement for all devices and spare entitlement
*/ #define VIO_CMO_MIN_ENT 1562624
externconststruct bus_type vio_bus_type;
struct iommu_table;
/* * Platform Facilities Option (PFO)-specific data
*/
/* Starting unit address for PFO devices on the VIO BUS */ #define VIO_BASE_PFO_UA 0x50000000
/** * vio_pfo_op - PFO operation parameters * * @flags: h_call subfunctions and modifiers * @in: Input data block logical real address * @inlen: If non-negative, the length of the input data block. If negative, * the length of the input data descriptor list in bytes. * @out: Output data block logical real address * @outlen: If non-negative, the length of the input data block. If negative, * the length of the input data descriptor list in bytes. * @csbcpb: Logical real address of the 4k naturally-aligned storage block * containing the CSB & optional FC field specific CPB * @timeout: # of milliseconds to retry h_call, 0 for no timeout. * @hcall_err: pointer to return the h_call return value, else NULL
*/ struct vio_pfo_op {
u64 flags;
s64 in;
s64 inlen;
s64 out;
s64 outlen;
u64 csbcpb; void *done; unsignedlong handle; unsignedint timeout; long hcall_err;
};
/* End PFO specific data */
enum vio_dev_family {
VDEVICE, /* The OF node is a child of /vdevice */
PFO, /* The OF node is a child of /ibm,platform-facilities */
};
/** * vio_dev - This structure is used to describe virtual I/O devices. * * @desired: set from return of driver's get_desired_dma() function * @entitled: bytes of IO data that has been reserved for this device. * @allocated: bytes of IO data currently in use by the device. * @allocs_failed: number of DMA failures due to insufficient entitlement.
*/ struct vio_dev { constchar *name; constchar *type;
uint32_t unit_address;
uint32_t resource_id; unsignedint irq; struct {
size_t desired;
size_t entitled;
size_t allocated;
atomic_t allocs_failed;
} cmo; enum vio_dev_family family; struct device dev;
};
struct vio_driver { constchar *name; conststruct vio_device_id *id_table; int (*probe)(struct vio_dev *dev, conststruct vio_device_id *id); void (*remove)(struct vio_dev *dev); void (*shutdown)(struct vio_dev *dev); /* A driver must have a get_desired_dma() function to * be loaded in a CMO environment if it uses DMA.
*/ unsignedlong (*get_desired_dma)(struct vio_dev *dev); conststruct dev_pm_ops *pm; struct device_driver driver;
};
externint __vio_register_driver(struct vio_driver *drv, struct module *owner, constchar *mod_name); /* * vio_register_driver must be a macro so that KBUILD_MODNAME can be expanded
*/ #define vio_register_driver(driver) \
__vio_register_driver(driver, THIS_MODULE, KBUILD_MODNAME) externvoid vio_unregister_driver(struct vio_driver *drv);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.