Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
vio.c File Reference
#include <linux/cpu.h>
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/stat.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/console.h>
#include <linux/export.h>
#include <linux/mm.h>
#include <linux/dma-mapping.h>
#include <linux/kobject.h>
#include <asm/iommu.h>
#include <asm/dma.h>
#include <asm/vio.h>
#include <asm/prom.h>
#include <asm/firmware.h>
#include <asm/tce.h>
#include <asm/page.h>
#include <asm/hvcall.h>

Go to the source code of this file.

Functions

int vio_cmo_entitlement_update (size_t new_entitlement)
 
void vio_cmo_set_dev_desired (struct vio_dev *viodev, size_t desired)
 
 EXPORT_SYMBOL (vio_cmo_entitlement_update)
 
 EXPORT_SYMBOL (vio_cmo_set_dev_desired)
 
int vio_h_cop_sync (struct vio_dev *vdev, struct vio_pfo_op *op)
 
 EXPORT_SYMBOL (vio_h_cop_sync)
 
int __vio_register_driver (struct vio_driver *viodrv, struct module *owner, const char *mod_name)
 
 EXPORT_SYMBOL (__vio_register_driver)
 
void vio_unregister_driver (struct vio_driver *viodrv)
 
 EXPORT_SYMBOL (vio_unregister_driver)
 
struct vio_devvio_register_device_node (struct device_node *of_node)
 
 EXPORT_SYMBOL (vio_register_device_node)
 
 postcore_initcall (vio_bus_init)
 
 device_initcall (vio_device_init)
 
void __devinit vio_unregister_device (struct vio_dev *viodev)
 
 EXPORT_SYMBOL (vio_unregister_device)
 
const voidvio_get_attribute (struct vio_dev *vdev, char *which, int *length)
 
 EXPORT_SYMBOL (vio_get_attribute)
 

Variables

struct bus_type vio_bus_type
 

Function Documentation

int __vio_register_driver ( struct vio_driver viodrv,
struct module owner,
const char mod_name 
)

vio_register_driver: - Register a new vio driver : The vio_driver structure to be registered.

Definition at line 1265 of file vio.c.

device_initcall ( vio_device_init  )
EXPORT_SYMBOL ( vio_cmo_entitlement_update  )
EXPORT_SYMBOL ( vio_cmo_set_dev_desired  )
EXPORT_SYMBOL ( vio_h_cop_sync  )
EXPORT_SYMBOL ( __vio_register_driver  )
EXPORT_SYMBOL ( vio_unregister_driver  )
EXPORT_SYMBOL ( vio_register_device_node  )
EXPORT_SYMBOL ( vio_unregister_device  )
EXPORT_SYMBOL ( vio_get_attribute  )
postcore_initcall ( vio_bus_init  )
int vio_cmo_entitlement_update ( size_t  new_entitlement)

Definition at line 1055 of file vio.c.

void vio_cmo_set_dev_desired ( struct vio_dev viodev,
size_t  desired 
)

Definition at line 1056 of file vio.c.

const void* vio_get_attribute ( struct vio_dev vdev,
char which,
int length 
)

vio_get_attribute: - get attribute for virtual device : The vio device to get property. : The property/attribute to be extracted. : Pointer to length of returned data size (unused if NULL).

Calls prom.c's of_get_property() to return the value of the attribute specified by

Definition at line 1598 of file vio.c.

int vio_h_cop_sync ( struct vio_dev vdev,
struct vio_pfo_op *  op 
)

vio_h_cop_sync - Perform a synchronous PFO co-processor operation

- Pointer to a struct vio_dev for device - Pointer to a struct vio_pfo_op for the operation parameters

Calls the hypervisor to synchronously perform the PFO operation described in . In the case of a busy response from the hypervisor, the operation will be re-submitted indefinitely unless a non-zero timeout is specified or an error occurs. The timeout places a limit on when to stop re-submitting a operation, the total time can be exceeded if an operation is in progress.

If op->hcall_ret is not NULL, this will be set to the return from the last h_cop_op call or it will be 0 if an error not involving the h_call was encountered.

Returns: 0 on success, -EINVAL if the h_call fails due to an invalid parameter, -E2BIG if the h_call can not be performed synchronously, -EBUSY if a timeout is specified and has elapsed, -EACCES if the memory area for data/status has been rescinded, or -EPERM if a hardware fault has been indicated

Definition at line 1096 of file vio.c.

struct vio_dev* vio_register_device_node ( struct device_node of_node)
read

vio_register_device_node: - Register a new vio device. : The OF node for this device.

Creates and initializes a vio_dev structure from the data in of_node and adds it to the list of virtual devices. Returns a pointer to the created vio_dev or NULL if node has NULL device_type or compatible fields.

Definition at line 1311 of file vio.c.

void __devinit vio_unregister_device ( struct vio_dev viodev)

Definition at line 1548 of file vio.c.

void vio_unregister_driver ( struct vio_driver viodrv)

vio_unregister_driver - Remove registration of vio driver. : The vio_driver struct to be removed form registration

Definition at line 1285 of file vio.c.

Variable Documentation

struct bus_type vio_bus_type
Initial value:
= {
.name = "vio",
.dev_attrs = vio_dev_attrs,
.uevent = vio_hotplug,
.match = vio_bus_match,
.probe = vio_bus_probe,
.remove = vio_bus_remove,
}

Definition at line 1580 of file vio.c.