[PATCH] ppc64: bugfix: crash on PCI hotplug
authorLinas Vepstas <linas@linas.org>
Fri, 4 Nov 2005 00:49:38 +0000 (18:49 -0600)
committerPaul Mackerras <paulus@samba.org>
Thu, 10 Nov 2005 00:35:27 +0000 (11:35 +1100)
commit18126f35f69c928af26ec1dda2cb91b23220cdd4
tree1717427df79d309dd5bcdba24b2e8c741785b03f
parent5c1344e988c716470b5609708215dd7f135f0e3a
[PATCH] ppc64: bugfix: crash on PCI hotplug

09-hotplug-bugfix.patch

In the current 2.6.14-rc2-git6 kernel, performing a Dynamic LPAR Add
of a hotplug slot will crash the system, with the following (abbreviated)
stack trace:

cpu 0x3: Vector: 700 (Program Check) at [c000000053dff7f0]
    pc: c0000000004f5974: .__alloc_bootmem+0x0/0xb0
    lr: c0000000000258a0: .update_dn_pci_info+0x108/0x118
        c0000000000257c8 .update_dn_pci_info+0x30/0x118 (unreliable)
        c0000000000258fc .pci_dn_reconfig_notifier+0x4c/0x64
        c000000000060754 .notifier_call_chain+0x68/0x9c

The root cause was that __init __alloc_bootmem() was called long after
boot had finished, resulting in a crash because this routine is undefined
after boot time.  The patch below fixes this crash, and adds some docs to
clarify the code.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/ppc64/kernel/pci_dn.c