linux/drivers/pci/hotplug
Ingo Molnar 15160716ee x86, pci-hotplug, calgary / rio: fix EBDA ioremap()
IO resource and ioremap debugging uncovered this ioremap() done
by drivers/pci/hotplug/ibmphp_ebda.c:

initcall pci_hotplug_init+0x0/0x41 returned 0 after 3 msecs
calling  ibmphp_init+0x0/0x360 @ 1
ibmphpd: IBM Hot Plug PCI Controller Driver version: 0.6
resource map sanity check conflict: 0x9f800 0xaf5e7 0x9f800 0x9ffff reserved
------------[ cut here ]------------
WARNING: at arch/x86/mm/ioremap.c:175 __ioremap_caller+0x5c/0x226()
Pid: 1, comm: swapper Not tainted 2.6.27-rc7-tip-00914-g347b10f-dirty #36038
 [<c013a72d>] warn_on_slowpath+0x41/0x68
 [<c0156f00>] ? __lock_acquire+0x9ba/0xa7f
 [<c012158c>] ? do_flush_tlb_all+0x0/0x59
 [<c015ac31>] ? smp_call_function_mask+0x74/0x17d
 [<c012158c>] ? do_flush_tlb_all+0x0/0x59
 [<c013b228>] ? printk+0x1a/0x1c
 [<c013f302>] ? iomem_map_sanity_check+0x82/0x8c
 [<c0a773e8>] ? _read_unlock+0x22/0x25
 [<c013f302>] ? iomem_map_sanity_check+0x82/0x8c
 [<c0154e17>] ? trace_hardirqs_off+0xb/0xd
 [<c0127731>] __ioremap_caller+0x5c/0x226
 [<c0156158>] ? trace_hardirqs_on+0xb/0xd
 [<c012767d>] ? iounmap+0x9d/0xa5
 [<c01279dd>] ioremap_nocache+0x15/0x17
 [<c0403c42>] ? ioremap+0xd/0xf
 [<c0403c42>] ioremap+0xd/0xf
 [<c0f1928f>] ibmphp_access_ebda+0x60/0xa0e
 [<c0f17f64>] ibmphp_init+0xb5/0x360
 [<c0101057>] do_one_initcall+0x57/0x138
 [<c0f17eaf>] ? ibmphp_init+0x0/0x360
 [<c0156158>] ? trace_hardirqs_on+0xb/0xd
 [<c0148d75>] ? __queue_work+0x2b/0x30
 [<c0f17eaf>] ? ibmphp_init+0x0/0x360
 [<c0f015a0>] kernel_init+0x17b/0x1e2
 [<c0f01425>] ? kernel_init+0x0/0x1e2
 [<c01178b3>] kernel_thread_helper+0x7/0x10
 =======================
---[ end trace a7919e7f17c0a725 ]---
initcall ibmphp_init+0x0/0x360 returned -19 after 144 msecs
calling  zt5550_init+0x0/0x6a @ 1

the problem is this code:

        io_mem = ioremap (ebda_seg<<4, 65000);

it assumes that the EBDA is 65000 bytes. But BIOS EBDA pointers are
at most 1K large.

_if_ the Rio code truly extends upon the customary EBDA size it needs
to iounmap() this memory and ioremap() it larger, once it knows it from
the generic descriptors that a Rio system is around.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-09-26 13:25:04 +02:00
..
acpi_pcihp.c PCI: add acpi_find_root_bridge_handle 2008-08-18 13:48:04 -07:00
acpiphp_core.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
acpiphp_glue.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
acpiphp_ibm.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
acpiphp.h driver core: remove KOBJ_NAME_LEN define 2008-07-21 21:54:52 -07:00
cpci_hotplug_core.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
cpci_hotplug_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
cpci_hotplug.h
cpcihp_generic.c PCI Hotplug: make cpcihp driver use modern apis 2008-04-20 21:46:56 -07:00
cpcihp_zt5550.c PCI: ZT5550 CPCI Hotplug driver fix 2007-05-02 19:02:40 -07:00
cpcihp_zt5550.h
cpqphp_core.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
cpqphp_ctrl.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
cpqphp_nvram.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
cpqphp_nvram.h
cpqphp_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
cpqphp_sysfs.c [PATCH] mark struct file_operations const 5 2007-02-12 09:48:45 -08:00
cpqphp.h PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
fakephp.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
ibmphp_core.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
ibmphp_ebda.c x86, pci-hotplug, calgary / rio: fix EBDA ioremap() 2008-09-26 13:25:04 +02:00
ibmphp_hpc.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
ibmphp_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
ibmphp_res.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
ibmphp.h PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
Kconfig PCI Hotplug: the ibm driver is not dependant on PCI_LEGACY 2008-04-20 21:46:57 -07:00
Makefile PCI: hotplug: Link fakephp last 2008-02-01 15:04:20 -08:00
pci_hotplug_core.c Remove unnecessary 'tmp' variable from pci_hp_register(). 2008-06-25 15:58:39 -07:00
pciehp_core.c PCI: pciehp: Rename duplicate slot name N as N-1, N-2, N-M... 2008-08-21 15:15:10 -07:00
pciehp_ctrl.c pciehp: move msleep after power off 2008-05-27 15:43:33 -07:00
pciehp_hpc.c PCI: pciehp: Rename duplicate slot name N as N-1, N-2, N-M... 2008-08-21 15:15:10 -07:00
pciehp_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
pciehp.h PCI: pciehp: Rename duplicate slot name N as N-1, N-2, N-M... 2008-08-21 15:15:10 -07:00
pcihp_skeleton.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
rpadlpar_core.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
rpadlpar_sysfs.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
rpadlpar.h
rpaphp_core.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
rpaphp_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
rpaphp_slot.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
rpaphp.h pci hotplug: fix rpaphp directory naming 2008-02-01 15:04:22 -08:00
sgi_hotplug.c PCI: ACPI PCI slot detection driver 2008-06-10 14:37:14 -07:00
shpchp_core.c PCI: shpchp: Rename duplicate slot name N as N-1, N-2, N-M... 2008-08-21 15:15:31 -07:00
shpchp_ctrl.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
shpchp_hpc.c shpchp: check firmware before taking control 2008-06-10 10:59:53 -07:00
shpchp_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
shpchp_sysfs.c SHPCHP: fix __must_check warnings 2006-09-26 17:43:53 -07:00
shpchp.h shpchp: check firmware before taking control 2008-06-10 10:59:53 -07:00