From: linas <linas@austin.ibm.com>
To: paulus@samba.org
Cc: linuxppc64-dev@ozlabs.org, johnrose@austin.ibm.com,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] ppc64: Crash in DLPAR code on remove operation
Date: Tue, 4 Oct 2005 19:01:16 -0500 [thread overview]
Message-ID: <20051005000116.GX29826@austin.ibm.com> (raw)
In-Reply-To: <20051004203019.GV29826@austin.ibm.com>
This patch fixes two bugs related to dlpar slot removal and add.
-- Both crashes are due to the fact the some children
of pci nodes are not pci nodes themselves, and thus do not
have pci_dn structures. For example:
/pci@800000020000002/pci@2,3/usb@1/hub@1
/pci@800000020000002/pci@2,3/usb@1,1/hub@1
Strangely, though, sometimes the following appears,
and I don't quite understand why.
/interrupt-controller@3fe0000a400
A typical stack trace:
Vector: 300 (Data Access) at [c0000000555637d0]
pc: c000000000202a50: .dlpar_add_slot+0x108/0x410
c000000000202e78 .add_slot_store+0x7c/0xac
c000000000202da0 .dlpar_attr_store+0x48/0x64
c0000000000f8ee4 .sysfs_write_file+0x100/0x1a0
A similar stack trace is involved for the slot remove.
This code survived testing, of adding and removing different slots,
23 times each, so far, as of this writing.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Index: linux-2.6.14-rc2-git6/arch/ppc64/kernel/pSeries_iommu.c
===================================================================
--- linux-2.6.14-rc2-git6.orig/arch/ppc64/kernel/pSeries_iommu.c 2005-10-04 16:47:09.175705100 -0500
+++ linux-2.6.14-rc2-git6/arch/ppc64/kernel/pSeries_iommu.c 2005-10-04 17:12:54.123928903 -0500
@@ -478,10 +478,13 @@
{
int err = NOTIFY_OK;
struct device_node *np = node;
- struct pci_dn *pci = np->data;
+ struct pci_dn *pci;
switch (action) {
case PSERIES_RECONFIG_REMOVE:
+ pci = PCI_DN(np);
+ if (!pci)
+ return NOTIFY_OK;
if (pci->iommu_table &&
get_property(np, "ibm,dma-window", NULL))
iommu_free_table(np);
Index: linux-2.6.14-rc2-git6/arch/ppc64/kernel/pci_dn.c
===================================================================
--- linux-2.6.14-rc2-git6.orig/arch/ppc64/kernel/pci_dn.c 2005-10-04 15:37:49.761245845 -0500
+++ linux-2.6.14-rc2-git6/arch/ppc64/kernel/pci_dn.c 2005-10-04 17:58:47.344628793 -0500
@@ -195,7 +195,10 @@
switch (action) {
case PSERIES_RECONFIG_ADD:
- pci = np->parent->data;
+ pci = PCI_DN(np->parent);
+ if (!pci)
+ return NOTIFY_OK;
+
update_dn_pci_info(np, pci->phb);
break;
default:
next prev parent reply other threads:[~2005-10-05 0:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-03 18:57 [PATCH] ppc64: Crash in DLPAR code on PCI hotplug add linas
2005-10-03 21:34 ` Alexey Dobriyan
2005-10-03 21:49 ` linas
2005-10-04 20:30 ` linas
2005-10-04 23:59 ` [PATCH 1/2] " linas
2005-10-05 0:01 ` linas [this message]
2005-10-05 0:04 ` [PATCH] rpaphp: PCI Hotplug crash on PHB DLPAR add linas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051005000116.GX29826@austin.ibm.com \
--to=linas@austin.ibm.com \
--cc=johnrose@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome