Re: [PATCH 3/4] ppc64: add RTAS console driver

From: Nish Aravamudan
Date: Thu Aug 18 2005 - 13:08:31 EST


On 8/18/05, Arnd Bergmann <arnd@xxxxxxxx> wrote:
> The RTAS console driver can be used by all machines that abstract
> the system console through the {get,put}-term-char interface.
> It replaces the hvconsole on BPA, because we don't run under
> a hypervisor.
>
> This driver needs to be redone as a special case of hvconsole,
> so there is no point in applying the patch to generic kernels.
> You will however need it if you intend to run on present Cell
> hardware.
>
> From: Utz Bacher <utz.bacher@xxxxxxxxxx>
> Signed-off-by: Arnd Bergmann <arndb@xxxxxxxxxx>

<snip>

> --- linux-cg.orig/drivers/char/rtascons.c 1969-12-31 19:00:00.000000000 -0500
> +++ linux-cg/drivers/char/rtascons.c 2005-08-18 17:31:21.912892064

<snip>

> +#define RTASCONS_TIMEOUT ((HZ + 99) / 100)

msecs_to_jiffies(10)? Or perhaps leave it in milliseconds with a
comment as such (see below)?

<snip>

> +static int
> +krtasconsd(void *unused)
> +{
> + daemonize("krtasconsd");
> +
> + for (;;) {
> + if (cpus_empty(cpus_in_xmon)) {
> + rtascons_poll();
> + /* no need for atomic access */
> + if (rtascons_buffer_used) {
> + spin_lock(&rtascons_buffer_lock);
> + rtascons_flush_chars();
> + spin_unlock(&rtascons_buffer_lock);
> + }
> + }
> +
> + set_current_state(TASK_INTERRUPTIBLE);
> + schedule_timeout(RTASCONS_TIMEOUT);

Couldn't this be msleep_interruptible(RTASCONS_TIMEOUT) [if you make
RTASCONS_TIMEOUT in milliseconds]?

Thanks,
Nish
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/