diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-07 01:28:15 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-07 01:28:15 +0200 |
commit | c51aa6db2a599b49d53668008f845c670694beb7 (patch) | |
tree | 6ab6cf7918dae89d629088daad419e759477dd26 /arch | |
parent | Merge tag 'for-linus-v3.10-rc5' of git://oss.sgi.com/xfs/xfs (diff) | |
parent | x86/PCI: Map PCI setup data with ioremap() so it can be in highmem (diff) | |
download | linux-c51aa6db2a599b49d53668008f845c670694beb7.tar.xz linux-c51aa6db2a599b49d53668008f845c670694beb7.zip |
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
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/pci/common.c | 5 |
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) pa_data = boot_params.hdr.setup_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) { rom = (struct pci_setup_rom *)data; @@ -645,6 +647,7 @@ int pcibios_add_device(struct pci_dev *dev) } } pa_data = data->next; + iounmap(data); } return 0; } |