Lines Matching defs:window
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
616 /* No ISA/IDE - just set window size and return */
621 pr_debug("No ISA/IDE, window size is 0x%llx\n",
648 pr_debug("ISA/IDE, window size is 0x%llx\n", pci->phb->dma_window_size);
700 /* Find nearest ibm,dma-window, walking up the device tree */
702 dma_window = of_get_property(pdn, "ibm,dma-window", NULL);
708 pr_debug(" no ibm,dma-window property !\n");
742 * the window sizes already.
794 /* clear the whole window, note the arg is in kernel pages */
798 pr_warn("%pOF failed to clear tces in window.\n",
801 pr_debug("%pOF successfully cleared tces in window.\n",
806 pr_warn("%pOF: failed to remove direct window: rtas returned "
807 "%d to ibm,remove-pe-dma-window(%x) %llx\n",
810 pr_debug("%pOF: successfully removed direct window: rtas returned "
811 "%d to ibm,remove-pe-dma-window(%x) %llx\n",
838 pr_warn("%pOF: failed to remove direct window property: %d\n",
844 struct direct_window *window;
849 /* check if we already created a window and dupe that config if so */
850 list_for_each_entry(window, &direct_window_list, list) {
851 if (window->device == pdn) {
852 direct64 = window->prop;
866 struct direct_window *window;
877 window = kzalloc(sizeof(*window), GFP_KERNEL);
878 if (!window || len < sizeof(struct dynamic_dma_window_prop)) {
879 kfree(window);
884 window->device = pdn;
885 window->prop = direct64;
887 list_add(&window->list, &direct_window_list);
953 * Get the config address and phb buid of the PE window.
956 * dma-window property
999 * Get the config address and phb buid of the PE window.
1002 * dma-window property
1016 "ibm,create-pe-dma-window(%x) %x %x %x %x %x returned %d "
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;
1127 * DMA window again, as it will race with in-flight operations
1138 * ibm,query-pe-dma-window
1139 * ibm,create-pe-dma-window
1140 * ibm,remove-pe-dma-window
1150 * Query if there is a second window of size to map the
1161 * If there is no window available, remove the default DMA window,
1163 * new DDW window.
1171 default_win = of_find_property(pdn, "ibm,dma-window", NULL);
1182 /* Query again, to check if the window is available */
1204 /* verify the window * number of ptes will map the partition */
1217 "couldn't allocate property for 64bit dma window\n");
1242 window = kzalloc(sizeof(*window), GFP_KERNEL);
1243 if (!window)
1249 dev_info(&dev->dev, "failed to map direct window for %pOF: %d\n",
1256 dev_err(&dev->dev, "unable to add dma window property for %pOF: %d",
1261 window->device = pdn;
1262 window->prop = ddwprop;
1264 list_add(&window->list, &direct_window_list);
1271 kfree(window);
1306 * contain the dma-window properties per-device and not necessarily
1308 * either hit a dma-window property, OR find a parent with a table
1316 dma_window = of_get_property(pdn, "ibm,dma-window", NULL);
1323 "no DMA window found for pci dev=%s dn=%pOF\n",
1341 pr_debug(" found DMA window, table: %p\n", pci->table_group);
1353 /* only attempt to use a new window if 64-bit DMA is requested */
1360 * the device tree might contain the dma-window properties
1362 * search upwards in the tree until we either hit a dma-window
1367 dma_window = of_get_property(pdn, "ibm,dma-window", NULL);
1384 struct direct_window *window;
1391 list_for_each_entry(window, &direct_window_list, list) {
1393 arg->nr_pages, window->prop);
1401 list_for_each_entry(window, &direct_window_list, list) {
1403 arg->nr_pages, window->prop);
1427 struct direct_window *window;
1444 list_for_each_entry(window, &direct_window_list, list) {
1445 if (window->device == np) {
1446 list_del(&window->list);
1447 kfree(window);