Re: [PATCH] interrupt driven hvc_console as vio device

From: Andrew Morton
Date: Tue Aug 24 2004 - 23:53:03 EST


Ryan Arnold <rsa@xxxxxxxxxx> wrote:
>
> static void hvc_close(struct tty_struct *tty, struct file * filp)
> {
> ...
> + while (hp->n_outbuf) {
> + spin_unlock_irqrestore(&hp->lock, flags);
> + yield();
> + spin_lock_irqsave(&hp->lock, flags);
> + }

ick.

I suspect that if the caller of hvc_close() has realtime scheduling policy,
this locks up. Unless it's waiting for interrupt activity.

Really, a real sleep/wakeup would be tons better.

-
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/