diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2007-10-06 17:35:45 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-10-09 07:01:58 -0400 |
commit | 418ef2094eb8b0916d6cbda10e2ab857b9f64d97 (patch) | |
tree | 8073d9d0fa612f0c725db674e7f2556966094983 /arch/powerpc | |
parent | 01263e88c3b8c4ec9621062a40b42814e0859e92 (diff) |
[POWERPC] PS3: os-area workqueue processing
Add a workqueue to the PS3 os-area support. This is needed to
support writing updates to flash memory and to update the /proc
device tree entries from the timer tick interrupt context.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/ps3/os-area.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c index f5112248802b..db311a147c28 100644 --- a/arch/powerpc/platforms/ps3/os-area.c +++ b/arch/powerpc/platforms/ps3/os-area.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/workqueue.h> | ||
23 | 24 | ||
24 | #include <asm/lmb.h> | 25 | #include <asm/lmb.h> |
25 | 26 | ||
@@ -187,6 +188,28 @@ static int __init verify_header(const struct os_area_header *header) | |||
187 | } | 188 | } |
188 | 189 | ||
189 | /** | 190 | /** |
191 | * os_area_queue_work_handler - Asynchronous write handler. | ||
192 | * | ||
193 | * An asynchronous write for flash memory and the device tree. Do not | ||
194 | * call directly, use os_area_queue_work(). | ||
195 | */ | ||
196 | |||
197 | static void os_area_queue_work_handler(struct work_struct *work) | ||
198 | { | ||
199 | pr_debug(" -> %s:%d\n", __func__, __LINE__); | ||
200 | |||
201 | pr_debug(" <- %s:%d\n", __func__, __LINE__); | ||
202 | } | ||
203 | |||
204 | static void os_area_queue_work(void) | ||
205 | { | ||
206 | static DECLARE_WORK(q, os_area_queue_work_handler); | ||
207 | |||
208 | wmb(); | ||
209 | schedule_work(&q); | ||
210 | } | ||
211 | |||
212 | /** | ||
190 | * ps3_os_area_save_params - Copy data from os area mirror to @saved_params. | 213 | * ps3_os_area_save_params - Copy data from os area mirror to @saved_params. |
191 | * | 214 | * |
192 | * For the convenience of the guest, the HV makes a copy of the os area in | 215 | * For the convenience of the guest, the HV makes a copy of the os area in |