Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28767
b: refs/heads/master
c: 368a6ba
h: refs/heads/master
i:
  28765: f17a41f
  28763: 1b8868b
  28759: 0515956
  28751: 609285a
  28735: 054ad9b
v: v3
  • Loading branch information
Dave C Boutcher authored and Paul Mackerras committed Jun 15, 2006
1 parent 9064eec commit 8d63569
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e4aa9c2009187fff1c999fe0aaa134c1a84f48a
refs/heads/master: 368a6ba5d188552aea2a668301a259164c9f355e
22 changes: 22 additions & 0 deletions trunk/arch/powerpc/kernel/rtas.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,31 @@ static void rtas_percpu_suspend_me(void *info)
static int rtas_ibm_suspend_me(struct rtas_args *args)
{
int i;
long state;
long rc;
unsigned long dummy;

struct rtas_suspend_me_data data;

/* Make sure the state is valid */
rc = plpar_hcall(H_VASI_STATE,
((u64)args->args[0] << 32) | args->args[1],
0, 0, 0,
&state, &dummy, &dummy);

if (rc) {
printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned %ld\n",rc);
return rc;
} else if (state == H_VASI_ENABLED) {
args->args[args->nargs] = RTAS_NOT_SUSPENDABLE;
return 0;
} else if (state != H_VASI_SUSPENDING) {
printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned state %ld\n",
state);
args->args[args->nargs] = -1;
return 0;
}

data.waiting = 1;
data.args = args;

Expand Down
10 changes: 10 additions & 0 deletions trunk/include/asm-powerpc/hvcall.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@
#define H_PP1 (1UL<<(63-62))
#define H_PP2 (1UL<<(63-63))

/* VASI States */
#define H_VASI_INVALID 0
#define H_VASI_ENABLED 1
#define H_VASI_ABORTED 2
#define H_VASI_SUSPENDING 3
#define H_VASI_SUSPENDED 4
#define H_VASI_RESUMED 5
#define H_VASI_COMPLETED 6

/* DABRX flags */
#define H_DABRX_HYPERVISOR (1UL<<(63-61))
#define H_DABRX_KERNEL (1UL<<(63-62))
Expand Down Expand Up @@ -190,6 +199,7 @@
#define H_QUERY_INT_STATE 0x1E4
#define H_POLL_PENDING 0x1D8
#define H_JOIN 0x298
#define H_VASI_STATE 0x2A4
#define H_ENABLE_CRQ 0x2B0

#ifndef __ASSEMBLY__
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-powerpc/rtas.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define RTAS_RMOBUF_MAX (64 * 1024)

/* RTAS return status codes */
#define RTAS_NOT_SUSPENDABLE -9004
#define RTAS_BUSY -2 /* RTAS Busy */
#define RTAS_EXTENDED_DELAY_MIN 9900
#define RTAS_EXTENDED_DELAY_MAX 9905
Expand Down

0 comments on commit 8d63569

Please sign in to comment.