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

Nish Aravamudan nish.aravamudan at gmail.com
Fri Aug 19 04:07:56 EST 2005


On 8/18/05, Arnd Bergmann <arnd at arndb.de> 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 at de.ibm.com>
> Signed-off-by: Arnd Bergmann <arndb at de.ibm.com>

<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



More information about the Linuxppc64-dev mailing list