Lines Matching refs:win
53 static int h_allocate_vas_window(struct pseries_vas_window *win, u64 *domain, in h_allocate_vas_window() argument
68 if (win->win_addr == VAS_INVALID_WIN_ADDRESS) { in h_allocate_vas_window()
72 win->vas_win.winid = retbuf[0]; in h_allocate_vas_window()
73 win->win_addr = retbuf[1]; in h_allocate_vas_window()
74 win->complete_irq = retbuf[2]; in h_allocate_vas_window()
75 win->fault_irq = retbuf[3]; in h_allocate_vas_window()
111 static int h_modify_vas_window(struct pseries_vas_window *win) in h_modify_vas_window() argument
121 win->vas_win.winid, win->pid, 0, in h_modify_vas_window()
131 rc, win->vas_win.winid, win->pid); in h_modify_vas_window()
444 struct pseries_vas_window *win; in vas_paste_address() local
446 win = container_of(vwin, struct pseries_vas_window, vas_win); in vas_paste_address()
447 return win->win_addr; in vas_paste_address()
450 static int deallocate_free_window(struct pseries_vas_window *win) in deallocate_free_window() argument
463 rc = h_deallocate_vas_window(win->vas_win.winid); in deallocate_free_window()
465 free_irq_setup(win); in deallocate_free_window()
472 struct pseries_vas_window *win; in vas_deallocate_window() local
479 win = container_of(vwin, struct pseries_vas_window, vas_win); in vas_deallocate_window()
482 if (win->win_type >= VAS_MAX_FEAT_TYPE) { in vas_deallocate_window()
484 vwin->winid, win->win_type); in vas_deallocate_window()
488 caps = &vascaps[win->win_type].caps; in vas_deallocate_window()
496 if (!(win->vas_win.status & VAS_WIN_NO_CRED_CLOSE) && in vas_deallocate_window()
497 !(win->vas_win.status & VAS_WIN_MIGRATE_CLOSE)) { in vas_deallocate_window()
498 rc = deallocate_free_window(win); in vas_deallocate_window()
504 vascaps[win->win_type].nr_close_wins--; in vas_deallocate_window()
506 list_del(&win->win_list); in vas_deallocate_window()
508 vascaps[win->win_type].nr_open_windows--; in vas_deallocate_window()
514 kfree(win); in vas_deallocate_window()
615 struct pseries_vas_window *win = NULL, *tmp; in reconfig_open_windows() local
642 list_for_each_entry_safe(win, tmp, &vcaps->list, win_list) { in reconfig_open_windows()
658 list_for_each_entry_safe_from(win, tmp, &vcaps->list, win_list) { in reconfig_open_windows()
667 if ((win->vas_win.status & VAS_WIN_NO_CRED_CLOSE) && in reconfig_open_windows()
668 (win->vas_win.status & VAS_WIN_MIGRATE_CLOSE)) { in reconfig_open_windows()
669 win->vas_win.status &= ~flag; in reconfig_open_windows()
677 if (!(win->vas_win.status & flag)) in reconfig_open_windows()
680 rc = allocate_setup_window(win, (u64 *)&domain[0], in reconfig_open_windows()
685 rc = h_modify_vas_window(win); in reconfig_open_windows()
689 mutex_lock(&win->vas_win.task_ref.mmap_mutex); in reconfig_open_windows()
693 win->vas_win.status &= ~flag; in reconfig_open_windows()
694 mutex_unlock(&win->vas_win.task_ref.mmap_mutex); in reconfig_open_windows()
695 win->win_type = caps->win_type; in reconfig_open_windows()
706 free_irq_setup(win); in reconfig_open_windows()
707 h_deallocate_vas_window(win->vas_win.winid); in reconfig_open_windows()
723 struct pseries_vas_window *win, *tmp; in reconfig_close_windows() local
733 list_for_each_entry_safe(win, tmp, &vcap->list, win_list) { in reconfig_close_windows()
741 if ((win->vas_win.status & VAS_WIN_MIGRATE_CLOSE) || in reconfig_close_windows()
742 (win->vas_win.status & VAS_WIN_NO_CRED_CLOSE)) { in reconfig_close_windows()
743 win->vas_win.status |= flag; in reconfig_close_windows()
747 task_ref = &win->vas_win.task_ref; in reconfig_close_windows()
760 win->vas_win.status |= flag; in reconfig_close_windows()
780 rc = deallocate_free_window(win); in reconfig_close_windows()