Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
cmf.c File Reference
#include <linux/bootmem.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/timex.h>
#include <asm/ccwdev.h>
#include <asm/cio.h>
#include <asm/cmb.h>
#include <asm/div64.h>
#include "cio.h"
#include "css.h"
#include "device.h"
#include "ioasm.h"
#include "chsc.h"

Go to the source code of this file.

Data Structures

struct  cmb_operations
 
struct  cmb_data
 
struct  set_schib_struct
 
struct  copy_block_struct
 
struct  cmb_area
 
struct  cmb
 
struct  cmbe
 

Macros

#define KMSG_COMPONENT   "cio"
 
#define pr_fmt(fmt)   KMSG_COMPONENT ": " fmt
 
#define ARGSTRING   "s390cmf"
 
#define CMF_PENDING   1
 
#define cmf_attr(name)
 
#define cmf_attr_avg(name)
 

Enumerations

enum  cmb_index {
  cmb_ssch_rsch_count, cmb_sample_count, cmb_device_connect_time, cmb_function_pending_time,
  cmb_device_disconnect_time, cmb_control_unit_queuing_time, cmb_device_active_only_time, cmb_device_busy_time,
  cmb_initial_command_response_time
}
 
enum  cmb_format { CMF_BASIC, CMF_EXTENDED, CMF_AUTODETECT = -1 }
 

Functions

 module_param (format, bint, 0444)
 
void retry_set_schib (struct ccw_device *cdev)
 
void cmf_retry_copy_block (struct ccw_device *cdev)
 
 module_param_named (maxchannels, cmb_area.num_channels, uint, 0444)
 
 cmf_attr (ssch_rsch_count)
 
 cmf_attr (sample_count)
 
 cmf_attr_avg (device_connect_time)
 
 cmf_attr_avg (function_pending_time)
 
 cmf_attr_avg (device_disconnect_time)
 
 cmf_attr_avg (control_unit_queuing_time)
 
 cmf_attr_avg (device_active_only_time)
 
 cmf_attr_avg (device_busy_time)
 
 cmf_attr_avg (initial_command_response_time)
 
 DEVICE_ATTR (cmb_enable, 0644, cmb_enable_show, cmb_enable_store)
 
int ccw_set_cmf (struct ccw_device *cdev, int enable)
 
int enable_cmf (struct ccw_device *cdev)
 
int disable_cmf (struct ccw_device *cdev)
 
u64 cmf_read (struct ccw_device *cdev, int index)
 
int cmf_readall (struct ccw_device *cdev, struct cmbdata *data)
 
int cmf_reenable (struct ccw_device *cdev)
 
 module_init (init_cmf)
 
 MODULE_AUTHOR ("Arnd Bergmann <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("channel measurement facility base driver\n""Copyright IBM Corp. 2003\n")
 
 EXPORT_SYMBOL_GPL (enable_cmf)
 
 EXPORT_SYMBOL_GPL (disable_cmf)
 
 EXPORT_SYMBOL_GPL (cmf_read)
 
 EXPORT_SYMBOL_GPL (cmf_readall)
 

Macro Definition Documentation

#define ARGSTRING   "s390cmf"

Definition at line 57 of file cmf.c.

#define cmf_attr (   name)
Value:
static ssize_t show_##name(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ return cmb_show_attr((dev), buf, cmb_##name); } \
static DEVICE_ATTR(name, 0444, show_##name, NULL);

Definition at line 1106 of file cmf.c.

#define cmf_attr_avg (   name)
Value:
static ssize_t show_avg_##name(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ return cmb_show_attr((dev), buf, cmb_##name); } \
static DEVICE_ATTR(avg_##name, 0444, show_avg_##name, NULL);

Definition at line 1112 of file cmf.c.

#define CMF_PENDING   1

Definition at line 221 of file cmf.c.

#define KMSG_COMPONENT   "cio"

Definition at line 26 of file cmf.c.

#define pr_fmt (   fmt)    KMSG_COMPONENT ": " fmt

Definition at line 27 of file cmf.c.

Enumeration Type Documentation

enum cmb_format

enum cmb_format - types of supported measurement block formats

: traditional channel measurement blocks supported by all machines that we run on : improved format that was introduced with the z990 machine : default: use extended format when running on a machine supporting extended format, otherwise fall back to basic format

Enumerator:
CMF_BASIC 
CMF_EXTENDED 
CMF_AUTODETECT 

Definition at line 85 of file cmf.c.

enum cmb_index
Enumerator:
cmb_ssch_rsch_count 
cmb_sample_count 
cmb_device_connect_time 
cmb_function_pending_time 
cmb_device_disconnect_time 
cmb_control_unit_queuing_time 
cmb_device_active_only_time 
cmb_device_busy_time 
cmb_initial_command_response_time 

Definition at line 60 of file cmf.c.

Function Documentation

int ccw_set_cmf ( struct ccw_device cdev,
int  enable 
)

Definition at line 1205 of file cmf.c.

cmf_attr ( ssch_rsch_count  )
cmf_attr ( sample_count  )
cmf_attr_avg ( device_connect_time  )
cmf_attr_avg ( function_pending_time  )
cmf_attr_avg ( device_disconnect_time  )
cmf_attr_avg ( control_unit_queuing_time  )
cmf_attr_avg ( device_active_only_time  )
cmf_attr_avg ( device_busy_time  )
cmf_attr_avg ( initial_command_response_time  )
u64 cmf_read ( struct ccw_device cdev,
int  index 
)

cmf_read() - read one value from the current channel measurement block : the channel to be read : the index of the value to be read

Returns the value read or %0 if the value cannot be read.

Context: any

Definition at line 1271 of file cmf.c.

int cmf_readall ( struct ccw_device cdev,
struct cmbdata data 
)

cmf_readall() - read the current channel measurement block : the channel to be read : a pointer to a data block that will be filled

Returns %0 on success, a negative error value otherwise.

Context: any

Definition at line 1286 of file cmf.c.

int cmf_reenable ( struct ccw_device cdev)

Definition at line 1292 of file cmf.c.

void cmf_retry_copy_block ( struct ccw_device cdev)

Definition at line 401 of file cmf.c.

DEVICE_ATTR ( cmb_enable  ,
0644  ,
cmb_enable_show  ,
cmb_enable_store   
)
int disable_cmf ( struct ccw_device cdev)

disable_cmf() - switch off the channel measurement for a specific device : The ccw device to be disabled

Returns %0 for success or a negative error value.

Context: non-atomic

Definition at line 1249 of file cmf.c.

int enable_cmf ( struct ccw_device cdev)

enable_cmf() - switch on the channel measurement for a specific device : The ccw device to be enabled

Returns %0 for success or a negative error value.

Context: non-atomic

Definition at line 1219 of file cmf.c.

EXPORT_SYMBOL_GPL ( enable_cmf  )
EXPORT_SYMBOL_GPL ( disable_cmf  )
EXPORT_SYMBOL_GPL ( cmf_read  )
EXPORT_SYMBOL_GPL ( cmf_readall  )
MODULE_AUTHOR ( "Arnd Bergmann <[email protected]>"  )
MODULE_DESCRIPTION ( "channel measurement facility base driver\n""Copyright IBM Corp. 2003\n )
module_init ( init_cmf  )
MODULE_LICENSE ( "GPL"  )
module_param ( format  ,
bint  ,
0444   
)
module_param_named ( maxchannels  ,
cmb_area.  num_channels,
uint  ,
0444   
)
void retry_set_schib ( struct ccw_device cdev)

Definition at line 280 of file cmf.c.