Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
omap-iommu-debug.c File Reference
#include <linux/module.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/platform_device.h>
#include <linux/debugfs.h>
#include <plat/iommu.h>
#include <plat/iovmm.h>
#include <plat/iopgtable.h>

Go to the source code of this file.

Macros

#define MAXCOLUMN   100 /* for short messages */
 
#define dump_ioptable_entry_one(lv, da, val)
 
#define DEBUG_FOPS(name)
 
#define DEBUG_FOPS_RO(name)
 
#define __DEBUG_ADD_FILE(attr, mode)
 
#define DEBUG_ADD_FILE(name)   __DEBUG_ADD_FILE(name, 600)
 
#define DEBUG_ADD_FILE_RO(name)   __DEBUG_ADD_FILE(name, 400)
 

Functions

 DEBUG_FOPS_RO (ver)
 
 DEBUG_FOPS_RO (regs)
 
 DEBUG_FOPS_RO (tlb)
 
 DEBUG_FOPS (pagetable)
 
 DEBUG_FOPS_RO (mmap)
 
 DEBUG_FOPS (mem)
 
 module_init (iommu_debug_init)
 

Macro Definition Documentation

#define __DEBUG_ADD_FILE (   attr,
  mode 
)
Value:
{ \
struct dentry *dent; \
dent = debugfs_create_file(#attr, mode, parent, \
dev, &debug_##attr##_fops); \
if (!dent) \
return -ENOMEM; \
}

Definition at line 348 of file omap-iommu-debug.c.

#define DEBUG_ADD_FILE (   name)    __DEBUG_ADD_FILE(name, 600)

Definition at line 357 of file omap-iommu-debug.c.

#define DEBUG_ADD_FILE_RO (   name)    __DEBUG_ADD_FILE(name, 400)

Definition at line 358 of file omap-iommu-debug.c.

#define DEBUG_FOPS (   name)
Value:
static const struct file_operations debug_##name##_fops = { \
.open = simple_open, \
.read = debug_read_##name, \
.write = debug_write_##name, \
.llseek = generic_file_llseek, \
};

Definition at line 326 of file omap-iommu-debug.c.

#define DEBUG_FOPS_RO (   name)
Value:
static const struct file_operations debug_##name##_fops = { \
.open = simple_open, \
.read = debug_read_##name, \
.llseek = generic_file_llseek, \
};

Definition at line 334 of file omap-iommu-debug.c.

#define dump_ioptable_entry_one (   lv,
  da,
  val 
)
Value:
({ \
int __err = 0; \
const int maxcol = 22; \
const char *str = "%d: %08x %08x\n"; \
bytes = snprintf(p, maxcol, str, lv, da, val); \
p += bytes; \
len -= bytes; \
if (len < maxcol) \
__err = -ENOMEM; \
__err; \
})

Definition at line 129 of file omap-iommu-debug.c.

#define MAXCOLUMN   100 /* for short messages */

Definition at line 27 of file omap-iommu-debug.c.

Function Documentation

DEBUG_FOPS ( pagetable  )
DEBUG_FOPS ( mem  )
DEBUG_FOPS_RO ( ver  )
DEBUG_FOPS_RO ( regs  )
DEBUG_FOPS_RO ( tlb  )
DEBUG_FOPS_RO ( mmap  )
module_init ( iommu_debug_init  )

Definition at line 433 of file omap-iommu-debug.c.