On Thu, Jun 23, 2005 at 08:25:22AM +0200, Brice Goglin wrote:
>
> You're right. I reverted this one two days ago and got a working
> system. Actually, the system had other problems (got an oops when
> reading /proc/ioports). But they might be caused by dependencies
> between Grekgh's PCI patches that were still applied and and the
> one I removed, right ?
> Anyway, this fixed my maestro3 divide error and the yenta hang
> during boot.
>
Reverting the host bridge patch should not affect /proc/ioports,
that's probably something different. I'd like to see what your
ACPI tables look like and what the firmware reported for host
bridge resources. Can you send me the system DSDT
(cat /proc/acpi/dsdt > dsdt.hex). Also, can you apply this debug
hack patch to 2.6.12-mm1 and send me the dmesg output? You will
have to change your .config (e.g. disable yenta support?) to avoid
the system hang you seeing with 2.6.12-mm1 (or, you could capture
debug messages via serial console).
Rajesh
---------
Index: linux-2.6.12-mm1/arch/i386/pci/acpi.c
===================================================================
--- linux-2.6.12-mm1.orig/arch/i386/pci/acpi.c
+++ linux-2.6.12-mm1/arch/i386/pci/acpi.c
@@ -9,6 +9,13 @@ static void inline
add_resource_range(int idx, struct pci_bus *bus,
struct acpi_resource_address64 *addr, unsigned long flags)
{
+ printk("%s: adding resource %Lx:%Lx, flags %lx @ bus %x:%x\n",
+ __FUNCTION__,
+ addr->min_address_range,
+ addr->max_address_range,
+ flags,
+ bus->number,
+ idx);
memset(bus->resource[idx], 0, sizeof(*(bus->resource[idx])));
bus->resource[idx]->name = bus->name;
bus->resource[idx]->start = addr->min_address_range;
@@ -72,10 +79,28 @@ add_resources(struct acpi_resource *acpi
/* Consolidate adjacent resource ranges */
if (busr->end + 1 == address.min_address_range) {
busr->end = address.max_address_range;
+ printk("%s: consolidating %Lx:%Lx flags %lx for bus %x:%x, new %lx:%lx\n",
+ __FUNCTION__,
+ address.min_address_range,
+ address.max_address_range,
+ flags,
+ bus->number,
+ idx,
+ busr->start,
+ busr->end);
return AE_OK;
}
if (address.max_address_range + 1 == busr->start) {
busr->start = address.min_address_range;
+ printk("%s: consolidating %Lx:%Lx flags %lx for bus %x:%x, new %lx:%lx\n",
+ __FUNCTION__,
+ address.min_address_range,
+ address.max_address_range,
+ flags,
+ bus->number,
+ idx,
+ busr->start,
+ busr->end);
return AE_OK;
}
/* Consolidate overlapping resource ranges */
@@ -87,6 +112,15 @@ add_resources(struct acpi_resource *acpi
busr->start = address.min_address_range;
if (address.max_address_range > busr->end)
busr->end = address.max_address_range;
+ printk("%s: consolidating %Lx:%Lx flags %lx for bus %x:%x, new %lx:%lx\n",
+ __FUNCTION__,
+ address.min_address_range,
+ address.max_address_range,
+ flags,
+ bus->number,
+ idx,
+ busr->start,
+ busr->end);
return AE_OK;
}
printk(KERN_WARNING
@@ -125,6 +159,25 @@ verify_root_windows(struct pci_bus *bus)
return 0;
}
+static void dump_bridge_resources(struct pci_bus *bus)
+{
+ int i;
+ unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM;
+
+ printk("%s: Bus resources for bus %s, num %2x, prim %2x, sec %2x, sub %2x\n",
+ __FUNCTION__,
+ ((bus->self)? pci_name(bus->self): "root"),
+ bus->number,
+ bus->primary, bus->secondary, bus->subordinate);
+ for (i=0; i<PCI_BUS_NUM_RESOURCES; i++) {
+ struct resource *res = bus->resource[i];
+ if ((res) && (res->flags & type_mask)) {
+ printk("\tbus resouce #%2x, start %lx, end %lx, flags %lx\n",
+ i, res->start, res->end, res->flags);
+ }
+ }
+}
+
static void __devinit
pcibios_setup_root_windows(struct pci_bus *bus, acpi_handle handle)
{
@@ -141,6 +194,8 @@ pcibios_setup_root_windows(struct pci_bu
status = acpi_walk_resources(handle, METHOD_NAME__CRS,
add_resources, bus);
if (ACPI_FAILURE(status) || !verify_root_windows(bus)) {
+ printk("%s: Falling back to default host bridge resources\n",
+ __FUNCTION__);
printk(KERN_WARNING
"PCI: Falling back to default host bridge resources\n");
for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
@@ -148,6 +203,7 @@ pcibios_setup_root_windows(struct pci_bu
bus->resource[i] = bres[i];
}
}
+ dump_bridge_resources(bus);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]