From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Russell King <rmk@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PCI bridge setup weirdness
Date: Fri, 8 Dec 2000 15:51:28 +0300 [thread overview]
Message-ID: <20001208155128.A2926@jurassic.park.msu.ru> (raw)
In-Reply-To: <200012072246.eB7Mk9e13384@flint.arm.linux.org.uk>
In-Reply-To: <200012072246.eB7Mk9e13384@flint.arm.linux.org.uk>; from rmk@arm.linux.org.uk on Thu, Dec 07, 2000 at 10:46:08PM +0000
On Thu, Dec 07, 2000 at 10:46:08PM +0000, Russell King wrote:
> It appears to be caused by the pci_read_bridge_bases code copying the
> pointer to the resources instead of making a copy of the resources
> themselves.
No, pci_read_bridge_bases() is obsoleted by new pci setup code. ;-)
You have to set up bus resources properly in pcibios_fixup_bus().
For a single root bus configuration, you don't need to do anything
with the root bus itself - its resources already point to ioport_resource
and iomem_resource, which should be ok. For pci-pci bridges you have
to add something like this:
struct pci_dev *bridge = bus->self;
if (bridge) {
int i;
for(i=0; i<3; i++) {
bus->resource[i] =
&bridge->resource[PCI_BRIDGE_RESOURCES+i];
bus->resource[i]->name = bus->name;
}
bus->resource[0]->flags = pci_bridge_check_io(bridge);
bus->resource[1]->flags = IORESOURCE_MEM;
bus->resource[0]->end = ioport_resource.end;
bus->resource[1]->end = iomem_resource.end;
/* Turn off downstream PF memory address range by default */
bus->resource[2]->start = 1024*1024;
bus->resource[2]->end = bus->resource[2]->start - 1;
}
Check arch/alpha/kernel/pci.c:pcibios_fixup_bus() for reference.
Ivan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-12-08 13:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-07 22:46 Russell King
2000-12-08 12:51 ` Ivan Kokshaysky [this message]
2000-12-08 14:31 ` Benjamin Herrenschmidt
2000-12-09 10:49 ` Ivan Kokshaysky
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=20001208155128.A2926@jurassic.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@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®