• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/sparc/mm/

Lines Matching defs:iommu

2  * iommu.c:  IOMMU specific routines for memory management.
26 #include <asm/iommu.h>
63 struct iommu_struct *iommu;
68 iommu = kmalloc(sizeof(struct iommu_struct), GFP_ATOMIC);
69 if (!iommu) {
70 prom_printf("Unable to allocate iommu structure\n");
73 iommu->regs = NULL;
79 iommu->regs = (struct iommu_regs *)
82 if (!iommu->regs) {
86 impl = (iommu->regs->control & IOMMU_CTRL_IMPL) >> 28;
87 vers = (iommu->regs->control & IOMMU_CTRL_VERS) >> 24;
88 tmp = iommu->regs->control;
91 iommu->regs->control = tmp;
92 iommu_invalidate(iommu->regs);
93 iommu->start = IOMMU_START;
94 iommu->end = 0xffffffff;
103 prom_printf("Unable to allocate iommu table [0x%08x]\n",
107 iommu->page_table = (iopte_t *)tmp;
110 memset(iommu->page_table, 0, IOMMU_NPTES*sizeof(iopte_t));
113 iommu->regs->base = __pa((unsigned long) iommu->page_table) >> 4;
114 iommu_invalidate(iommu->regs);
118 prom_printf("Unable to allocate iommu bitmap [%d]\n",
122 bit_map_init(&iommu->usemap, bitmap, IOMMU_NPTES);
127 iommu->usemap.num_colors = vac_cache_size >> PAGE_SHIFT;
129 iommu->usemap.num_colors = 1;
132 impl, vers, iommu->page_table,
135 sbus->iommu = iommu;
169 struct iommu_struct *iommu = sbus->iommu;
176 ioptex = bit_map_string_get(&iommu->usemap, npages, page_to_pfn(page));
178 panic("iommu out");
179 busa0 = iommu->start + (ioptex << PAGE_SHIFT);
180 iopte0 = &iommu->page_table[ioptex];
186 iommu_invalidate_page(iommu->regs, busa);
289 struct iommu_struct *iommu = sbus->iommu;
293 BUG_ON(busa < iommu->start);
294 ioptex = (busa - iommu->start) >> PAGE_SHIFT;
296 iopte_val(iommu->page_table[ioptex + i]) = 0;
297 iommu_invalidate_page(iommu->regs, busa);
300 bit_map_clear(&iommu->usemap, ioptex, npages);
332 struct iommu_struct *iommu = sbus_root->iommu;
333 iopte_t *iopte = iommu->page_table;
342 ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT,
345 panic("iommu out");
389 iommu_invalidate(iommu->regs);
391 *pba = iommu->start + (ioptex << PAGE_SHIFT);
397 struct iommu_struct *iommu = sbus_root->iommu;
398 iopte_t *iopte = iommu->page_table;
400 int ioptex = (busa - iommu->start) >> PAGE_SHIFT;
412 iommu_invalidate(iommu->regs);
413 bit_map_clear(&iommu->usemap, ioptex, len >> PAGE_SHIFT);
418 struct iommu_struct *iommu = sbus_root->iommu;
419 iopte_t *iopte = iommu->page_table;
421 iopte += ((busa - iommu->start) >> PAGE_SHIFT);