From patchwork Wed Jun 5 06:01:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijing Wang X-Patchwork-Id: 2664981 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 89FB8DFE82 for ; Wed, 5 Jun 2013 06:04:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751360Ab3FEGEv (ORCPT ); Wed, 5 Jun 2013 02:04:51 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:4982 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751938Ab3FEGEs (ORCPT ); Wed, 5 Jun 2013 02:04:48 -0400 Received: from 172.24.2.119 (EHLO szxeml210-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id BDF61522; Wed, 05 Jun 2013 14:04:46 +0800 (CST) Received: from SZXEML401-HUB.china.huawei.com (10.82.67.31) by szxeml210-edg.china.huawei.com (172.24.2.183) with Microsoft SMTP Server (TLS) id 14.1.323.7; Wed, 5 Jun 2013 14:04:42 +0800 Received: from localhost (10.135.76.69) by szxeml401-hub.china.huawei.com (10.82.67.31) with Microsoft SMTP Server id 14.1.323.7; Wed, 5 Jun 2013 14:04:35 +0800 From: Yijing Wang To: Bjorn Helgaas CC: Yinghai Lu , , Tony Luck , , Fenghua Yu , Hanjun Guo , , Yijing Wang , Greg Kroah-Hartman Subject: [PATCH -v4 6/8] PCI/IA64: add host bridge resource release for _CRS path Date: Wed, 5 Jun 2013 14:01:55 +0800 Message-ID: <1370412117-12860-7-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.11.msysgit.1 In-Reply-To: <1370412117-12860-1-git-send-email-wangyijing@huawei.com> References: <1370412117-12860-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 dfb6149..4383b03 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -368,6 +368,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; @@ -443,7 +450,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;