From: "H. Peter Anvin" <hpa@zytor.com>
To: nick <xerofoify@gmail.com>, tglx@linutronix.de
Cc: mingo@redhat.com, x86@kernel.org, luto@amacapital.net,
rafael.j.wysocki@intel.com,
michael.opdenacker@free-electrons.com, feng.tang@intel.com,
srivatsa.bhat@linux.vnet.ibm.com, stefani@seibold.ne,
linux-kernel@vger.kernel.org
Subject: Re: Fix Me in hpet.c
Date: Thu, 20 Nov 2014 15:41:33 -0800 [thread overview]
Message-ID: <546E7C2D.4040301@zytor.com> (raw)
In-Reply-To: <546D58BD.801@gmail.com>
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
parent reply other threads:[~2014-11-20 23:42 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <546D58BD.801@gmail.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=546E7C2D.4040301@zytor.com \
--to=hpa@zytor.com \
--cc=feng.tang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=michael.opdenacker@free-electrons.com \
--cc=mingo@redhat.com \
--cc=rafael.j.wysocki@intel.com \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=stefani@seibold.ne \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xerofoify@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox