From patchwork Sat Apr 27 09:12:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijing Wang X-Patchwork-Id: 2496851 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4155640106 for ; Sat, 27 Apr 2013 09:13:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754135Ab3D0JNh (ORCPT ); Sat, 27 Apr 2013 05:13:37 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:57308 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754019Ab3D0JNg (ORCPT ); Sat, 27 Apr 2013 05:13:36 -0400 Received: from 172.24.2.119 (EHLO szxeml213-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id BBG66484; Sat, 27 Apr 2013 17:13:29 +0800 (CST) Received: from SZXEML422-HUB.china.huawei.com (10.82.67.161) by szxeml213-edg.china.huawei.com (172.24.2.30) with Microsoft SMTP Server (TLS) id 14.1.323.7; Sat, 27 Apr 2013 17:13:27 +0800 Received: from localhost (10.135.76.69) by szxeml422-hub.china.huawei.com (10.82.67.161) with Microsoft SMTP Server id 14.1.323.7; Sat, 27 Apr 2013 17:13:20 +0800 From: Yijing Wang To: Bjorn Helgaas CC: , Hanjun Guo , , Yijing Wang , Tony Luck , Fenghua Yu , Yinghai Lu , Greg Kroah-Hartman , Subject: [PATCH 6/7] PCI/IA64: add host bridge resource release for _CRS path Date: Sat, 27 Apr 2013 17:12:28 +0800 Message-ID: <1367053949-38424-7-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.11.msysgit.1 In-Reply-To: <1367053949-38424-1-git-send-email-wangyijing@huawei.com> References: <1367053949-38424-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;