aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-06 19:28:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-06 19:28:15 -0400
commitc51aa6db2a599b49d53668008f845c670694beb7 (patch)
tree6ab6cf7918dae89d629088daad419e759477dd26
parente6395b68ad09a835f058da31bad0fe23d3882659 (diff)
parent65694c5aaddfedd9da082e4e150cafc6b3fc8a6a (diff)
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
-rw-r--r--arch/x86/pci/common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 305c68b8d538..981c2dbd72cc 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -628,7 +628,9 @@ int pcibios_add_device(struct pci_dev *dev)
628 628
629 pa_data = boot_params.hdr.setup_data; 629 pa_data = boot_params.hdr.setup_data;
630 while (pa_data) { 630 while (pa_data) {
631 data = phys_to_virt(pa_data); 631 data = ioremap(pa_data, sizeof(*rom));
632 if (!data)
633 return -ENOMEM;
632 634
633 if (data->type == SETUP_PCI) { 635 if (data->type == SETUP_PCI) {
634 rom = (struct pci_setup_rom *)data; 636 rom = (struct pci_setup_rom *)data;
@@ -645,6 +647,7 @@ int pcibios_add_device(struct pci_dev *dev)
645 } 647 }
646 } 648 }
647 pa_data = data->next; 649 pa_data = data->next;
650 iounmap(data);
648 } 651 }
649 return 0; 652 return 0;
650} 653}