Linux Kernel
3.7.1
|
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/pci.h>
#include <linux/scatterlist.h>
#include <linux/iommu-helper.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/hardware.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/module.h>
#include <asm/ropes.h>
#include <asm/mckinley.h>
#include <asm/runway.h>
#include <asm/page.h>
#include <asm/pdc.h>
#include <asm/pdcpat.h>
#include <asm/parisc-device.h>
#include "iommu-helpers.h"
Go to the source code of this file.
Data Structures | |
struct | ibase_data_struct |
Macros | |
#define | MODULE_NAME "SBA" |
#define | DBG_INIT(x...) |
#define | DBG_RUN(x...) |
#define | DBG_RUN_SG(x...) |
#define | DBG_RES(x...) |
#define | SBA_INLINE __inline__ |
#define | DEFAULT_DMA_HINT_REG 0 |
#define | SBA_DEV(d) ((struct sba_device *) (d)) |
#define | READ_REG32(addr) readl(addr) |
#define | READ_REG64(addr) readq(addr) |
#define | WRITE_REG32(val, addr) writel((val), (addr)) |
#define | WRITE_REG64(val, addr) writeq((val), (addr)) |
#define | READ_REG(addr) READ_REG32(addr) |
#define | WRITE_REG(value, addr) WRITE_REG32(value, addr) |
#define | sba_dump_ranges(x) |
#define | sba_dump_tlb(x) |
#define | PAGES_PER_RANGE 1 /* could increase this to 4 or 8 if needed */ |
#define | SBA_IOVA(ioc, iovp, offset, hint_reg) ((iovp) | (offset)) |
#define | SBA_IOVP(ioc, iova) (iova) |
#define | PDIR_INDEX(iovp) ((iovp)>>IOVP_SHIFT) |
#define | RESMAP_MASK(n) (~0UL << (BITS_PER_LONG - (n))) |
#define | RESMAP_IDX_MASK (sizeof(unsigned long) - 1) |
#define | KERNEL_SPACE 0 |
#define | PIDE_FLAG 0x80000000UL |
#define | PIRANHA_ADDR_MASK 0x00160000UL /* bit 17,18,20 */ |
#define | PIRANHA_ADDR_VAL 0x00060000UL /* bit 17,18 on */ |
Typedefs | |
typedef unsigned long | space_t |
Functions | |
EXPORT_SYMBOL_GPL (sba_list) | |
void __init | sba_init (void) |
void * | sba_get_iommu (struct parisc_device *pci_hba) |
void | sba_directed_lmmio (struct parisc_device *pci_hba, struct resource *r) |
void | sba_distributed_lmmio (struct parisc_device *pci_hba, struct resource *r) |
Variables | |
struct sba_device * | sba_list |
#define DBG_INIT | ( | x... | ) |
Definition at line 70 of file sba_iommu.c.
#define DBG_RES | ( | x... | ) |
Definition at line 89 of file sba_iommu.c.
#define DBG_RUN | ( | x... | ) |
Definition at line 76 of file sba_iommu.c.
#define DBG_RUN_SG | ( | x... | ) |
Definition at line 82 of file sba_iommu.c.
#define DEFAULT_DMA_HINT_REG 0 |
Definition at line 94 of file sba_iommu.c.
#define KERNEL_SPACE 0 |
Definition at line 524 of file sba_iommu.c.
#define MODULE_NAME "SBA" |
Definition at line 52 of file sba_iommu.c.
Definition at line 300 of file sba_iommu.c.
#define PDIR_INDEX | ( | iovp | ) | ((iovp)>>IOVP_SHIFT) |
Definition at line 314 of file sba_iommu.c.
#define PIDE_FLAG 0x80000000UL |
Definition at line 913 of file sba_iommu.c.
#define PIRANHA_ADDR_MASK 0x00160000UL /* bit 17,18,20 */ |
Definition at line 1112 of file sba_iommu.c.
#define PIRANHA_ADDR_VAL 0x00060000UL /* bit 17,18 on */ |
Definition at line 1113 of file sba_iommu.c.
#define READ_REG | ( | addr | ) | READ_REG32(addr) |
Definition at line 138 of file sba_iommu.c.
Definition at line 129 of file sba_iommu.c.
Definition at line 130 of file sba_iommu.c.
Definition at line 317 of file sba_iommu.c.
#define RESMAP_MASK | ( | n | ) | (~0UL << (BITS_PER_LONG - (n))) |
Definition at line 316 of file sba_iommu.c.
#define SBA_DEV | ( | d | ) | ((struct sba_device *) (d)) |
Definition at line 108 of file sba_iommu.c.
#define sba_dump_ranges | ( | x | ) |
Definition at line 182 of file sba_iommu.c.
#define sba_dump_tlb | ( | x | ) |
Definition at line 183 of file sba_iommu.c.
#define SBA_INLINE __inline__ |
Definition at line 92 of file sba_iommu.c.
Definition at line 310 of file sba_iommu.c.
Definition at line 311 of file sba_iommu.c.
#define WRITE_REG | ( | value, | |
addr | |||
) | WRITE_REG32(value, addr) |
Definition at line 139 of file sba_iommu.c.
Definition at line 523 of file sba_iommu.c.
EXPORT_SYMBOL_GPL | ( | sba_list | ) |
void sba_directed_lmmio | ( | struct parisc_device * | pci_hba, |
struct resource * | r | ||
) |
sba_directed_lmmio - return first directed LMMIO range routed to rope : The parisc device. : resource PCI host controller wants start/end fields assigned.
For the given parisc PCI controller, determine if any direct ranges are routed down the corresponding rope.
Definition at line 2033 of file sba_iommu.c.
void sba_distributed_lmmio | ( | struct parisc_device * | pci_hba, |
struct resource * | r | ||
) |
sba_distributed_lmmio - return portion of distributed LMMIO range : The parisc device. : resource PCI host controller wants start/end fields assigned.
For the given parisc PCI controller, return portion of distributed LMMIO range. The distributed LMMIO is always present and it's just a question of the base address and size of the range.
Definition at line 2076 of file sba_iommu.c.
void* sba_get_iommu | ( | struct parisc_device * | pci_hba | ) |
Definition at line 1999 of file sba_iommu.c.
struct sba_device* sba_list |
Definition at line 96 of file sba_iommu.c.