From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Ciaran McCreesh" <ciaran.mccreesh@googlemail.com>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: kernel boot hangs after x86: insert_resorce for lapic addr after e820_reserve_resources
Date: Sun, 18 May 2008 20:43:09 -0700 [thread overview]
Message-ID: <86802c440805182043n2a4855bcw6924f6df2fbdc9f4@mail.gmail.com> (raw)
In-Reply-To: <20080518232347.7964835c@snowcone>
[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]
On Sun, May 18, 2008 at 3:23 PM, Ciaran McCreesh
<ciaran.mccreesh@googlemail.com> wrote:
> On Sun, 18 May 2008 14:00:16 -0700
> "Yinghai Lu" <yhlu.kernel@gmail.com> wrote:
>> >> wonder if init_apic_mapping need some delay with that strange
>> >> chipset.
>> >
>> > I don't see any additional information with apic=verbose with the
>> > broken kernel (although I only have a screen's worth of text that I
>> > can see -- the kernel doesn't get far enough to let me grab it).
>> > I've attached dmesg from a working kernel with apic=verbose in case
>> > that helps.
>>
>> or try to boot with initcall_debug to see where did it hang.
>
> The last initcall_debug messages are:
>
> calling atiixp_ide_init+0x0/0x20
> initcall atiixp_ide_init+0x0/0x20 returned 0 after 0 msecs
> calling piix_ide_init+0x0/0xc0
> initcall piix_ide_init+0x0/0xc0 returned 0 after 0 msecs
> calling ide_scan_pcibus+0x0/0x100
>
> ide_scan_pcibus doesn't return. I tried shoving some printks in there,
> but as soon as I did it instead locked up in pci_init. Is it worth
> continuing this approach or will doing so not give useful results
> anyway?
could be pci iomem conflicts...
please enable CONFIG_PCI_DEBUG=y
and apply the following two debug patches
YH
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: debug_extra_pci_res_range.patch --]
[-- Type: text/x-patch; name=debug_extra_pci_res_range.patch, Size: 1787 bytes --]
Index: linux-2.6/drivers/pci/probe.c
===================================================================
--- linux-2.6.orig/drivers/pci/probe.c
+++ linux-2.6/drivers/pci/probe.c
@@ -275,6 +275,7 @@ static void pci_read_bases(struct pci_de
}
res->start = l64 & PCI_BASE_ADDRESS_MEM_MASK;
res->end = res->start + sz64;
+ printk(KERN_INFO "PCI: %s reg %x 64bit mmio: [%llx, %llx]\n", pci_name(dev), reg, res->start, res->end);
#else
if (sz64 > 0x100000000ULL) {
printk(KERN_ERR "PCI: Unable to handle 64-bit "
@@ -290,6 +291,8 @@ static void pci_read_bases(struct pci_de
res->end = sz;
}
#endif
+ } else {
+ printk(KERN_INFO "PCI: %s reg %x %s: [%llx, %llx]\n", pci_name(dev), reg, (res->flags & IORESOURCE_IO)? "io port":"32bit mmio", res->start, res->end);
}
}
if (rom) {
@@ -357,6 +360,7 @@ void __devinit pci_read_bridge_bases(str
res->start = base;
if (!res->end)
res->end = limit + 0xfff;
+ printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n", pci_name(dev), res->start, res->end);
}
res = child->resource[1];
@@ -368,6 +372,7 @@ void __devinit pci_read_bridge_bases(str
res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
res->start = base;
res->end = limit + 0xfffff;
+ printk(KERN_INFO "PCI: bridge %s 32bit mmio: [%llx, %llx]\n", pci_name(dev), res->start, res->end);
}
res = child->resource[2];
@@ -402,6 +407,7 @@ void __devinit pci_read_bridge_bases(str
res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH;
res->start = base;
res->end = limit + 0xfffff;
+ printk(KERN_INFO "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n", pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64)?"64":"32",res->start, res->end);
}
}
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: debug_extra_pci_bus_res.patch --]
[-- Type: text/x-patch; name=debug_extra_pci_bus_res.patch, Size: 1299 bytes --]
Index: linux-2.6/drivers/pci/setup-bus.c
===================================================================
--- linux-2.6.orig/drivers/pci/setup-bus.c
+++ linux-2.6/drivers/pci/setup-bus.c
@@ -537,6 +537,36 @@ void __ref pci_bus_assign_resources(stru
}
EXPORT_SYMBOL(pci_bus_assign_resources);
+static void pci_bus_dump_res(struct pci_bus *bus)
+{
+ int i;
+
+ for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
+ struct resource *res = bus->resource[i];
+ if (!res)
+ continue;
+
+ printk(KERN_INFO "bus: %02x index %x %s: [%llx, %llx]\n", bus->number, i, (res->flags & IORESOURCE_IO)? "io port":"mmio", res->start, res->end);
+ }
+}
+
+static void pci_bus_dump_resources(struct pci_bus *bus)
+{
+ struct pci_bus *b;
+ struct pci_dev *dev;
+
+
+ pci_bus_dump_res(bus);
+
+ list_for_each_entry(dev, &bus->devices, bus_list) {
+ b = dev->subordinate;
+ if (!b)
+ continue;
+
+ pci_bus_dump_resources(b);
+ }
+}
+
void __init
pci_assign_unassigned_resources(void)
{
@@ -552,4 +582,9 @@ pci_assign_unassigned_resources(void)
pci_bus_assign_resources(bus);
pci_enable_bridges(bus);
}
+
+ /* dump the resource on buses */
+ list_for_each_entry(bus, &pci_root_buses, node) {
+ pci_bus_dump_resources(bus);
+ }
}
next prev parent reply other threads:[~2008-05-19 3:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-18 0:41 Ciaran McCreesh
2008-05-18 3:55 ` Yinghai Lu
2008-05-18 15:41 ` Ciaran McCreesh
2008-05-18 21:00 ` Yinghai Lu
2008-05-18 22:23 ` Ciaran McCreesh
2008-05-19 3:43 ` Yinghai Lu [this message]
2008-05-20 0:44 ` Ciaran McCreesh
2008-05-20 1:22 ` Yinghai Lu
2008-05-20 1:24 ` Ciaran McCreesh
2008-05-20 2:48 ` Yinghai Lu
2008-05-20 3:16 ` Ciaran McCreesh
2008-05-20 3:22 ` Yinghai Lu
2008-05-20 3:25 ` Yinghai Lu
2008-05-23 23:50 ` Ciaran McCreesh
2008-05-24 0:05 ` Yinghai Lu
2008-05-24 1:09 ` Ciaran McCreesh
2008-05-24 1:51 ` Yinghai Lu
2008-05-24 2:29 ` Yinghai Lu
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=86802c440805182043n2a4855bcw6924f6df2fbdc9f4@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=ciaran.mccreesh@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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®