Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932125Ab2HTPoN (ORCPT ); Mon, 20 Aug 2012 11:44:13 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:55820 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751410Ab2HTPoG (ORCPT ); Mon, 20 Aug 2012 11:44:06 -0400 Message-ID: <50325B3A.9090007@gmail.com> Date: Mon, 20 Aug 2012 23:43:54 +0800 From: Jiang Liu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Bjorn Helgaas CC: Jiang Liu , Yinghai Lu , Tony Luck , Fenghua Yu , Yijing Wang , Keping Chen , linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v1] PCI,IA64: free associated resources when removing host bridges References: <1337930622-7696-1-git-send-email-jiang.liu@huawei.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1751 Lines: 44 On 08/16/2012 04:06 AM, Bjorn Helgaas wrote: >> --- >> >> 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. >> +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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/