Thread (3 messages) 3 messages, 3 authors, 2012-08-20

Re: [PATCH v1] PCI,IA64: free associated resources when removing host bridges

From: Jiang Liu <hidden>
Date: 2012-08-20 15:44:13
Also in: lkml

On 08/16/2012 04:06 AM, Bjorn Helgaas wrote:
quoted
---

This patch applies to
git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/next-3.5
x86 does the exact same thing in arch/x86/pci/acpi.c (some of the data
structures are slightly different and ia64 does have the extra
memory-mapped I/O port space regions, but they are essentially
similar).  Can you rework this a bit so it looks more like the x86
code, e.g., use the same function names and code when possible?

Someday the x86 and ia64 code should be converged, and if the code
looks more similar, that's more likely to happen.
Hi Bjorn,
	My original plan was to follow x86 implementation, but found there's
a race condition with current "pci_set_host_bridge_release()" design. 
	So the IA64 version is implemented in the way to fix the design flaw 
related to pci_set_host_bridge_release(). I will send out another patches to
fix the design flaw and to enhance x86 version to follow IA64.
quoted
+static void shutdown_pci_controller(struct pci_host_bridge *bridge)
+{
+       unsigned int i;
+       struct resource *resource;
+       struct iospace_resource *iospace;
+       struct pci_controller *controller = bridge->release_data;
+
+       if (!controller)
+               return;
I'd remove this test because controller will be NULL only if there's a
programming error, and having the test here would cover up such
errors.
Over defensive, will remove it.

	Regards!
	Gerry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help