Lines Matching full:window

348 /* Dynamic DMA Window support */
363 /* prevents races between memory on/offline and window creation */
365 /* protects initializing window twice for same device */
367 #define DIRECT64_PROPNAME "linux,direct64-ddr-window-info"
609 /* Calculate amount of DMA window per slot. Each window must be in pci_dma_bus_setup_pSeries()
616 /* No ISA/IDE - just set window size and return */ in pci_dma_bus_setup_pSeries()
621 pr_debug("No ISA/IDE, window size is 0x%llx\n", in pci_dma_bus_setup_pSeries()
648 pr_debug("ISA/IDE, window size is 0x%llx\n", pci->phb->dma_window_size); in pci_dma_bus_setup_pSeries()
700 /* Find nearest ibm,dma-window, walking up the device tree */ in pci_dma_bus_setup_pSeriesLP()
702 dma_window = of_get_property(pdn, "ibm,dma-window", NULL); in pci_dma_bus_setup_pSeriesLP()
708 pr_debug(" no ibm,dma-window property !\n"); in pci_dma_bus_setup_pSeriesLP()
742 * the window sizes already. in pci_dma_dev_setup_pSeries()
794 /* clear the whole window, note the arg is in kernel pages */ in remove_dma_window()
798 pr_warn("%pOF failed to clear tces in window.\n", in remove_dma_window()
801 pr_debug("%pOF successfully cleared tces in window.\n", in remove_dma_window()
806 pr_warn("%pOF: failed to remove direct window: rtas returned " in remove_dma_window()
807 "%d to ibm,remove-pe-dma-window(%x) %llx\n", in remove_dma_window()
810 pr_debug("%pOF: successfully removed direct window: rtas returned " in remove_dma_window()
811 "%d to ibm,remove-pe-dma-window(%x) %llx\n", in remove_dma_window()
838 pr_warn("%pOF: failed to remove direct window property: %d\n", in remove_ddw()
844 struct direct_window *window; in find_existing_ddw() local
849 /* check if we already created a window and dupe that config if so */ in find_existing_ddw()
850 list_for_each_entry(window, &direct_window_list, list) { in find_existing_ddw()
851 if (window->device == pdn) { in find_existing_ddw()
852 direct64 = window->prop; in find_existing_ddw()
866 struct direct_window *window; in find_existing_ddw_windows() local
877 window = kzalloc(sizeof(*window), GFP_KERNEL); in find_existing_ddw_windows()
878 if (!window || len < sizeof(struct dynamic_dma_window_prop)) { in find_existing_ddw_windows()
879 kfree(window); in find_existing_ddw_windows()
884 window->device = pdn; in find_existing_ddw_windows()
885 window->prop = direct64; in find_existing_ddw_windows()
887 list_add(&window->list, &direct_window_list); in find_existing_ddw_windows()
953 * Get the config address and phb buid of the PE window. in query_ddw()
956 * dma-window property in query_ddw()
999 * Get the config address and phb buid of the PE window. in create_ddw()
1002 * dma-window property in create_ddw()
1016 "ibm,create-pe-dma-window(%x) %x %x %x %x %x returned %d " in create_ddw()
1040 * for the huge DMA window as MAX_PHYSMEM_BITS. in ddw_memory_hotplug_max()
1073 * That rtas-call can be used to restore the default DMA window for the device.
1108 * Future: also check if we can remap the base window for our base page size
1121 struct direct_window *window; in enable_ddw() local
1136 * DMA window again, as it will race with in-flight operations in enable_ddw()
1147 * ibm,query-pe-dma-window in enable_ddw()
1148 * ibm,create-pe-dma-window in enable_ddw()
1149 * ibm,remove-pe-dma-window in enable_ddw()
1159 * Query if there is a second window of size to map the in enable_ddw()
1170 * If there is no window available, remove the default DMA window, in enable_ddw()
1172 * new DDW window. in enable_ddw()
1180 default_win = of_find_property(pdn, "ibm,dma-window", NULL); in enable_ddw()
1191 /* Query again, to check if the window is available */ in enable_ddw()
1213 /* verify the window * number of ptes will map the partition */ in enable_ddw()
1226 "couldn't allocate property for 64bit dma window\n"); in enable_ddw()
1251 window = kzalloc(sizeof(*window), GFP_KERNEL); in enable_ddw()
1252 if (!window) in enable_ddw()
1258 dev_info(&dev->dev, "failed to map direct window for %pOF: %d\n", in enable_ddw()
1265 dev_err(&dev->dev, "unable to add dma window property for %pOF: %d", in enable_ddw()
1270 window->device = pdn; in enable_ddw()
1271 window->prop = ddwprop; in enable_ddw()
1273 list_add(&window->list, &direct_window_list); in enable_ddw()
1280 kfree(window); in enable_ddw()
1315 * contain the dma-window properties per-device and not necessarily in pci_dma_dev_setup_pSeriesLP()
1317 * either hit a dma-window property, OR find a parent with a table in pci_dma_dev_setup_pSeriesLP()
1325 dma_window = of_get_property(pdn, "ibm,dma-window", NULL); in pci_dma_dev_setup_pSeriesLP()
1332 "no DMA window found for pci dev=%s dn=%pOF\n", in pci_dma_dev_setup_pSeriesLP()
1350 pr_debug(" found DMA window, table: %p\n", pci->table_group); in pci_dma_dev_setup_pSeriesLP()
1362 /* only attempt to use a new window if 64-bit DMA is requested */ in iommu_bypass_supported_pSeriesLP()
1369 * the device tree might contain the dma-window properties in iommu_bypass_supported_pSeriesLP()
1371 * search upwards in the tree until we either hit a dma-window in iommu_bypass_supported_pSeriesLP()
1376 dma_window = of_get_property(pdn, "ibm,dma-window", NULL); in iommu_bypass_supported_pSeriesLP()
1393 struct direct_window *window; in iommu_mem_notifier() local
1400 list_for_each_entry(window, &direct_window_list, list) { in iommu_mem_notifier()
1402 arg->nr_pages, window->prop); in iommu_mem_notifier()
1410 list_for_each_entry(window, &direct_window_list, list) { in iommu_mem_notifier()
1412 arg->nr_pages, window->prop); in iommu_mem_notifier()
1436 struct direct_window *window; in iommu_reconfig_notifier() local
1453 list_for_each_entry(window, &direct_window_list, list) { in iommu_reconfig_notifier()
1454 if (window->device == np) { in iommu_reconfig_notifier()
1455 list_del(&window->list); in iommu_reconfig_notifier()
1456 kfree(window); in iommu_reconfig_notifier()