From patchwork Fri Oct 9 14:07:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 7362011 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7549F9F32B for ; Fri, 9 Oct 2015 14:05:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9CFA120889 for ; Fri, 9 Oct 2015 14:05:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB47F20888 for ; Fri, 9 Oct 2015 14:05:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754966AbbJIOFN (ORCPT ); Fri, 9 Oct 2015 10:05:13 -0400 Received: from mga02.intel.com ([134.134.136.20]:19905 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755497AbbJIOFJ (ORCPT ); Fri, 9 Oct 2015 10:05:09 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 09 Oct 2015 07:05:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,658,1437462000"; d="scan'208";a="807284064" Received: from gerry-dev.bj.intel.com ([10.238.158.61]) by fmsmga001.fm.intel.com with ESMTP; 09 Oct 2015 07:05:06 -0700 From: Jiang Liu To: Joerg Roedel , Borislav Petkov , Bjorn Helgaas , Daniel Vetter , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= Cc: Jiang Liu , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-iommu@vger.kernel.org, linux-acpi@vger.kernel.org, x86@kernel.org Subject: [Bugfix v4 2/2] ACPI, PCI: Prevent binding other PCI drivers to IOAPIC PCI devices Date: Fri, 9 Oct 2015 22:07:32 +0800 Message-Id: <1444399652-25920-3-git-send-email-jiang.liu@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1444399652-25920-1-git-send-email-jiang.liu@linux.intel.com> References: <1444386214-26319-1-git-send-email-joro@8bytes.org> <1444399652-25920-1-git-send-email-jiang.liu@linux.intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ACPI IOAPIC driver makes use of IOAPIC PCI devices, so prevent binding other PCI drivers to IOAPIC PCI devices used by ACPI IOAPIC driver. Signed-off-by: Jiang Liu Reviewed-by: Joerg Roedel --- drivers/acpi/ioapic.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/ioapic.c b/drivers/acpi/ioapic.c index ccdc8db16bb8..da71b274fc21 100644 --- a/drivers/acpi/ioapic.c +++ b/drivers/acpi/ioapic.c @@ -162,12 +162,14 @@ done: list_add(&ioapic->list, &ioapic_list); mutex_unlock(&ioapic_list_lock); - if (dev) + if (dev) { + dev->match_driver = false; dev_info(&dev->dev, "%s at %pR, GSI %u\n", type, res, (u32)gsi_base); - else + } else { acpi_handle_info(handle, "%s at %pR, GSI %u\n", type, res, (u32)gsi_base); + } return AE_OK; @@ -216,6 +218,7 @@ int acpi_ioapic_remove(struct acpi_pci_root *root) if (ioapic->pdev) { pci_release_region(ioapic->pdev, 0); pci_disable_device(ioapic->pdev); + ioapic->pdev->match_driver = true; pci_dev_put(ioapic->pdev); } else if (ioapic->res.flags && ioapic->res.parent) { release_resource(&ioapic->res);