Skip to content

Commit

Permalink
[POWERPC] PS3: os-area workqueue processing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geoff Levand authored and Paul Mackerras committed Oct 9, 2007
1 parent 01263e8 commit 418ef20
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions arch/powerpc/platforms/ps3/os-area.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/workqueue.h>

#include <asm/lmb.h>

Expand Down Expand Up @@ -186,6 +187,28 @@ static int __init verify_header(const struct os_area_header *header)
return 0;
}

/**
* os_area_queue_work_handler - Asynchronous write handler.
*
* An asynchronous write for flash memory and the device tree. Do not
* call directly, use os_area_queue_work().
*/

static void os_area_queue_work_handler(struct work_struct *work)
{
pr_debug(" -> %s:%d\n", __func__, __LINE__);

pr_debug(" <- %s:%d\n", __func__, __LINE__);
}

static void os_area_queue_work(void)
{
static DECLARE_WORK(q, os_area_queue_work_handler);

wmb();
schedule_work(&q);
}

/**
* ps3_os_area_save_params - Copy data from os area mirror to @saved_params.
*
Expand Down

0 comments on commit 418ef20

Please sign in to comment.