• Home
  • Raw
  • Download

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()
1064 * That rtas-call can be used to restore the default DMA window for the device.
1099 * Future: also check if we can remap the base window for our base page size
1112 struct direct_window *window; in enable_ddw() local
1127 * DMA window again, as it will race with in-flight operations in enable_ddw()
1138 * ibm,query-pe-dma-window in enable_ddw()
1139 * ibm,create-pe-dma-window in enable_ddw()
1140 * ibm,remove-pe-dma-window in enable_ddw()
1150 * Query if there is a second window of size to map the in enable_ddw()
1161 * If there is no window available, remove the default DMA window, in enable_ddw()
1163 * new DDW window. in enable_ddw()
1171 default_win = of_find_property(pdn, "ibm,dma-window", NULL); in enable_ddw()
1182 /* Query again, to check if the window is available */ in enable_ddw()
1204 /* verify the window * number of ptes will map the partition */ in enable_ddw()
1217 "couldn't allocate property for 64bit dma window\n"); in enable_ddw()
1242 window = kzalloc(sizeof(*window), GFP_KERNEL); in enable_ddw()
1243 if (!window) in enable_ddw()
1249 dev_info(&dev->dev, "failed to map direct window for %pOF: %d\n", in enable_ddw()
1256 dev_err(&dev->dev, "unable to add dma window property for %pOF: %d", in enable_ddw()
1261 window->device = pdn; in enable_ddw()
1262 window->prop = ddwprop; in enable_ddw()
1264 list_add(&window->list, &direct_window_list); in enable_ddw()
1271 kfree(window); in enable_ddw()
1306 * contain the dma-window properties per-device and not necessarily in pci_dma_dev_setup_pSeriesLP()
1308 * either hit a dma-window property, OR find a parent with a table in pci_dma_dev_setup_pSeriesLP()
1316 dma_window = of_get_property(pdn, "ibm,dma-window", NULL); in pci_dma_dev_setup_pSeriesLP()
1323 "no DMA window found for pci dev=%s dn=%pOF\n", in pci_dma_dev_setup_pSeriesLP()
1341 pr_debug(" found DMA window, table: %p\n", pci->table_group); in pci_dma_dev_setup_pSeriesLP()
1353 /* only attempt to use a new window if 64-bit DMA is requested */ in iommu_bypass_supported_pSeriesLP()
1360 * the device tree might contain the dma-window properties in iommu_bypass_supported_pSeriesLP()
1362 * search upwards in the tree until we either hit a dma-window in iommu_bypass_supported_pSeriesLP()
1367 dma_window = of_get_property(pdn, "ibm,dma-window", NULL); in iommu_bypass_supported_pSeriesLP()
1384 struct direct_window *window; in iommu_mem_notifier() local
1391 list_for_each_entry(window, &direct_window_list, list) { in iommu_mem_notifier()
1393 arg->nr_pages, window->prop); in iommu_mem_notifier()
1401 list_for_each_entry(window, &direct_window_list, list) { in iommu_mem_notifier()
1403 arg->nr_pages, window->prop); in iommu_mem_notifier()
1427 struct direct_window *window; in iommu_reconfig_notifier() local
1444 list_for_each_entry(window, &direct_window_list, list) { in iommu_reconfig_notifier()
1445 if (window->device == np) { in iommu_reconfig_notifier()
1446 list_del(&window->list); in iommu_reconfig_notifier()
1447 kfree(window); in iommu_reconfig_notifier()