Lines Matching refs:window

123  *   - on bus setup, look for a matching window, or create one
160 struct iommu_window *window =
178 (window->ioid & CBE_IOPTE_IOID_Mask);
181 CBE_IOPTE_SO_RW | (window->ioid & CBE_IOPTE_IOID_Mask);
193 invalidate_tce_cache(window->iommu, io_pte, npages);
205 struct iommu_window *window =
216 __pa(window->iommu->pad_page) |
217 (window->ioid & CBE_IOPTE_IOID_Mask);
227 invalidate_tce_cache(window->iommu, io_pte, npages);
429 struct iommu_window *window;
433 list_for_each_entry(window, &(iommu->windows), list) {
434 if (window->offset == offset && window->size == size)
435 return window;
466 struct iommu_window *window;
472 window = kzalloc_node(sizeof(*window), GFP_KERNEL, iommu->nid);
473 BUG_ON(window == NULL);
475 window->offset = offset;
476 window->size = size;
477 window->ioid = ioid;
478 window->iommu = iommu;
480 window->table.it_blocksize = 16;
481 window->table.it_base = (unsigned long)iommu->ptab;
482 window->table.it_index = iommu->nid;
483 window->table.it_page_shift = IOMMU_PAGE_SHIFT_4K;
484 window->table.it_offset =
485 (offset >> window->table.it_page_shift) + pte_offset;
486 window->table.it_size = size >> window->table.it_page_shift;
487 window->table.it_ops = &cell_iommu_ops;
489 iommu_init_table(&window->table, iommu->nid, 0, 0);
491 pr_debug("\tioid %d\n", window->ioid);
492 pr_debug("\tblocksize %ld\n", window->table.it_blocksize);
493 pr_debug("\tbase 0x%016lx\n", window->table.it_base);
494 pr_debug("\toffset 0x%lx\n", window->table.it_offset);
495 pr_debug("\tsize %ld\n", window->table.it_size);
497 list_add(&window->list, &iommu->windows);
500 return window;
506 * This code also assumes that we have a window that starts at 0,
514 __set_bit(0, window->table.it_map);
515 tce_build_cell(&window->table, window->table.it_offset, 1,
518 return window;
541 struct iommu_window *window;
544 /* Current implementation uses the first window available in that
554 window = list_entry(iommu->windows.next, struct iommu_window, list);
556 return &window->table;
605 /* Use ibm,dma-window if available, else, hard code ! */
606 dma_window = of_get_property(np, "ibm,dma-window", NULL);
637 * multiple window support since the cell iommu supports per-page ioids
667 /* Obtain a window for it */
670 pr_debug("\ttranslating window 0x%lx...0x%lx\n",
725 * window which is always the case so far on Cell, thus we
727 * the DMA window from there.
745 /* If we found a DMA window, we check if it's big enough to enclose
749 printk(KERN_WARNING "iommu: force-enabled, dma window"
776 * we setup the fixed mapping immediately above the normal IOMMU window.
779 * IOMMU window from 0-2GB and the fixed mapping window from 2GB to 6GB. In
785 * mapping above the normal IOMMU window as we would run out of address space.
786 * Instead we move the normal IOMMU window to coincide with the hash page
936 * dynamic region, so find the top of the largest IOMMU window
950 hbase = 0; /* use the device tree window */
965 /* The window must start and end on a segment boundary */
968 pr_debug("iommu: hash window not segment aligned\n");
972 /* Check the hash window fits inside the real DMA window */
977 pr_debug("iommu: hash window doesn't fit in"
978 "real DMA window\n");
999 printk(KERN_DEBUG "iommu: node %d, dynamic window 0x%lx-0x%lx "
1000 "fixed window 0x%lx-0x%lx\n", iommu->nid, dbase,