The Intel P64H2 PCI bridge has the ability to allocate I/O space with
1KB granularity. I've written a patch against 2.6.14.2 to take
advantage of this option. I've tested it on the latest Unisys
ES7000-600.
Any comments?
--Dan
diff -Naur linux-2.6.14.2/drivers/pci/probe.c
linux-2.6.14.2-en1k/drivers/pci/probe.c
--- linux-2.6.14.2/drivers/pci/probe.c 2005-11-11 00:33:12.000000000
-0500
+++ linux-2.6.14.2-en1k/drivers/pci/probe.c 2005-11-21
08:52:01.000000000 -0500
@@ -251,8 +251,8 @@
res = child->resource[0];
pci_read_config_byte(dev, PCI_IO_BASE, &io_base_lo);
pci_read_config_byte(dev, PCI_IO_LIMIT, &io_limit_lo);
- base = (io_base_lo & PCI_IO_RANGE_MASK) << 8;
- limit = (io_limit_lo & PCI_IO_RANGE_MASK) << 8;
+ base = (io_base_lo & (PCI_IO_RANGE_MASK | 0x0c) ) << 8;
+ limit = (io_limit_lo & (PCI_IO_RANGE_MASK | 0x0c) ) << 8;
if ((io_base_lo & PCI_IO_RANGE_TYPE_MASK) ==
PCI_IO_RANGE_TYPE_32) {
u16 io_base_hi, io_limit_hi;
@@ -266,6 +266,19 @@
res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) |
IORESOURCE_IO;
res->start = base;
res->end = limit + 0xfff;
+
+ /*
+ ** See if the 1k granularity option is enabled on the
Intel P64H2
+ */
+ if (dev->vendor == PCI_VENDOR_ID_INTEL && dev->device
== 0x1460) {
+ u16 en1k;
+ pci_read_config_word(dev, 0x40, &en1k);
+
+ if(en1k & 0x200) {
+ res->end = limit + 0x3ff;
+ printk(KERN_INFO "PCI: Enable I/O Space
to 1 KB Granularity\n");
+ }
+ }
}
res = child->resource[1];
-
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]