From patchwork Thu Jun 6 07:34:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijing Wang X-Patchwork-Id: 2677771 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 D503DDF23A for ; Thu, 6 Jun 2013 07:35:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756066Ab3FFHfl (ORCPT ); Thu, 6 Jun 2013 03:35:41 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:60064 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755499Ab3FFHfk (ORCPT ); Thu, 6 Jun 2013 03:35:40 -0400 Received: from 172.24.2.119 (EHLO szxeml212-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id BDH16281; Thu, 06 Jun 2013 15:35:38 +0800 (CST) Received: from SZXEML453-HUB.china.huawei.com (10.82.67.196) by szxeml212-edg.china.huawei.com (172.24.2.181) with Microsoft SMTP Server (TLS) id 14.1.323.7; Thu, 6 Jun 2013 15:35:37 +0800 Received: from localhost (10.135.76.69) by SZXEML453-HUB.china.huawei.com (10.82.67.196) with Microsoft SMTP Server id 14.1.323.7; Thu, 6 Jun 2013 15:35:28 +0800 From: Yijing Wang To: Bjorn Helgaas CC: Yinghai Lu , , Tony Luck , , Fenghua Yu , Hanjun Guo , , Yijing Wang , Greg Kroah-Hartman Subject: [PATCH -v5 6/8] PCI/IA64: add host bridge resource release for _CRS path Date: Thu, 6 Jun 2013 15:34:51 +0800 Message-ID: <1370504093-14908-7-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.11.msysgit.1 In-Reply-To: <1370504093-14908-1-git-send-email-wangyijing@huawei.com> References: <1370504093-14908-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 | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 99a9f67..72a1957 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -369,6 +369,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; @@ -446,6 +453,8 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) 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;