mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ray Lee" <ray-lk@madrabbit.org>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: mingo@redhat.com, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86 reboot: Remove inb_p usage
Date: Sat, 19 Jan 2008 09:00:40 -0800	[thread overview]
Message-ID: <2c0942db0801190900i11f0ff16saca04cafee0d62c3@mail.gmail.com> (raw)
In-Reply-To: <20080119154453.1afddbfb@lxorguk.ukuu.org.uk>

On Jan 19, 2008 7:44 AM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> We are driving a motherboard port so use a 2uS explicit delay at this
> point.
>
> Signed-off-by: Alan Cox <alan@redhat.com>
>
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc8-mm1/arch/x86/kernel/reboot.c linux-2.6.24-rc8-mm1/arch/x86/kernel/reboot.c
> --- linux.vanilla-2.6.24-rc8-mm1/arch/x86/kernel/reboot.c       2008-01-19 14:47:55.000000000 +0000
> +++ linux-2.6.24-rc8-mm1/arch/x86/kernel/reboot.c       2008-01-19 14:53:58.000000000 +0000
> @@ -319,9 +319,11 @@
>  {
>         int i;
>
> -       for (i = 0; i < 0x10000; i++)
> -               if ((inb_p(0x64) & 0x02) == 0)
> +       for (i = 0; i < 0x10000; i++) {
> +               if ((inb(0x64) & 0x02) == 0)
>                         break;
> +               udelay(2);
> +       }
>  }
>
>  void machine_emergency_restart(void)

Stupid question from the peanut gallery: If you're going to go through
all this, maybe it would be better to define an inline
isa_bus_delay(void) { udelay(2); } and use that instead? I can only
imagine some poor sod coming along later and wondering why there's a
udelay(2) there. OTOH, there is an inb right above it, so <shrug>.

  reply	other threads:[~2008-01-19 17:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-19 15:44 Alan Cox
2008-01-19 17:00 ` Ray Lee [this message]
2008-01-19 19:59   ` Alan Cox
2008-01-22  9:55 ` Ingo Molnar

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=2c0942db0801190900i11f0ff16saca04cafee0d62c3@mail.gmail.com \
    --to=ray-lk@madrabbit.org \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /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®