Messages in this thread |  | | | Subject | Re: [PATCH] interrupt driven hvc_console as vio device | | From | Ryan Arnold <> | | Date | Wed, 25 Aug 2004 00:09:54 -0500 |
| |
On Tue, 2004-08-24 at 23:46, Andrew Morton 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.
Paulus suggested that tty_wait_until_sent() would be most appropriate since it actually does a sleep/wakeup. I think I'll rearrange this function a bit so that I won't have to drop the spin_lock and then grab it again as well. Thanks for the suggestion.
Ryan S. Arnold IBM Linux Technology Center
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |