tree f1e0b3fc48737ccb8f88dd50f16721dec9ff97d8
parent 6f24808eeb54eed5994128a863cd25c40f36cfac
author Milton Miller <[EMAIL PROTECTED]> Fri, 08 Jul 2005 07:56:18 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Fri, 08 Jul 2005 08:23:38 -0700

[PATCH] hvc_console: Dont always kick the poll thread in interrupt

Have the hvc console code try to pull characters immediately when receiving an
interrupt, and kick the poll thread only if the immediate poll indicates it
needed a call back to do more work.

Signed-off-by: Milton Miller <[EMAIL PROTECTED]>
Signed-off-by: Anton Blanchard <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/char/hvc_console.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -254,13 +254,17 @@ static void hvc_kick(void)
        wake_up_process(hvc_task);
 }
 
+static int hvc_poll(struct hvc_struct *hp);
+
 /*
  * NOTE: This API isn't used if the console adapter doesn't support interrupts.
  * In this case the console is poll driven.
  */
 static irqreturn_t hvc_handle_interrupt(int irq, void *dev_instance, struct 
pt_regs *regs)
 {
-       hvc_kick();
+       /* if hvc_poll request a repoll, then kick the hvcd thread */
+       if (hvc_poll(dev_instance))
+               hvc_kick();
        return IRQ_HANDLED;
 }
 
@@ -598,8 +602,8 @@ static int hvc_poll(struct hvc_struct *h
 
                /*
                 * Account for the total amount read in one loop, and if above
-                * 64 bytes, we do a quick schedule loop to let the tty grok the
-                * data and eventually throttle us.
+                * 64 bytes, we do a quick schedule loop to let the tty grok
+                * the data and eventually throttle us.
                 */
                read_total += n;
                if (read_total >= 64) {
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to