From: Matthew Wilcox <willy@debian.org>
To: Ryan Bradetich <rbrad@uswest.net>
Cc: Matthew Wilcox <willy@debian.org>, Tom <palinux@alaskatech.org>,
PA-RISC Linux List <parisc-linux@parisc-linux.org>
Subject: Re: [parisc-linux] LONG pause on boot
Date: Wed, 13 Nov 2002 22:44:43 +0000 [thread overview]
Message-ID: <20021113224443.R30392@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20021113214613.GA32441@beavis.ybsoft.com>; from rbrad@uswest.net on Wed, Nov 13, 2002 at 02:46:13PM -0700
On Wed, Nov 13, 2002 at 02:46:13PM -0700, Ryan Bradetich wrote:
> Willy, I have an idea on how to fix this, but it is ugly ... but I will probably
> consider committing it soon unless you have a cleaner idea (hint, hint :))
Well. I have an idea, but it's even uglier than yours ;-) It doesn't suffer
from the same problem, so I'll describe it...
> I have a proposal to speed up systems where the devices are at the end of the
> bus ... we can simply walk the first bus range, then the last bus range, if
> nothing found yet ... walk the middle.
here's the current code:
#define READ_IO_IO_LOW(dev) \
(dev->id.hw_type == HPHW_IOA ? \
__raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_i
o_low) << 16 : \
__raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_i
o_low))
#define READ_IO_IO_HIGH(dev) \
(dev->id.hw_type == HPHW_IOA ? \
__raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_i
o_high) << 16 : \
__raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_i
o_high))
static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
struct parisc_device *parent);
#define FLEX_MASK (unsigned long)0xfffffffffffc0000
void walk_lower_bus(struct parisc_device *dev)
{
unsigned long io_io_low, io_io_high;
if(!BUS_CONVERTER(dev) || IS_LOWER_PORT(dev))
return;
io_io_low = ((unsigned long)(signed int)READ_IO_IO_LOW(dev) + ~FLEX_MASK
) & FLEX_MASK;
io_io_high = ((unsigned long)(signed int)READ_IO_IO_HIGH(dev) + ~FLEX_MA
SK) & FLEX_MASK;
walk_native_bus(io_io_low, io_io_high, dev);
}
My proposal...
#define IO_IO_LOW offsetof(struct bc_module, io_io_low)
#define IO_IO_HIGH offsetof(struct bc_module, io_io_high)
#define READ_IO_IO_LOW(dev) __raw_readl(dev->hpa + IO_IO_LOW)
#define READ_IO_IO_HIGH(dev) __raw_readl(dev->hpa + IO_IO_HIGH)
void walk_lower_bus(struct parisc_device *dev)
{
unsigned long io_io_low, io_io_high;
if (!BUS_CONVERTER(dev) || IS_LOWER_PORT(dev))
return;
if (dev->id.hw_type == HPHW_IOA) {
io_io_low = (unsigned long)(signed int)(READ_IO_IO_LOW(dev) << 16);
io_io_high = io_io_low + MAX_NATIVE_DEVICES * NATIVE_DEVICE_OFFSET;
} else {
io_io_low = (READ_IO_IO_LOW(dev) + ~FLEX_MASK) & FLEX_MASK;
io_io_high = (READ_IO_IO_HIGH(dev)+ ~FLEX_MASK) & FLEX_MASK;
}
walk_native_bus(io_io_low, io_io_high, dev);
}
--
Revolutions do not require corporate support.
prev parent reply other threads:[~2002-11-13 22:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-13 19:26 [parisc-linux] LONG pause on boot Tom
2002-11-13 19:30 ` Matthew Wilcox
2002-11-13 20:05 ` Tom
2002-11-13 21:46 ` Ryan Bradetich
2002-11-13 22:44 ` Matthew Wilcox [this message]
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=20021113224443.R30392@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=palinux@alaskatech.org \
--cc=parisc-linux@parisc-linux.org \
--cc=rbrad@uswest.net \
/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