Lines Matching refs:rc
36 static long hcall_return_busy_check(long rc) in hcall_return_busy_check() argument
39 if (H_IS_LONG_BUSY(rc)) { in hcall_return_busy_check()
40 msleep(get_longbusy_msecs(rc)); in hcall_return_busy_check()
41 rc = H_BUSY; in hcall_return_busy_check()
42 } else if (rc == H_BUSY) { in hcall_return_busy_check()
46 return rc; in hcall_return_busy_check()
56 long rc; in h_allocate_vas_window() local
59 rc = plpar_hcall9(H_ALLOCATE_VAS_WINDOW, retbuf, wintype, in h_allocate_vas_window()
63 rc = hcall_return_busy_check(rc); in h_allocate_vas_window()
64 } while (rc == H_BUSY); in h_allocate_vas_window()
66 if (rc == H_SUCCESS) { in h_allocate_vas_window()
79 rc, wintype, credits); in h_allocate_vas_window()
89 long rc; in h_deallocate_vas_window() local
92 rc = plpar_hcall_norets(H_DEALLOCATE_VAS_WINDOW, winid); in h_deallocate_vas_window()
94 rc = hcall_return_busy_check(rc); in h_deallocate_vas_window()
95 } while (rc == H_BUSY); in h_deallocate_vas_window()
97 if (rc == H_SUCCESS) in h_deallocate_vas_window()
101 rc, winid); in h_deallocate_vas_window()
112 long rc; in h_modify_vas_window() local
119 rc = plpar_hcall_norets(H_MODIFY_VAS_WINDOW, in h_modify_vas_window()
123 rc = hcall_return_busy_check(rc); in h_modify_vas_window()
124 } while (rc == H_BUSY); in h_modify_vas_window()
126 if (rc == H_SUCCESS) in h_modify_vas_window()
130 rc, win->vas_win.winid, win->pid); in h_modify_vas_window()
149 long rc; in h_query_vas_capabilities() local
151 rc = plpar_hcall_norets(hcall, query_type, result); in h_query_vas_capabilities()
153 if (rc == H_SUCCESS) in h_query_vas_capabilities()
157 if (rc != H_FUNCTION) { in h_query_vas_capabilities()
162 rc, query_type, result); in h_query_vas_capabilities()
174 long rc; in h_get_nx_fault() local
176 rc = plpar_hcall_norets(H_GET_NX_FAULT, winid, buffer); in h_get_nx_fault()
178 if (rc == H_SUCCESS) in h_get_nx_fault()
182 rc, winid, buffer); in h_get_nx_fault()
201 int rc; in pseries_vas_fault_thread_fn() local
204 rc = h_get_nx_fault(txwin->vas_win.winid, (u64)virt_to_phys(&crb)); in pseries_vas_fault_thread_fn()
205 if (!rc) { in pseries_vas_fault_thread_fn()
244 int rc; in allocate_setup_window() local
246 rc = h_allocate_vas_window(txwin, domain, wintype, DEF_WIN_CREDS); in allocate_setup_window()
247 if (rc) in allocate_setup_window()
248 return rc; in allocate_setup_window()
257 rc = -EINVAL; in allocate_setup_window()
264 rc = -ENOMEM; in allocate_setup_window()
268 rc = request_threaded_irq(txwin->fault_virq, in allocate_setup_window()
272 if (rc) { in allocate_setup_window()
274 txwin->vas_win.winid, txwin->fault_virq, rc); in allocate_setup_window()
287 return rc; in allocate_setup_window()
304 int rc; in vas_allocate_window() local
344 rc = -EINVAL; in vas_allocate_window()
361 rc = plpar_hcall9(H_HOME_NODE_ASSOCIATIVITY, domain, in vas_allocate_window()
363 if (rc != H_SUCCESS) { in vas_allocate_window()
364 pr_err("H_HOME_NODE_ASSOCIATIVITY error: %d\n", rc); in vas_allocate_window()
388 rc = -EBUSY; in vas_allocate_window()
390 rc = allocate_setup_window(txwin, (u64 *)&domain[0], in vas_allocate_window()
393 if (rc) in vas_allocate_window()
399 rc = h_modify_vas_window(txwin); in vas_allocate_window()
400 if (!rc) in vas_allocate_window()
401 rc = get_vas_user_win_ref(&txwin->vas_win.task_ref); in vas_allocate_window()
402 if (rc) in vas_allocate_window()
425 rc = -EBUSY; in vas_allocate_window()
438 return ERR_PTR(rc); in vas_allocate_window()
451 int rc = 0; in deallocate_free_window() local
462 rc = h_deallocate_vas_window(win->vas_win.winid); in deallocate_free_window()
463 if (!rc) in deallocate_free_window()
466 return rc; in deallocate_free_window()
473 int rc = 0; in vas_deallocate_window() local
497 rc = deallocate_free_window(win); in vas_deallocate_window()
498 if (rc) { in vas_deallocate_window()
500 return rc; in vas_deallocate_window()
552 int rc = 0; in get_vas_capabilities() local
561 rc = h_query_vas_capabilities(H_QUERY_VAS_CAPABILITIES, feat, in get_vas_capabilities()
563 if (rc) in get_vas_capabilities()
564 return rc; in get_vas_capabilities()
592 rc = sysfs_add_vas_caps(caps); in get_vas_capabilities()
593 if (rc) in get_vas_capabilities()
594 return rc; in get_vas_capabilities()
615 int rc, mv_ents = 0; in reconfig_open_windows() local
679 rc = allocate_setup_window(win, (u64 *)&domain[0], in reconfig_open_windows()
681 if (rc) in reconfig_open_windows()
682 return rc; in reconfig_open_windows()
684 rc = h_modify_vas_window(win); in reconfig_open_windows()
685 if (rc) in reconfig_open_windows()
707 return rc; in reconfig_open_windows()
725 int rc = 0, flag; in reconfig_close_windows() local
775 rc = deallocate_free_window(win); in reconfig_close_windows()
781 if (rc && !migrate) in reconfig_close_windows()
782 return rc; in reconfig_close_windows()
810 int rc = 0, nr_active_wins; in vas_reconfig_capabilties() local
837 rc = reconfig_open_windows(vcaps, new_nr_creds - old_nr_creds, in vas_reconfig_capabilties()
847 rc = reconfig_close_windows(vcaps, in vas_reconfig_capabilties()
853 return rc; in vas_reconfig_capabilties()
858 int new_nr_creds, rc; in pseries_vas_dlpar_cpu() local
860 rc = h_query_vas_capabilities(H_QUERY_VAS_CAPABILITIES, in pseries_vas_dlpar_cpu()
863 if (!rc) { in pseries_vas_dlpar_cpu()
865 rc = vas_reconfig_capabilties(VAS_GZIP_DEF_FEAT_TYPE, new_nr_creds); in pseries_vas_dlpar_cpu()
868 if (rc) in pseries_vas_dlpar_cpu()
871 return rc; in pseries_vas_dlpar_cpu()
926 int i, rc = 0; in vas_migration_handler() local
932 return rc; in vas_migration_handler()
946 rc = h_query_vas_capabilities(H_QUERY_VAS_CAPABILITIES, in vas_migration_handler()
949 if (!rc) { in vas_migration_handler()
967 action, rc); in vas_migration_handler()
981 rc = reconfig_close_windows(vcaps, vcaps->nr_open_windows, in vas_migration_handler()
986 rc = reconfig_open_windows(vcaps, new_nr_creds, true); in vas_migration_handler()
991 rc = -EINVAL; in vas_migration_handler()
998 if (rc && (action == VAS_RESUME)) in vas_migration_handler()
1004 return rc; in vas_migration_handler()
1010 int rc = 0; in pseries_vas_init() local
1026 rc = h_query_vas_capabilities(H_QUERY_VAS_CAPABILITIES, 0, in pseries_vas_init()
1028 if (rc) in pseries_vas_init()
1040 rc = get_vas_capabilities(VAS_GZIP_QOS_FEAT, in pseries_vas_init()
1043 if (rc) in pseries_vas_init()
1050 rc = get_vas_capabilities(VAS_GZIP_DEF_FEAT, in pseries_vas_init()
1053 if (!rc && copypaste_feat) { in pseries_vas_init()
1069 return rc; in pseries_vas_init()