Lines Matching full:window
125 * - on bus setup, look for a matching window, or create one
162 struct iommu_window *window = in tce_build_cell() local
180 (window->ioid & CBE_IOPTE_IOID_Mask); in tce_build_cell()
183 CBE_IOPTE_SO_RW | (window->ioid & CBE_IOPTE_IOID_Mask); in tce_build_cell()
195 invalidate_tce_cache(window->iommu, io_pte, npages); in tce_build_cell()
207 struct iommu_window *window = in tce_free_cell() local
218 __pa(window->iommu->pad_page) | in tce_free_cell()
219 (window->ioid & CBE_IOPTE_IOID_Mask); in tce_free_cell()
229 invalidate_tce_cache(window->iommu, io_pte, npages); in tce_free_cell()
451 struct iommu_window *window; in cell_iommu_setup_window() local
457 window = kzalloc_node(sizeof(*window), GFP_KERNEL, iommu->nid); in cell_iommu_setup_window()
458 BUG_ON(window == NULL); in cell_iommu_setup_window()
460 window->offset = offset; in cell_iommu_setup_window()
461 window->size = size; in cell_iommu_setup_window()
462 window->ioid = ioid; in cell_iommu_setup_window()
463 window->iommu = iommu; in cell_iommu_setup_window()
465 window->table.it_blocksize = 16; in cell_iommu_setup_window()
466 window->table.it_base = (unsigned long)iommu->ptab; in cell_iommu_setup_window()
467 window->table.it_index = iommu->nid; in cell_iommu_setup_window()
468 window->table.it_page_shift = IOMMU_PAGE_SHIFT_4K; in cell_iommu_setup_window()
469 window->table.it_offset = in cell_iommu_setup_window()
470 (offset >> window->table.it_page_shift) + pte_offset; in cell_iommu_setup_window()
471 window->table.it_size = size >> window->table.it_page_shift; in cell_iommu_setup_window()
472 window->table.it_ops = &cell_iommu_ops; in cell_iommu_setup_window()
474 if (!iommu_init_table(&window->table, iommu->nid, 0, 0)) in cell_iommu_setup_window()
477 pr_debug("\tioid %d\n", window->ioid); in cell_iommu_setup_window()
478 pr_debug("\tblocksize %ld\n", window->table.it_blocksize); in cell_iommu_setup_window()
479 pr_debug("\tbase 0x%016lx\n", window->table.it_base); in cell_iommu_setup_window()
480 pr_debug("\toffset 0x%lx\n", window->table.it_offset); in cell_iommu_setup_window()
481 pr_debug("\tsize %ld\n", window->table.it_size); in cell_iommu_setup_window()
483 list_add(&window->list, &iommu->windows); in cell_iommu_setup_window()
486 return window; in cell_iommu_setup_window()
492 * This code also assumes that we have a window that starts at 0, in cell_iommu_setup_window()
500 __set_bit(0, window->table.it_map); in cell_iommu_setup_window()
501 tce_build_cell(&window->table, window->table.it_offset, 1, in cell_iommu_setup_window()
504 return window; in cell_iommu_setup_window()
527 struct iommu_window *window; in cell_get_iommu_table() local
530 /* Current implementation uses the first window available in that in cell_get_iommu_table()
540 window = list_entry(iommu->windows.next, struct iommu_window, list); in cell_get_iommu_table()
542 return &window->table; in cell_get_iommu_table()
591 /* Use ibm,dma-window if available, else, hard code ! */ in cell_iommu_get_window()
592 dma_window = of_get_property(np, "ibm,dma-window", NULL); in cell_iommu_get_window()
623 * multiple window support since the cell iommu supports per-page ioids in cell_iommu_alloc()
653 /* Obtain a window for it */ in cell_iommu_init_one()
656 pr_debug("\ttranslating window 0x%lx...0x%lx\n", in cell_iommu_init_one()
713 * window which is always the case so far on Cell, thus we in cell_iommu_init_disabled()
715 * the DMA window from there. in cell_iommu_init_disabled()
733 /* If we found a DMA window, we check if it's big enough to enclose in cell_iommu_init_disabled()
737 printk(KERN_WARNING "iommu: force-enabled, dma window" in cell_iommu_init_disabled()
764 * we setup the fixed mapping immediately above the normal IOMMU window.
767 * IOMMU window from 0-2GB and the fixed mapping window from 2GB to 6GB. In
773 * mapping above the normal IOMMU window as we would run out of address space.
774 * Instead we move the normal IOMMU window to coincide with the hash page
924 * dynamic region, so find the top of the largest IOMMU window in cell_iommu_fixed_mapping_init()
938 hbase = 0; /* use the device tree window */ in cell_iommu_fixed_mapping_init()
953 /* The window must start and end on a segment boundary */ in cell_iommu_fixed_mapping_init()
956 pr_debug("iommu: hash window not segment aligned\n"); in cell_iommu_fixed_mapping_init()
960 /* Check the hash window fits inside the real DMA window */ in cell_iommu_fixed_mapping_init()
965 pr_debug("iommu: hash window doesn't fit in" in cell_iommu_fixed_mapping_init()
966 "real DMA window\n"); in cell_iommu_fixed_mapping_init()
987 printk(KERN_DEBUG "iommu: node %d, dynamic window 0x%lx-0x%lx " in cell_iommu_fixed_mapping_init()
988 "fixed window 0x%lx-0x%lx\n", iommu->nid, dbase, in cell_iommu_fixed_mapping_init()