Loading arch/powerpc/kernel/lparcfg.c +11 −11 Original line number Diff line number Diff line Loading @@ -149,17 +149,17 @@ static void log_plpar_hcall_return(unsigned long rc, char *tag) if (rc == 0) /* success, return */ return; /* check for null tag ? */ if (rc == H_Hardware) if (rc == H_HARDWARE) printk(KERN_INFO "plpar-hcall (%s) failed with hardware fault\n", tag); else if (rc == H_Function) else if (rc == H_FUNCTION) printk(KERN_INFO "plpar-hcall (%s) failed; function not allowed\n", tag); else if (rc == H_Authority) else if (rc == H_AUTHORITY) printk(KERN_INFO "plpar-hcall (%s) failed; not authorized to this function\n", tag); else if (rc == H_Parameter) "plpar-hcall (%s) failed; not authorized to this" " function\n", tag); else if (rc == H_PARAMETER) printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n", tag); else Loading Loading @@ -209,7 +209,7 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs) unsigned long dummy; rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy); if (rc != H_Authority) if (rc != H_AUTHORITY) log_plpar_hcall_return(rc, "H_PIC"); } Loading Loading @@ -529,13 +529,13 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, *new_weight_ptr); if (retval == H_Success || retval == H_Constrained) { if (retval == H_SUCCESS || retval == H_CONSTRAINED) { retval = count; } else if (retval == H_Busy) { } else if (retval == H_BUSY) { retval = -EBUSY; } else if (retval == H_Hardware) { } else if (retval == H_HARDWARE) { retval = -EIO; } else if (retval == H_Parameter) { } else if (retval == H_PARAMETER) { retval = -EINVAL; } else { printk(KERN_WARNING "%s: received unknown hv return code %ld", Loading arch/powerpc/kernel/rtas.c +6 −6 Original line number Diff line number Diff line Loading @@ -578,18 +578,18 @@ static void rtas_percpu_suspend_me(void *info) * We use "waiting" to indicate our state. As long * as it is >0, we are still trying to all join up. * If it goes to 0, we have successfully joined up and * one thread got H_Continue. If any error happens, * one thread got H_CONTINUE. If any error happens, * we set it to <0. */ local_irq_save(flags); do { rc = plpar_hcall_norets(H_JOIN); smp_rmb(); } while (rc == H_Success && data->waiting > 0); if (rc == H_Success) } while (rc == H_SUCCESS && data->waiting > 0); if (rc == H_SUCCESS) goto out; if (rc == H_Continue) { if (rc == H_CONTINUE) { data->waiting = 0; data->args->args[data->args->nargs] = rtas_call(ibm_suspend_me_token, 0, 1, NULL); Loading @@ -597,7 +597,7 @@ static void rtas_percpu_suspend_me(void *info) plpar_hcall_norets(H_PROD,i); } else { data->waiting = -EBUSY; printk(KERN_ERR "Error on H_Join hypervisor call\n"); printk(KERN_ERR "Error on H_JOIN hypervisor call\n"); } out: Loading @@ -624,7 +624,7 @@ static int rtas_ibm_suspend_me(struct rtas_args *args) printk(KERN_ERR "Error doing global join\n"); /* Prod each CPU. This won't hurt, and will wake * anyone we successfully put to sleep with H_Join * anyone we successfully put to sleep with H_JOIN. */ for_each_possible_cpu(i) plpar_hcall_norets(H_PROD, i); Loading arch/powerpc/platforms/pseries/hvconsole.c +3 −3 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ int hvc_get_chars(uint32_t vtermno, char *buf, int count) unsigned long got; if (plpar_hcall(H_GET_TERM_CHAR, vtermno, 0, 0, 0, &got, (unsigned long *)buf, (unsigned long *)buf+1) == H_Success) (unsigned long *)buf, (unsigned long *)buf+1) == H_SUCCESS) return got; return 0; } Loading Loading @@ -69,9 +69,9 @@ int hvc_put_chars(uint32_t vtermno, const char *buf, int count) ret = plpar_hcall_norets(H_PUT_TERM_CHAR, vtermno, count, lbuf[0], lbuf[1]); if (ret == H_Success) if (ret == H_SUCCESS) return count; if (ret == H_Busy) if (ret == H_BUSY) return 0; return -EIO; } Loading arch/powerpc/platforms/pseries/hvcserver.c +11 −11 Original line number Diff line number Diff line Loading @@ -43,21 +43,21 @@ MODULE_VERSION(HVCS_ARCH_VERSION); static int hvcs_convert(long to_convert) { switch (to_convert) { case H_Success: case H_SUCCESS: return 0; case H_Parameter: case H_PARAMETER: return -EINVAL; case H_Hardware: case H_HARDWARE: return -EIO; case H_Busy: case H_LongBusyOrder1msec: case H_LongBusyOrder10msec: case H_LongBusyOrder100msec: case H_LongBusyOrder1sec: case H_LongBusyOrder10sec: case H_LongBusyOrder100sec: case H_BUSY: case H_LONG_BUSY_ORDER_1_MSEC: case H_LONG_BUSY_ORDER_10_MSEC: case H_LONG_BUSY_ORDER_100_MSEC: case H_LONG_BUSY_ORDER_1_SEC: case H_LONG_BUSY_ORDER_10_SEC: case H_LONG_BUSY_ORDER_100_SEC: return -EBUSY; case H_Function: /* fall through */ case H_FUNCTION: /* fall through */ default: return -EPERM; } Loading arch/powerpc/platforms/pseries/lpar.c +14 −14 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ static void udbg_hvsi_putc(char c) do { rc = plpar_put_term_char(vtermno, sizeof(packet), packet); } while (rc == H_Busy); } while (rc == H_BUSY); } static long hvsi_udbg_buf_len; Loading @@ -85,7 +85,7 @@ static int udbg_hvsi_getc_poll(void) if (hvsi_udbg_buf_len == 0) { rc = plpar_get_term_char(vtermno, &hvsi_udbg_buf_len, hvsi_udbg_buf); if (rc != H_Success || hvsi_udbg_buf[0] != 0xff) { if (rc != H_SUCCESS || hvsi_udbg_buf[0] != 0xff) { /* bad read or non-data packet */ hvsi_udbg_buf_len = 0; } else { Loading Loading @@ -139,7 +139,7 @@ static void udbg_putcLP(char c) buf[0] = c; do { rc = plpar_put_term_char(vtermno, 1, buf); } while(rc == H_Busy); } while(rc == H_BUSY); } /* Buffered chars getc */ Loading @@ -158,7 +158,7 @@ static int udbg_getc_pollLP(void) /* get some more chars. */ inbuflen = 0; rc = plpar_get_term_char(vtermno, &inbuflen, buf); if (rc != H_Success) if (rc != H_SUCCESS) inbuflen = 0; /* otherwise inbuflen is garbage */ } if (inbuflen <= 0 || inbuflen > 16) { Loading Loading @@ -304,7 +304,7 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group, lpar_rc = plpar_hcall(H_ENTER, flags, hpte_group, hpte_v, hpte_r, &slot, &dummy0, &dummy1); if (unlikely(lpar_rc == H_PTEG_Full)) { if (unlikely(lpar_rc == H_PTEG_FULL)) { if (!(vflags & HPTE_V_BOLTED)) DBG_LOW(" full\n"); return -1; Loading @@ -315,7 +315,7 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group, * will fail. However we must catch the failure in hash_page * or we will loop forever, so return -2 in this case. */ if (unlikely(lpar_rc != H_Success)) { if (unlikely(lpar_rc != H_SUCCESS)) { if (!(vflags & HPTE_V_BOLTED)) DBG_LOW(" lpar err %d\n", lpar_rc); return -2; Loading Loading @@ -346,9 +346,9 @@ static long pSeries_lpar_hpte_remove(unsigned long hpte_group) /* don't remove a bolted entry */ lpar_rc = plpar_pte_remove(H_ANDCOND, hpte_group + slot_offset, (0x1UL << 4), &dummy1, &dummy2); if (lpar_rc == H_Success) if (lpar_rc == H_SUCCESS) return i; BUG_ON(lpar_rc != H_Not_Found); BUG_ON(lpar_rc != H_NOT_FOUND); slot_offset++; slot_offset &= 0x7; Loading Loading @@ -391,14 +391,14 @@ static long pSeries_lpar_hpte_updatepp(unsigned long slot, lpar_rc = plpar_pte_protect(flags, slot, want_v & HPTE_V_AVPN); if (lpar_rc == H_Not_Found) { if (lpar_rc == H_NOT_FOUND) { DBG_LOW("not found !\n"); return -1; } DBG_LOW("ok\n"); BUG_ON(lpar_rc != H_Success); BUG_ON(lpar_rc != H_SUCCESS); return 0; } Loading @@ -417,7 +417,7 @@ static unsigned long pSeries_lpar_hpte_getword0(unsigned long slot) lpar_rc = plpar_pte_read(flags, slot, &dword0, &dummy_word1); BUG_ON(lpar_rc != H_Success); BUG_ON(lpar_rc != H_SUCCESS); return dword0; } Loading Loading @@ -468,7 +468,7 @@ static void pSeries_lpar_hpte_updateboltedpp(unsigned long newpp, flags = newpp & 7; lpar_rc = plpar_pte_protect(flags, slot, 0); BUG_ON(lpar_rc != H_Success); BUG_ON(lpar_rc != H_SUCCESS); } static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va, Loading @@ -484,10 +484,10 @@ static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va, want_v = hpte_encode_v(va, psize); lpar_rc = plpar_pte_remove(H_AVPN, slot, want_v & HPTE_V_AVPN, &dummy1, &dummy2); if (lpar_rc == H_Not_Found) if (lpar_rc == H_NOT_FOUND) return; BUG_ON(lpar_rc != H_Success); BUG_ON(lpar_rc != H_SUCCESS); } /* Loading Loading
arch/powerpc/kernel/lparcfg.c +11 −11 Original line number Diff line number Diff line Loading @@ -149,17 +149,17 @@ static void log_plpar_hcall_return(unsigned long rc, char *tag) if (rc == 0) /* success, return */ return; /* check for null tag ? */ if (rc == H_Hardware) if (rc == H_HARDWARE) printk(KERN_INFO "plpar-hcall (%s) failed with hardware fault\n", tag); else if (rc == H_Function) else if (rc == H_FUNCTION) printk(KERN_INFO "plpar-hcall (%s) failed; function not allowed\n", tag); else if (rc == H_Authority) else if (rc == H_AUTHORITY) printk(KERN_INFO "plpar-hcall (%s) failed; not authorized to this function\n", tag); else if (rc == H_Parameter) "plpar-hcall (%s) failed; not authorized to this" " function\n", tag); else if (rc == H_PARAMETER) printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n", tag); else Loading Loading @@ -209,7 +209,7 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs) unsigned long dummy; rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy); if (rc != H_Authority) if (rc != H_AUTHORITY) log_plpar_hcall_return(rc, "H_PIC"); } Loading Loading @@ -529,13 +529,13 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, *new_weight_ptr); if (retval == H_Success || retval == H_Constrained) { if (retval == H_SUCCESS || retval == H_CONSTRAINED) { retval = count; } else if (retval == H_Busy) { } else if (retval == H_BUSY) { retval = -EBUSY; } else if (retval == H_Hardware) { } else if (retval == H_HARDWARE) { retval = -EIO; } else if (retval == H_Parameter) { } else if (retval == H_PARAMETER) { retval = -EINVAL; } else { printk(KERN_WARNING "%s: received unknown hv return code %ld", Loading
arch/powerpc/kernel/rtas.c +6 −6 Original line number Diff line number Diff line Loading @@ -578,18 +578,18 @@ static void rtas_percpu_suspend_me(void *info) * We use "waiting" to indicate our state. As long * as it is >0, we are still trying to all join up. * If it goes to 0, we have successfully joined up and * one thread got H_Continue. If any error happens, * one thread got H_CONTINUE. If any error happens, * we set it to <0. */ local_irq_save(flags); do { rc = plpar_hcall_norets(H_JOIN); smp_rmb(); } while (rc == H_Success && data->waiting > 0); if (rc == H_Success) } while (rc == H_SUCCESS && data->waiting > 0); if (rc == H_SUCCESS) goto out; if (rc == H_Continue) { if (rc == H_CONTINUE) { data->waiting = 0; data->args->args[data->args->nargs] = rtas_call(ibm_suspend_me_token, 0, 1, NULL); Loading @@ -597,7 +597,7 @@ static void rtas_percpu_suspend_me(void *info) plpar_hcall_norets(H_PROD,i); } else { data->waiting = -EBUSY; printk(KERN_ERR "Error on H_Join hypervisor call\n"); printk(KERN_ERR "Error on H_JOIN hypervisor call\n"); } out: Loading @@ -624,7 +624,7 @@ static int rtas_ibm_suspend_me(struct rtas_args *args) printk(KERN_ERR "Error doing global join\n"); /* Prod each CPU. This won't hurt, and will wake * anyone we successfully put to sleep with H_Join * anyone we successfully put to sleep with H_JOIN. */ for_each_possible_cpu(i) plpar_hcall_norets(H_PROD, i); Loading
arch/powerpc/platforms/pseries/hvconsole.c +3 −3 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ int hvc_get_chars(uint32_t vtermno, char *buf, int count) unsigned long got; if (plpar_hcall(H_GET_TERM_CHAR, vtermno, 0, 0, 0, &got, (unsigned long *)buf, (unsigned long *)buf+1) == H_Success) (unsigned long *)buf, (unsigned long *)buf+1) == H_SUCCESS) return got; return 0; } Loading Loading @@ -69,9 +69,9 @@ int hvc_put_chars(uint32_t vtermno, const char *buf, int count) ret = plpar_hcall_norets(H_PUT_TERM_CHAR, vtermno, count, lbuf[0], lbuf[1]); if (ret == H_Success) if (ret == H_SUCCESS) return count; if (ret == H_Busy) if (ret == H_BUSY) return 0; return -EIO; } Loading
arch/powerpc/platforms/pseries/hvcserver.c +11 −11 Original line number Diff line number Diff line Loading @@ -43,21 +43,21 @@ MODULE_VERSION(HVCS_ARCH_VERSION); static int hvcs_convert(long to_convert) { switch (to_convert) { case H_Success: case H_SUCCESS: return 0; case H_Parameter: case H_PARAMETER: return -EINVAL; case H_Hardware: case H_HARDWARE: return -EIO; case H_Busy: case H_LongBusyOrder1msec: case H_LongBusyOrder10msec: case H_LongBusyOrder100msec: case H_LongBusyOrder1sec: case H_LongBusyOrder10sec: case H_LongBusyOrder100sec: case H_BUSY: case H_LONG_BUSY_ORDER_1_MSEC: case H_LONG_BUSY_ORDER_10_MSEC: case H_LONG_BUSY_ORDER_100_MSEC: case H_LONG_BUSY_ORDER_1_SEC: case H_LONG_BUSY_ORDER_10_SEC: case H_LONG_BUSY_ORDER_100_SEC: return -EBUSY; case H_Function: /* fall through */ case H_FUNCTION: /* fall through */ default: return -EPERM; } Loading
arch/powerpc/platforms/pseries/lpar.c +14 −14 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ static void udbg_hvsi_putc(char c) do { rc = plpar_put_term_char(vtermno, sizeof(packet), packet); } while (rc == H_Busy); } while (rc == H_BUSY); } static long hvsi_udbg_buf_len; Loading @@ -85,7 +85,7 @@ static int udbg_hvsi_getc_poll(void) if (hvsi_udbg_buf_len == 0) { rc = plpar_get_term_char(vtermno, &hvsi_udbg_buf_len, hvsi_udbg_buf); if (rc != H_Success || hvsi_udbg_buf[0] != 0xff) { if (rc != H_SUCCESS || hvsi_udbg_buf[0] != 0xff) { /* bad read or non-data packet */ hvsi_udbg_buf_len = 0; } else { Loading Loading @@ -139,7 +139,7 @@ static void udbg_putcLP(char c) buf[0] = c; do { rc = plpar_put_term_char(vtermno, 1, buf); } while(rc == H_Busy); } while(rc == H_BUSY); } /* Buffered chars getc */ Loading @@ -158,7 +158,7 @@ static int udbg_getc_pollLP(void) /* get some more chars. */ inbuflen = 0; rc = plpar_get_term_char(vtermno, &inbuflen, buf); if (rc != H_Success) if (rc != H_SUCCESS) inbuflen = 0; /* otherwise inbuflen is garbage */ } if (inbuflen <= 0 || inbuflen > 16) { Loading Loading @@ -304,7 +304,7 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group, lpar_rc = plpar_hcall(H_ENTER, flags, hpte_group, hpte_v, hpte_r, &slot, &dummy0, &dummy1); if (unlikely(lpar_rc == H_PTEG_Full)) { if (unlikely(lpar_rc == H_PTEG_FULL)) { if (!(vflags & HPTE_V_BOLTED)) DBG_LOW(" full\n"); return -1; Loading @@ -315,7 +315,7 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group, * will fail. However we must catch the failure in hash_page * or we will loop forever, so return -2 in this case. */ if (unlikely(lpar_rc != H_Success)) { if (unlikely(lpar_rc != H_SUCCESS)) { if (!(vflags & HPTE_V_BOLTED)) DBG_LOW(" lpar err %d\n", lpar_rc); return -2; Loading Loading @@ -346,9 +346,9 @@ static long pSeries_lpar_hpte_remove(unsigned long hpte_group) /* don't remove a bolted entry */ lpar_rc = plpar_pte_remove(H_ANDCOND, hpte_group + slot_offset, (0x1UL << 4), &dummy1, &dummy2); if (lpar_rc == H_Success) if (lpar_rc == H_SUCCESS) return i; BUG_ON(lpar_rc != H_Not_Found); BUG_ON(lpar_rc != H_NOT_FOUND); slot_offset++; slot_offset &= 0x7; Loading Loading @@ -391,14 +391,14 @@ static long pSeries_lpar_hpte_updatepp(unsigned long slot, lpar_rc = plpar_pte_protect(flags, slot, want_v & HPTE_V_AVPN); if (lpar_rc == H_Not_Found) { if (lpar_rc == H_NOT_FOUND) { DBG_LOW("not found !\n"); return -1; } DBG_LOW("ok\n"); BUG_ON(lpar_rc != H_Success); BUG_ON(lpar_rc != H_SUCCESS); return 0; } Loading @@ -417,7 +417,7 @@ static unsigned long pSeries_lpar_hpte_getword0(unsigned long slot) lpar_rc = plpar_pte_read(flags, slot, &dword0, &dummy_word1); BUG_ON(lpar_rc != H_Success); BUG_ON(lpar_rc != H_SUCCESS); return dword0; } Loading Loading @@ -468,7 +468,7 @@ static void pSeries_lpar_hpte_updateboltedpp(unsigned long newpp, flags = newpp & 7; lpar_rc = plpar_pte_protect(flags, slot, 0); BUG_ON(lpar_rc != H_Success); BUG_ON(lpar_rc != H_SUCCESS); } static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va, Loading @@ -484,10 +484,10 @@ static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va, want_v = hpte_encode_v(va, psize); lpar_rc = plpar_pte_remove(H_AVPN, slot, want_v & HPTE_V_AVPN, &dummy1, &dummy2); if (lpar_rc == H_Not_Found) if (lpar_rc == H_NOT_FOUND) return; BUG_ON(lpar_rc != H_Success); BUG_ON(lpar_rc != H_SUCCESS); } /* Loading