* Re: Fix Me in hpet.c
[not found] <546D58BD.801@gmail.com>
@ 2014-11-20 23:41 ` H. Peter Anvin
0 siblings, 0 replies; only message in thread
From: H. Peter Anvin @ 2014-11-20 23:41 UTC (permalink / raw)
To: nick, tglx
Cc: mingo, x86, luto, rafael.j.wysocki, michael.opdenacker, feng.tang,
srivatsa.bhat, stefani, linux-kernel
On 11/19/2014 06:58 PM, nick wrote:
> Greeting Thomas and other kernel coders,
> I am wondering about the fix in the code below and whether this is still valid as reading it seems to may no sense as
> we are using completion variables and therefore the delayed version of schedule_work_on seems much better in this
> case. Further more I am pasting the code below from vim in order to make it easier for you.
> Cheers Nick
> static int hpet_cpuhp_notify(struct notifier_block *n,
> unsigned long action, void *hcpu)
> {
> unsigned long cpu = (unsigned long)hcpu;
> struct hpet_work_struct work;
> struct hpet_dev *hdev = per_cpu(cpu_hpet_dev, cpu);
>
> switch (action & 0xf) {
> case CPU_ONLINE:
> INIT_DELAYED_WORK_ONSTACK(&work.work, hpet_work);
> init_completion(&work.complete);
> /* FIXME: add schedule_work_on() */
> schedule_delayed_work_on(cpu, &work.work, 0);
> wait_for_completion(&work.complete);
> destroy_delayed_work_on_stack(&work.work);
> break;
> case CPU_DEAD:
> if (hdev) {
> free_irq(hdev->irq, hdev);
> hdev->flags &= ~HPET_DEV_USED;
> per_cpu(cpu_hpet_dev, cpu) = NULL;
> }
> break;
> }
> return NOTIFY_OK;
> }
>
Looks obsolete to me. It might be interesting to look at the "git
blame" output for this code.
-hpa
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-20 23:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <546D58BD.801@gmail.com>
2014-11-20 23:41 ` Fix Me in hpet.c H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox