From patchwork Fri May 17 09:55:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijing Wang X-Patchwork-Id: 2581841 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 10182DF215 for ; Fri, 17 May 2013 09:57:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754823Ab3EQJ5f (ORCPT ); Fri, 17 May 2013 05:57:35 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:59846 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753886Ab3EQJ5e (ORCPT ); Fri, 17 May 2013 05:57:34 -0400 Received: from 172.24.2.119 (EHLO szxeml214-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id BCH09489; Fri, 17 May 2013 17:57:29 +0800 (CST) Received: from SZXEML457-HUB.china.huawei.com (10.82.67.200) by szxeml214-edg.china.huawei.com (172.24.2.29) with Microsoft SMTP Server (TLS) id 14.1.323.7; Fri, 17 May 2013 17:57:14 +0800 Received: from localhost (10.135.76.69) by szxeml457-hub.china.huawei.com (10.82.67.200) with Microsoft SMTP Server id 14.1.323.7; Fri, 17 May 2013 17:56:17 +0800 From: Yijing Wang To: Bjorn Helgaas CC: , Hanjun Guo , , Yijing Wang , Tony Luck , Fenghua Yu , Yinghai Lu , Greg Kroah-Hartman , Subject: [PATCH -v2 6/7] PCI/IA64: add host bridge resource release for _CRS path Date: Fri, 17 May 2013 17:55:49 +0800 Message-ID: <1368784550-18332-7-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.11.msysgit.1 In-Reply-To: <1368784550-18332-1-git-send-email-wangyijing@huawei.com> References: <1368784550-18332-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.135.76.69] X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Set IA64 host bridge release function to make sure root bridge related resources get freed during root bus removal. Signed-off-by: Yijing Wang Signed-off-by: Jiang Liu Cc: Tony Luck Cc: Fenghua Yu Cc: Yinghai Lu Cc: Greg Kroah-Hartman Cc: linux-ia64@vger.kernel.org --- arch/ia64/pci/pci.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 658030f..2857a83 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -358,6 +358,13 @@ static void __release_pci_root_info(struct pci_root_info *info) kfree(info); } +static void release_pci_root_info(struct pci_host_bridge *bridge) +{ + struct pci_root_info *info = bridge->release_data; + + __release_pci_root_info(info); +} + struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) { struct acpi_device *device = root->device; @@ -433,7 +440,9 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) __release_pci_root_info(info); return NULL; } - + + pci_set_host_bridge_release(to_pci_host_bridge(pbus->bridge), + release_pci_root_info, info); pci_scan_child_bus(pbus); return pbus;