From patchwork Tue Feb 14 21:25:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9572925 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 973D1601E7 for ; Tue, 14 Feb 2017 21:25:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 875A526E4D for ; Tue, 14 Feb 2017 21:25:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BD632840B; Tue, 14 Feb 2017 21:25:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2778626E4D for ; Tue, 14 Feb 2017 21:25:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755563AbdBNVZb (ORCPT ); Tue, 14 Feb 2017 16:25:31 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:49356 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444AbdBNVZa (ORCPT ); Tue, 14 Feb 2017 16:25:30 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5A1C560D6F; Tue, 14 Feb 2017 21:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1487107529; bh=9LgbNkD6FgyxLe1ir3CgRfkQWL2VNdx/ktERgeuJeDw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T5ISKsZCg+EK/5x/bALbWu9hYXTIdKHaAdLaOPTmhCyGgjUMyOAqH5BQ/p3r3HBIe ZfUg/k5tAi9Y209KbFNbn4cW+uvdCgpf/7SrxcUFpaguAwuYLDVFX5MvID5n/o7CUS cEHb3B1GUjPZf8+5vzYezhR3kdQ0XOZI2drdVSS0= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 152CD60D5D; Tue, 14 Feb 2017 21:25:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1487107528; bh=9LgbNkD6FgyxLe1ir3CgRfkQWL2VNdx/ktERgeuJeDw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NvL5HUWEgSkyLlS75TpmeOlZpwvQ9yy8Xj/9U89tcIgPnDyXhOk+TtH/3fxn4mf62 Qc6uy0O2ZCRDgmDJSJTFQuofVRcJqJlUXDiurEOLcbyPbpcfbLtClRAeh5xFvpPdEI QCjYD9rF/lXuPRsjPflCRSRb4zAAIQ9cwEeXyJ8M= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 152CD60D5D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: linux-pci@vger.kernel.org, timur@codeaurora.org Cc: alex.williamson@redhat.com, iommu@lists.linux-foundation.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] iommu: add warning when sharing groups Date: Tue, 14 Feb 2017 16:25:22 -0500 Message-Id: <1487107522-8695-2-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1487107522-8695-1-git-send-email-okaya@codeaurora.org> References: <1487107522-8695-1-git-send-email-okaya@codeaurora.org> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ACS requirement has been obscured in the current code and is only known by certain individuals who happen to read the code. Print out a warning with ACS path failure when ACS requirement is not met. Signed-off-by: Sinan Kaya --- drivers/iommu/iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index dbe7f65..049ee0a 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -811,6 +811,9 @@ struct iommu_group *pci_device_group(struct device *dev) if (IS_ERR(group)) return NULL; + if (pci_is_root_bus(bus)) + dev_warn_once(&pdev->dev, "using shared group due to ACS path failure\n"); + return group; }