aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/rtas.h
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2010-07-07 08:31:01 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-08 21:26:17 -0400
commit8fe93f8d850a24581e9d47df5814b257fe451052 (patch)
tree7f768ca93e9ebaee0324d60f1349498c8d3cce59 /arch/powerpc/include/asm/rtas.h
parentc1aa687d499a8bce55cb8cf962f0b72c0f933f14 (diff)
powerpc/pseries: Migration code reorganization / hibernation prep
Partition hibernation will use some of the same code as is currently used for Live Partition Migration. This function further abstracts this code such that code outside of rtas.c can utilize it. It also changes the error field in the suspend me data structure to be an atomic type, since it is set and checked on different cpus without any barriers or locking. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/rtas.h')
-rw-r--r--arch/powerpc/include/asm/rtas.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
index 20de73c36682..8941c54b30ea 100644
--- a/arch/powerpc/include/asm/rtas.h
+++ b/arch/powerpc/include/asm/rtas.h
@@ -63,6 +63,14 @@ struct rtas_t {
63 struct device_node *dev; /* virtual address pointer */ 63 struct device_node *dev; /* virtual address pointer */
64}; 64};
65 65
66struct rtas_suspend_me_data {
67 atomic_t working; /* number of cpus accessing this struct */
68 atomic_t done;
69 int token; /* ibm,suspend-me */
70 atomic_t error;
71 struct completion *complete; /* wait on this until working == 0 */
72};
73
66/* RTAS event classes */ 74/* RTAS event classes */
67#define RTAS_INTERNAL_ERROR 0x80000000 /* set bit 0 */ 75#define RTAS_INTERNAL_ERROR 0x80000000 /* set bit 0 */
68#define RTAS_EPOW_WARNING 0x40000000 /* set bit 1 */ 76#define RTAS_EPOW_WARNING 0x40000000 /* set bit 1 */
@@ -174,6 +182,8 @@ extern int rtas_set_indicator(int indicator, int index, int new_value);
174extern int rtas_set_indicator_fast(int indicator, int index, int new_value); 182extern int rtas_set_indicator_fast(int indicator, int index, int new_value);
175extern void rtas_progress(char *s, unsigned short hex); 183extern void rtas_progress(char *s, unsigned short hex);
176extern void rtas_initialize(void); 184extern void rtas_initialize(void);
185extern int rtas_suspend_cpu(struct rtas_suspend_me_data *data);
186extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data);
177 187
178struct rtc_time; 188struct rtc_time;
179extern unsigned long rtas_get_boot_time(void); 189extern unsigned long rtas_get_boot_time(void);