mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Alex Williamson <alex.williamson@hp.com>
Cc: rmk+serial@arm.linux.org.uk, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] backup timer for UARTs that lose interrupts (updated spinlocking)
Date: Sun, 22 Jan 2006 09:24:03 +0100	[thread overview]
Message-ID: <20060122082402.GB1543@elf.ucw.cz> (raw)
In-Reply-To: <1137869586.16056.146.camel@localhost>

On So 21-01-06 11:53:06, Alex Williamson wrote:
> 
>    This is an update to the following patch current found in the -mm
> tree:
> 
> backup-timer-for-uarts-that-lose-interrupts-take-3.patch
> 
> The only change is that the spinlocks around 8250_handle_port() have
> been removed to be consistent with changes to upstream.  Original submit
> message below.  Thanks

is this going to cause increased timer activity on non-buggy systems?

> +	if (is_real_interrupt(up->port.irq))
> +		serial_out(up, UART_IER, ier);
> +
> +	timeout = timeout > 6 ? (timeout / 2 - 2) : 1;

Eh? What units is timeout in, anyway?

> +	mod_timer(&up->timer, jiffies + (timeout * 100));

Does this work in HZ!=100 situations?

> +	/* Wait up to 1s for flow control if necessary */
> +	if (up->port.flags & UPF_CONS_FLOW) {
> +		tmout = 1000000;
> +		while (--tmout &&
> +		       ((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0))
> +			udelay(1);

Could you s/tmout/timeout/ while you are modifying this?

> +		if (iir & UART_IIR_NO_INT) {
> +			unsigned int timeout = up->port.timeout;
> +
> +			pr_debug("ttyS%d - using backup timer\n", port->line);
> +			timeout = timeout > 6 ? (timeout / 2 - 2) : 1;

Same strange computation, again. Inline function?
							Pavel
-- 
Thanks, Sharp!

  reply	other threads:[~2006-01-22  8:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-21 18:53 Alex Williamson
2006-01-22  8:24 ` Pavel Machek [this message]
2006-01-22 15:27   ` Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060122082402.GB1543@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@osdl.org \
    --cc=alex.williamson@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+serial@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®