Commit c51aa6db authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pci-v3.10-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:
 "This fixes a crash when booting a 32-bit kernel via the EFI boot stub.

  PCI ROM from EFI
      x86/PCI: Map PCI setup data with ioremap() so it can be in highmem"

* tag 'pci-v3.10-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  x86/PCI: Map PCI setup data with ioremap() so it can be in highmem
parents e6395b68 65694c5a
...@@ -628,7 +628,9 @@ int pcibios_add_device(struct pci_dev *dev) ...@@ -628,7 +628,9 @@ int pcibios_add_device(struct pci_dev *dev)
pa_data = boot_params.hdr.setup_data; pa_data = boot_params.hdr.setup_data;
while (pa_data) { while (pa_data) {
data = phys_to_virt(pa_data); data = ioremap(pa_data, sizeof(*rom));
if (!data)
return -ENOMEM;
if (data->type == SETUP_PCI) { if (data->type == SETUP_PCI) {
rom = (struct pci_setup_rom *)data; rom = (struct pci_setup_rom *)data;
...@@ -645,6 +647,7 @@ int pcibios_add_device(struct pci_dev *dev) ...@@ -645,6 +647,7 @@ int pcibios_add_device(struct pci_dev *dev)
} }
} }
pa_data = data->next; pa_data = data->next;
iounmap(data);
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment