Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
iopgtable.h File Reference

Go to the source code of this file.

Macros

#define IOPGD_SHIFT   20
 
#define IOPGD_SIZE   (1UL << IOPGD_SHIFT)
 
#define IOPGD_MASK   (~(IOPGD_SIZE - 1))
 
#define IOSECTION_SHIFT   20
 
#define IOSECTION_SIZE   (1UL << IOSECTION_SHIFT)
 
#define IOSECTION_MASK   (~(IOSECTION_SIZE - 1))
 
#define IOSUPER_SHIFT   24
 
#define IOSUPER_SIZE   (1UL << IOSUPER_SHIFT)
 
#define IOSUPER_MASK   (~(IOSUPER_SIZE - 1))
 
#define PTRS_PER_IOPGD   (1UL << (32 - IOPGD_SHIFT))
 
#define IOPGD_TABLE_SIZE   (PTRS_PER_IOPGD * sizeof(u32))
 
#define IOPTE_SHIFT   12
 
#define IOPTE_SIZE   (1UL << IOPTE_SHIFT)
 
#define IOPTE_MASK   (~(IOPTE_SIZE - 1))
 
#define IOLARGE_SHIFT   16
 
#define IOLARGE_SIZE   (1UL << IOLARGE_SHIFT)
 
#define IOLARGE_MASK   (~(IOLARGE_SIZE - 1))
 
#define PTRS_PER_IOPTE   (1UL << (IOPGD_SHIFT - IOPTE_SHIFT))
 
#define IOPTE_TABLE_SIZE   (PTRS_PER_IOPTE * sizeof(u32))
 
#define IOPAGE_MASK   IOPTE_MASK
 
#define IOPGD_TABLE   (1 << 0)
 
#define IOPGD_SECTION   (2 << 0)
 
#define IOPGD_SUPER   (1 << 18 | 2 << 0)
 
#define iopgd_is_table(x)   (((x) & 3) == IOPGD_TABLE)
 
#define iopgd_is_section(x)   (((x) & (1 << 18 | 3)) == IOPGD_SECTION)
 
#define iopgd_is_super(x)   (((x) & (1 << 18 | 3)) == IOPGD_SUPER)
 
#define IOPTE_SMALL   (2 << 0)
 
#define IOPTE_LARGE   (1 << 0)
 
#define iopte_is_small(x)   (((x) & 2) == IOPTE_SMALL)
 
#define iopte_is_large(x)   (((x) & 3) == IOPTE_LARGE)
 
#define iopgd_index(da)   (((da) >> IOPGD_SHIFT) & (PTRS_PER_IOPGD - 1))
 
#define iopgd_offset(obj, da)   ((obj)->iopgd + iopgd_index(da))
 
#define iopgd_page_paddr(iopgd)   (*iopgd & ~((1 << 10) - 1))
 
#define iopgd_page_vaddr(iopgd)   ((u32 *)phys_to_virt(iopgd_page_paddr(iopgd)))
 
#define iopte_index(da)   (((da) >> IOPTE_SHIFT) & (PTRS_PER_IOPTE - 1))
 
#define iopte_offset(iopgd, da)   (iopgd_page_vaddr(iopgd) + iopte_index(da))
 
#define to_iommu(dev)   (struct omap_iommu *)platform_get_drvdata(to_platform_device(dev))
 

Macro Definition Documentation

#define IOLARGE_MASK   (~(IOLARGE_SIZE - 1))

Definition at line 52 of file iopgtable.h.

#define IOLARGE_SHIFT   16

Definition at line 50 of file iopgtable.h.

#define IOLARGE_SIZE   (1UL << IOLARGE_SHIFT)

Definition at line 51 of file iopgtable.h.

#define IOPAGE_MASK   IOPTE_MASK

Definition at line 57 of file iopgtable.h.

#define iopgd_index (   da)    (((da) >> IOPGD_SHIFT) & (PTRS_PER_IOPGD - 1))

Definition at line 90 of file iopgtable.h.

#define iopgd_is_section (   x)    (((x) & (1 << 18 | 3)) == IOPGD_SECTION)

