[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101208152329.GI9777@n2100.arm.linux.org.uk>
Date: Wed, 8 Dec 2010 15:23:29 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Jeff Ohlstein <johlstei@...eaurora.org>
Cc: Daniel Walker <dwalker@...eaurora.org>,
linux-arm-msm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
David Brown <davidb@...eaurora.org>,
Bryan Huntsman <bryanh@...eaurora.org>
Subject: Re: [PATCH v2 5/6] msm: hotplug: support cpu hotplug on msm
On Tue, Dec 07, 2010 at 08:28:20PM -0800, Jeff Ohlstein wrote:
> +static inline void cpu_enter_lowpower(void)
> +{
> + flush_cache_all();
> +}
> +
> +static inline void cpu_leave_lowpower(void)
> +{
> + pen_release = -1;
> + smp_wmb();
> +}
> +
> +static inline void platform_do_lowpower(unsigned int cpu)
> +{
> + /* Just enter wfe for now. */
> + for (;;) {
> + asm("wfe");
> + if (pen_release == cpu) {
> + /*
> + * OK, proper wakeup, we're done
> + */
> + break;
> + }
> + smp_rmb();
> +
> + /*
> + * getting here, means that we have come out of WFI without
> + * having been woken up - this shouldn't happen
> + *
> + * The trouble is, letting people know about this is not really
> + * possible, since we are currently running incoherently, and
> + * therefore cannot safely call printk() or anything else
> + */
> + pr_debug("CPU%u: spurious wakeup call\n", cpu);
> + }
> +}
BTW, just because Realview and Versatile Express implement their hotplug
CPU tihs way, does not mean that you have to as well. If you can put the
CPU to sleep properly without keeping it in the kernel, that would be far
more preferable, than having platform_cpu_die() return on hot-plugging.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists