WorkQueue: Fix up arch-specific work items where possible
Fix up arch-specific work items where possible to use the new work_struct and delayed_work structs. Three places that enqueue bits of their stack and then return have been marked with #error as this is not permitted. Signed-Off-By: David Howells <dhowells@redhat.com>
This commit is contained in:

committed by
David Howells

parent
9db7372445
commit
6d5aefb8ea
@@ -678,7 +678,7 @@ ia64_mca_cmc_vector_enable (void *dummy)
|
||||
* disable the cmc interrupt vector.
|
||||
*/
|
||||
static void
|
||||
ia64_mca_cmc_vector_disable_keventd(void *unused)
|
||||
ia64_mca_cmc_vector_disable_keventd(struct work_struct *unused)
|
||||
{
|
||||
on_each_cpu(ia64_mca_cmc_vector_disable, NULL, 1, 0);
|
||||
}
|
||||
@@ -690,7 +690,7 @@ ia64_mca_cmc_vector_disable_keventd(void *unused)
|
||||
* enable the cmc interrupt vector.
|
||||
*/
|
||||
static void
|
||||
ia64_mca_cmc_vector_enable_keventd(void *unused)
|
||||
ia64_mca_cmc_vector_enable_keventd(struct work_struct *unused)
|
||||
{
|
||||
on_each_cpu(ia64_mca_cmc_vector_enable, NULL, 1, 0);
|
||||
}
|
||||
@@ -1247,8 +1247,8 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
|
||||
monarch_cpu = -1;
|
||||
}
|
||||
|
||||
static DECLARE_WORK(cmc_disable_work, ia64_mca_cmc_vector_disable_keventd, NULL);
|
||||
static DECLARE_WORK(cmc_enable_work, ia64_mca_cmc_vector_enable_keventd, NULL);
|
||||
static DECLARE_WORK(cmc_disable_work, ia64_mca_cmc_vector_disable_keventd);
|
||||
static DECLARE_WORK(cmc_enable_work, ia64_mca_cmc_vector_enable_keventd);
|
||||
|
||||
/*
|
||||
* ia64_mca_cmc_int_handler
|
||||
|
@@ -463,15 +463,17 @@ struct pt_regs * __devinit idle_regs(struct pt_regs *regs)
|
||||
}
|
||||
|
||||
struct create_idle {
|
||||
struct work_struct work;
|
||||
struct task_struct *idle;
|
||||
struct completion done;
|
||||
int cpu;
|
||||
};
|
||||
|
||||
void
|
||||
do_fork_idle(void *_c_idle)
|
||||
do_fork_idle(struct work_struct *work)
|
||||
{
|
||||
struct create_idle *c_idle = _c_idle;
|
||||
struct create_idle *c_idle =
|
||||
container_of(work, struct create_idle, work);
|
||||
|
||||
c_idle->idle = fork_idle(c_idle->cpu);
|
||||
complete(&c_idle->done);
|
||||
@@ -482,10 +484,10 @@ do_boot_cpu (int sapicid, int cpu)
|
||||
{
|
||||
int timeout;
|
||||
struct create_idle c_idle = {
|
||||
.work = __WORK_INITIALIZER(c_idle.work, do_fork_idle),
|
||||
.cpu = cpu,
|
||||
.done = COMPLETION_INITIALIZER(c_idle.done),
|
||||
};
|
||||
DECLARE_WORK(work, do_fork_idle, &c_idle);
|
||||
|
||||
c_idle.idle = get_idle_for_cpu(cpu);
|
||||
if (c_idle.idle) {
|
||||
@@ -497,9 +499,9 @@ do_boot_cpu (int sapicid, int cpu)
|
||||
* We can't use kernel_thread since we must avoid to reschedule the child.
|
||||
*/
|
||||
if (!keventd_up() || current_is_keventd())
|
||||
work.func(work.data);
|
||||
c_idle.work.func(&c_idle.work);
|
||||
else {
|
||||
schedule_work(&work);
|
||||
schedule_work(&c_idle.work);
|
||||
wait_for_completion(&c_idle.done);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user