1. 11 Nov, 2010 2 commits
    • Bjorn Helgaas's avatar
      x86/PCI: coalesce overlapping host bridge windows · 4723d0f2
      Bjorn Helgaas authored
      Some BIOSes provide PCI host bridge windows that overlap, e.g.,
      
          pci_root PNP0A03:00: host bridge window [mem 0xb0000000-0xffffffff]
          pci_root PNP0A03:00: host bridge window [mem 0xafffffff-0xdfffffff]
          pci_root PNP0A03:00: host bridge window [mem 0xf0000000-0xffffffff]
      
      If we simply insert these as children of iomem_resource, the second window
      fails because it conflicts with the first, and the third is inserted as a
      child of the first, i.e.,
      
          b0000000-ffffffff PCI Bus 0000:00
            f0000000-ffffffff PCI Bus 0000:00
      
      When we claim PCI device resources, this can cause collisions like this
      if we put them in the first window:
      
          pci 0000:00:01.0: address space collision: [mem 0xff300000-0xff4fffff] conflicts with PCI Bus 0000:00 [mem 0xf0000000-0xffffffff]
      
      Host bridge windows are top-level resources by definition, so it doesn't
      make sense to make the third window a child of the first.  This patch
      coalesces any host bridge windows that overlap.  For the example above,
      the result is this single window:
      
          pci_root PNP0A03:00: host bridge window [mem 0xafffffff-0xffffffff]
      
      This fixes a 2.6.34 regression.
      
      Reference: https://bugzilla.kernel.org/show_bug.cgi?id=17011Reported-and-tested-by: default avatarAnisse Astier <anisse@astier.eu>
      Reported-and-tested-by: default avatarPramod Dematagoda <pmd.lotr.gandalf@gmail.com>
      Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      4723d0f2
    • Steven Rostedt's avatar
      PCI hotplug: ibmphp: Add check to prevent reading beyond mapped area · ac3abf2c
      Steven Rostedt authored
      While testing various randconfigs with ktest.pl, I hit the following panic:
      
      BUG: unable to handle kernel paging request at f7e54b03
      IP: [<c0d63409>] ibmphp_access_ebda+0x101/0x19bb
      
      Adding printks, I found that the loop that reads the ebda blocks
      can move out of the mapped section.
      
      ibmphp_access_ebda: start=f7e44c00 size=5120 end=f7e46000
      ibmphp_access_ebda: io_mem=f7e44d80 offset=384
      ibmphp_access_ebda: io_mem=f7e54b03 offset=65283
      
      The start of the iomap was at f7e44c00 and had a size of 5120,
      making the end f7e46000. We start with an offset of 0x180 or
      384, giving the first read at 0xf7e44d80. Reading that location
      yields 65283, which is much bigger than the 5120 that was allocated
      and makes the next read at f7e54b03 which is outside the mapped area.
      
      Perhaps this is a bug in the driver, or buggy hardware, but this patch
      is more about not crashing my box on start up and just giving a warning
      if it detects this error.
      
      This patch at least lets my box boot with just a warning.
      
      Cc: Chandru Siddalingappa <chandru@linux.vnet.ibm.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      ac3abf2c
  2. 09 Nov, 2010 5 commits
  3. 08 Nov, 2010 17 commits
  4. 06 Nov, 2010 7 commits
  5. 05 Nov, 2010 9 commits