From patchwork Thu Sep 27 08:11:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 187310 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3546B2C0099 for ; Thu, 27 Sep 2012 18:12:36 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756152Ab2I0IMf (ORCPT ); Thu, 27 Sep 2012 04:12:35 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:48481 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755522Ab2I0IM3 (ORCPT ); Thu, 27 Sep 2012 04:12:29 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8R8CB0Z013395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Sep 2012 08:12:12 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8R8CAH2005150 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 27 Sep 2012 08:12:11 GMT Received: from abhmt114.oracle.com (abhmt114.oracle.com [141.146.116.66]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8R8CAGI029442; Thu, 27 Sep 2012 03:12:10 -0500 Received: from linux-siqj.site (/75.36.244.250) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 27 Sep 2012 01:12:10 -0700 From: Yinghai Lu To: Bjorn Helgaas , Len Brown , Taku Izumi , Jiang Liu Cc: linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, Yinghai Lu Subject: [PATCH 4/8] PCI, ACPI: assign unassigned resource for hot add root bus Date: Thu, 27 Sep 2012 01:11:55 -0700 Message-Id: <1348733519-24684-5-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1348733519-24684-1-git-send-email-yinghai@kernel.org> References: <1348733519-24684-1-git-send-email-yinghai@kernel.org> X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org After we get hot-added ioapic registered. pci_enable_bridges will try to enable ioapic irq for pci bridges. Signed-off-by: Yinghai Lu --- drivers/acpi/pci_root.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index bce469c..27adbfd 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -644,12 +644,19 @@ static int acpi_pci_root_start(struct acpi_device *device) struct acpi_pci_root *root = acpi_driver_data(device); struct acpi_pci_driver *driver; + if (system_state != SYSTEM_BOOTING) + pci_assign_unassigned_bus_resources(root->bus); + mutex_lock(&acpi_pci_root_lock); list_for_each_entry(driver, &acpi_pci_drivers, node) if (driver->add) driver->add(root); mutex_unlock(&acpi_pci_root_lock); + /* need to after hot-added ioapic is registered */ + if (system_state != SYSTEM_BOOTING) + pci_enable_bridges(root->bus); + pci_bus_add_devices(root->bus); return 0;