Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25040
b: refs/heads/master
c: 706c8c9
h: refs/heads/master
v: v3
  • Loading branch information
Segher Boessenkool authored and Paul Mackerras committed Apr 1, 2006
1 parent ecaf863 commit 071f59f
Show file tree
Hide file tree
Showing 13 changed files with 120 additions and 113 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8df83028cf52e3bf68dfd35a4b1a044b326a4a99
refs/heads/master: 706c8c93ba4865a19e981b9770151a7a63c15794
22 changes: 11 additions & 11 deletions trunk/arch/powerpc/kernel/lparcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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");
}

Expand Down Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions trunk/arch/powerpc/kernel/rtas.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,26 +578,26 @@ 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);
for_each_possible_cpu(i)
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:
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/platforms/pseries/hvconsole.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
22 changes: 11 additions & 11 deletions trunk/arch/powerpc/platforms/pseries/hvcserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
28 changes: 14 additions & 14 deletions trunk/arch/powerpc/platforms/pseries/lpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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 */
Expand All @@ -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) {
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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,
Expand All @@ -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);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/pseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static void pseries_dedicated_idle_sleep(void)
* very low priority. The cede enables interrupts, which
* doesn't matter here.
*/
if (!lppaca[cpu ^ 1].idle || poll_pending() == H_Pending)
if (!lppaca[cpu ^ 1].idle || poll_pending() == H_PENDING)
cede_processor();

out:
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/platforms/pseries/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ EXPORT_SYMBOL(vio_find_node);
int vio_enable_interrupts(struct vio_dev *dev)
{
int rc = h_vio_signal(dev->unit_address, VIO_IRQ_ENABLE);
if (rc != H_Success)
if (rc != H_SUCCESS)
printk(KERN_ERR "vio: Error 0x%x enabling interrupts\n", rc);
return rc;
}
Expand All @@ -267,7 +267,7 @@ EXPORT_SYMBOL(vio_enable_interrupts);
int vio_disable_interrupts(struct vio_dev *dev)
{
int rc = h_vio_signal(dev->unit_address, VIO_IRQ_DISABLE);
if (rc != H_Success)
if (rc != H_SUCCESS)
printk(KERN_ERR "vio: Error 0x%x disabling interrupts\n", rc);
return rc;
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/platforms/pseries/xics.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static int pSeriesLP_xirr_info_get(int n_cpu)
unsigned long return_value;

lpar_rc = plpar_xirr(&return_value);
if (lpar_rc != H_Success)
if (lpar_rc != H_SUCCESS)
panic(" bad return code xirr - rc = %lx \n", lpar_rc);
return (int)return_value;
}
Expand All @@ -179,7 +179,7 @@ static void pSeriesLP_xirr_info_set(int n_cpu, int value)
unsigned long val64 = value & 0xffffffff;

lpar_rc = plpar_eoi(val64);
if (lpar_rc != H_Success)
if (lpar_rc != H_SUCCESS)
panic("bad return code EOI - rc = %ld, value=%lx\n", lpar_rc,
val64);
}
Expand All @@ -189,7 +189,7 @@ void pSeriesLP_cppr_info(int n_cpu, u8 value)
unsigned long lpar_rc;

lpar_rc = plpar_cppr(value);
if (lpar_rc != H_Success)
if (lpar_rc != H_SUCCESS)
panic("bad return code cppr - rc = %lx\n", lpar_rc);
}

Expand All @@ -198,7 +198,7 @@ static void pSeriesLP_qirr_info(int n_cpu , u8 value)
unsigned long lpar_rc;

lpar_rc = plpar_ipi(get_hard_smp_processor_id(n_cpu), value);
if (lpar_rc != H_Success)
if (lpar_rc != H_SUCCESS)
panic("bad return code qirr - rc = %lx\n", lpar_rc);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/hvcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ static int hvcs_enable_device(struct hvcs_struct *hvcsd, uint32_t unit_address,
* It is possible the vty-server was removed after the irq was
* requested but before we have time to enable interrupts.
*/
if (vio_enable_interrupts(vdev) == H_Success)
if (vio_enable_interrupts(vdev) == H_SUCCESS)
return 0;
else {
printk(KERN_ERR "HVCS: int enable failed for"
Expand Down
Loading

0 comments on commit 071f59f

Please sign in to comment.