Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
sysfs.c File Reference
#include <linux/sched.h>
#include <linux/device.h>
#include <linux/cpu.h>
#include <linux/smp.h>
#include <linux/percpu.h>
#include <linux/init.h>
#include <asm/cpudata.h>
#include <asm/hypervisor.h>
#include <asm/spitfire.h>

Go to the source code of this file.

Macros

#define SHOW_MMUSTAT_ULONG(NAME)
 
#define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER)
 
#define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER)
 

Functions

 SHOW_CPUDATA_ULONG_NAME (clock_tick, clock_tick)
 
 SHOW_CPUDATA_UINT_NAME (l1_dcache_size, dcache_size)
 
 SHOW_CPUDATA_UINT_NAME (l1_dcache_line_size, dcache_line_size)
 
 SHOW_CPUDATA_UINT_NAME (l1_icache_size, icache_size)
 
 SHOW_CPUDATA_UINT_NAME (l1_icache_line_size, icache_line_size)
 
 SHOW_CPUDATA_UINT_NAME (l2_cache_size, ecache_size)
 
 SHOW_CPUDATA_UINT_NAME (l2_cache_line_size, ecache_line_size)
 
 subsys_initcall (topology_init)
 

Macro Definition Documentation

#define SHOW_CPUDATA_UINT_NAME (   NAME,
  MEMBER 
)
Value:
static ssize_t show_##NAME(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
return sprintf(buf, "%u\n", c->MEMBER); \
}

Definition at line 196 of file sysfs.c.

#define SHOW_CPUDATA_ULONG_NAME (   NAME,
  MEMBER 
)
Value:
static ssize_t show_##NAME(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
return sprintf(buf, "%lu\n", c->MEMBER); \
}

Definition at line 188 of file sysfs.c.

#define SHOW_MMUSTAT_ULONG (   NAME)
Value:
static ssize_t show_##NAME(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \
return sprintf(buf, "%lu\n", p->NAME); \
} \
static DEVICE_ATTR(NAME, 0444, show_##NAME, NULL)

Function Documentation

SHOW_CPUDATA_UINT_NAME ( l1_dcache_size  ,
dcache_size   
)
SHOW_CPUDATA_UINT_NAME ( l1_dcache_line_size  ,
dcache_line_size   
)
SHOW_CPUDATA_UINT_NAME ( l1_icache_size  ,
icache_size   
)
SHOW_CPUDATA_UINT_NAME ( l1_icache_line_size  ,
icache_line_size   
)
SHOW_CPUDATA_UINT_NAME ( l2_cache_size  ,
ecache_size   
)
SHOW_CPUDATA_UINT_NAME ( l2_cache_line_size  ,
ecache_line_size   
)
SHOW_CPUDATA_ULONG_NAME ( clock_tick  ,
clock_tick   
)
subsys_initcall ( topology_init  )