Definition at line 80 of file iopgtable.h.

#define iopgd_is_super (   x)    (((x) & (1 << 18 | 3)) == IOPGD_SUPER)

Definition at line 81 of file iopgtable.h.

#define iopgd_is_table (   x)    (((x) & 3) == IOPGD_TABLE)

Definition at line 79 of file iopgtable.h.

#define IOPGD_MASK   (~(IOPGD_SIZE - 1))

Definition at line 21 of file iopgtable.h.

#define iopgd_offset (   obj,
  da 
)    ((obj)->iopgd + iopgd_index(da))

Definition at line 91 of file iopgtable.h.

#define iopgd_page_paddr (   iopgd)    (*iopgd & ~((1 << 10) - 1))

Definition at line 93 of file iopgtable.h.

#define iopgd_page_vaddr (   iopgd)    ((u32 *)phys_to_virt(iopgd_page_paddr(iopgd)))

Definition at line 94 of file iopgtable.h.

#define IOPGD_SECTION   (2 << 0)

Definition at line 76 of file iopgtable.h.

#define IOPGD_SHIFT   20

Definition at line 19 of file iopgtable.h.

#define IOPGD_SIZE   (1UL << IOPGD_SHIFT)

Definition at line 20 of file iopgtable.h.

#define IOPGD_SUPER   (1 << 18 | 2 << 0)

Definition at line 77 of file iopgtable.h.

#define IOPGD_TABLE   (1 << 0)

Definition at line 75 of file iopgtable.h.

#define IOPGD_TABLE_SIZE   (PTRS_PER_IOPGD * sizeof(u32))

Definition at line 38 of file iopgtable.h.

#define iopte_index (   da)    (((da) >> IOPTE_SHIFT) & (PTRS_PER_IOPTE - 1))

Definition at line 97 of file iopgtable.h.

#define iopte_is_large (   x)    (((x) & 3) == IOPTE_LARGE)

Definition at line 87 of file iopgtable.h.

#define iopte_is_small (   x)    (((x) & 2) == IOPTE_SMALL)

Definition at line 86 of file iopgtable.h.

#define IOPTE_LARGE   (1 << 0)

Definition at line 84 of file iopgtable.h.

#define IOPTE_MASK   (~(IOPTE_SIZE - 1))

Definition at line 45 of file iopgtable.h.

#define iopte_offset (   iopgd,
  da 
)    (iopgd_page_vaddr(iopgd) + iopte_index(da))

Definition at line 98 of file iopgtable.h.

#define IOPTE_SHIFT   12

Definition at line 43 of file iopgtable.h.

#define IOPTE_SIZE   (1UL << IOPTE_SHIFT)

Definition at line 44 of file iopgtable.h.

#define IOPTE_SMALL   (2 << 0)

Definition at line 83 of file iopgtable.h.

#define IOPTE_TABLE_SIZE   (PTRS_PER_IOPTE * sizeof(u32))

Definition at line 55 of file iopgtable.h.

#define IOSECTION_MASK   (~(IOSECTION_SIZE - 1))

Definition at line 28 of file iopgtable.h.

#define IOSECTION_SHIFT   20

Definition at line 26 of file iopgtable.h.

#define IOSECTION_SIZE   (1UL << IOSECTION_SHIFT)

Definition at line 27 of file iopgtable.h.

#define IOSUPER_MASK   (~(IOSUPER_SIZE - 1))

Definition at line 35 of file iopgtable.h.

#define IOSUPER_SHIFT   24

Definition at line 33 of file iopgtable.h.

#define IOSUPER_SIZE   (1UL << IOSUPER_SHIFT)

Definition at line 34 of file iopgtable.h.

#define PTRS_PER_IOPGD   (1UL << (32 - IOPGD_SHIFT))

Definition at line 37 of file iopgtable.h.

#define PTRS_PER_IOPTE   (1UL << (IOPGD_SHIFT - IOPTE_SHIFT))

Definition at line 54 of file iopgtable.h.

#define to_iommu (   dev)    (struct omap_iommu *)platform_get_drvdata(to_platform_device(dev))

Definition at line 117 of file iopgtable.h.