Message ID | 20170426143813.21225-1-rrichter@cavium.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 E57B260245 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 26 Apr 2017 14:39:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D483D2022B for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 26 Apr 2017 14:39:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C905B2839C; Wed, 26 Apr 2017 14:39:31 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 340BD2022B for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 26 Apr 2017 14:39:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=uyJKwqgIQXS2rQ1kSDDh29+GMKuIFunnRxYnFa4e83s=; b=ck5zC+gbJrsQbE 6Gui4eECSe+KuQs/hxDXXBDP1a/AXUa4MhHX+pmqA9XM+kz3Rbxb5nZ2rAYBY6z6XIyDmMcWqmY1H yHlI5bsJpm6A/PHCkv6QAU7pXchzpAk0YJ/sC2sR0YR0ht5eSX63t7WrAD0rLSH2W9jAhuLoKHU/j qXahl5KxPdM/mK6d9S0zo71DRTiFOCMxtLnyRxVSHDg5v8adv7OsxzA1m3ktin8nrX+wU7zBRpf3q sfEHBx+PN02kmwq/zKwui32EuIJOXcN2buOGpspVpj8mlQHpqBW5svCJERA7Ar7TP3bnu41CordkY JmbJxBRE1CtpYbet8kbQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d3O6I-0004xv-9C; Wed, 26 Apr 2017 14:39:26 +0000 Received: from mail-sn1nam02on0080.outbound.protection.outlook.com ([104.47.36.80] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d3O6E-0004up-NC for linux-arm-kernel@lists.infradead.org; Wed, 26 Apr 2017 14:39:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kqyu7q9R9at6j9ndCZXkx4HQgMPV/YniHC5lMTUzDyE=; b=FwjrH1IFHoIRfdTTLqazFFEOezw/3wrG/UNHBZcY9c6xB+7LLbl9m+nL02LM3CQvkPuysEKml8z/8Mup10/beSc9pVyC53GnEJlNXAsJSNu+y0xisMc6LJP9LTb6YOE1HbCMpMT9Fy+izUeGOvpIlu/GDaKTrq9Ph2D0Hkeh4/k= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=none action=none header.from=cavium.com; Received: from rric.localdomain (92.229.94.4) by BY2PR07MB2343.namprd07.prod.outlook.com (10.166.114.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1061.12; Wed, 26 Apr 2017 14:38:57 +0000 From: Robert Richter <rrichter@cavium.com> To: Will Deacon <will.deacon@arm.com>, Joerg Roedel <joro@8bytes.org> Subject: [PATCH] iommu: Print a message with the default domain type created Date: Wed, 26 Apr 2017 16:38:13 +0200 Message-Id: <20170426143813.21225-1-rrichter@cavium.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-Originating-IP: [92.229.94.4] X-ClientProxiedBy: HE1PR0402CA0005.eurprd04.prod.outlook.com (10.175.27.15) To BY2PR07MB2343.namprd07.prod.outlook.com (10.166.114.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5a8d7274-0b2a-42f6-0ac7-08d48cb1fa03 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY2PR07MB2343; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2343; 3:c7iUb6C+/xLCP5PGRWe+4gWj1kueChtkrUGAtozdFNdCDK6OpyQP7HipVU+YPU5uVhAC1Vgg45H4G/v+4VGISXFW4evcdpRfqdEtNNUk6W3nx3bsO3aSQmuXcvxUAz+bkoFjNx1gTnXWTsE+fPSiIvL6lErpXVyEouX6yOixwZ2gB8dyhhwT+GnlgkQ7HyFZjM/Ihrzo82K8/YOxX2U1b4K3DvSKcwEV5G0f4ns9MvqykgiQsYnZdFbRE4F2qtoCwZQUTojt4wLsKKjte4fp2g7H78nm9Pk8CGTqRXRdWxJevL2BLdHW+qmjdBva+k365fJtqJWvlR1p0hnjwGA2wQ==; 25:ukCNkHk80a/Yzgj9f7lvVw7+GOSmxXyMcB0SkbnJqncJhVL87YXPvQBzqwRafaMPYVaQJXj7gvjg/Nn9mlDodSUiX5+Hgr7X/Zf30NT1ex84+VYIVKuOc+cuVQaYM/jwoQQ2q1mF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8w+Xhayic9BiGCW5aNNNlPHX10PqGQaPgQnnPivUJdKOcE+Ltk3y5 X-Microsoft-Antispam-PRVS: <BY2PR07MB2343C0B1F8AECB0D3B9C9389F1110@BY2PR07MB2343.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123562025)(20161123555025)(6072148); SRVR:BY2PR07MB2343; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB2343; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2343; 4:bQVzzExNxRsLmlfmGnD6MJzHPoPu2+xmnMCVH4SY27s9WdVh3ZF0PqRUCL0XaS84vifWhD9fYaXnK+JbigYNWFZJeNxVehpQCk3gman2oK2nsWiXKQEiS83D79X2H2Fj5TMOgSClQDqxIyiWAdKgrfyH0bpHkxM/sHuNS9gazrjls2oJY2ARdF2VGaNuVcj9+F8wIIU46dSA7639PjwEj37EINnvSs6HXUmxWo/X2bOulM+9IK0jmTSvV+Kk73gzj8WBfZnhciwEBNsB75jVUqr8yG0LYrUj+ot+ptP9g/rCoFzQKPvCyPMaO12pJrXcDfb36zqMeNgwzrnBpKug17HgAZQkwpBnZKq1E1Z0ZzRf0VZW9Mp7CickrNv85dWTsM8g1Z41/KWIC1338H59iJlV5Ks1WzIL1JW1SN0wk7RMqveqlNLOmqJZZIPoR1DLKrLfj5nYkLN1zZ/DSNIYs3xlfbw4MPSq7oePyV8mv7U+zvep5hIMX7f/SQyJWx6WK7a2D73YJi9nE9fRVLA8eOOYj4ctAr5rW4CN+uP3+iMTPz/w1RR1Mkwd1Boi0HuDc4ltQifFQCY3f/vXVmCHgrJ+BPAPQPij4B1lU3Kn2EtJ+sWUZGUVIlkObH0rrlQq3iA58tkLukeu3rbGppacMaeZhcCfKqQaVyc/3Ez0+l4psUHDsIyMuEX5mLvIVyYyNXYip86nTybNWwn+Qog3HvxxNbjPJxXwmnhMoZ1HedYID4mRhWY518pWc260Ef6B01IwaCZ6trfEWvP1SzU+DaYZljGYmHq2YtFlwx2P16Y= X-Forefront-PRVS: 0289B6431E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39850400002)(39410400002)(39400400002)(39840400002)(50226002)(15650500001)(5660300001)(48376002)(5003940100001)(36756003)(6666003)(6486002)(6512007)(53936002)(6506006)(8676002)(81166006)(38730400002)(1076002)(305945005)(6116002)(47776003)(33646002)(66066001)(50986999)(7736002)(2906002)(189998001)(50466002)(25786009)(42186005)(3846002)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB2343; H:rric.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2343; 23:309p4J791TAcEuVwv8n7UzK2Yw7asMK8Jc8sfYlCgJh40jhWCLGoE+iCaUfVgdwMRm/hKsIxpIsa64Phx5iQ+Sl6GfVKf4eaWuyz3ckBSg/YY8AJ6W6lVb2bpvnywGsuwsUb0cYZ1fC220RKKGZmblfMWIlnSGAc9P4t1E7ML33cHCIBwoDLQ+PpHak9FjhyvEtjQDN5XuYKGbJYC6DT86ob/eSSo4B/nXDzeGzdHktWK/5ruy0Grf8vyRLLe0DQpMAspS/RFPpPVSgk/cV7/AQRbOzFpaUOCSzL741p0k3064KwbBxN8qJfVNDxCHZadMCz39PtL0qegkRjqX7HIXRFTOPKTaMnJc6nzQhElwHmaTdREBhi/InPMC6zmrWpBeGxTN7+F8/FQOotg/ZhhnaoLy/Accp8cqQGzmKayhu6cTgJhx9ynzMYAKn9fpiAqHANwZpRkSXI7/rJe+ZVgKzIqhulF4/WjaOJuPsPGz3GU1wWT1bZqu3qP4t36INYUOH0MycVZZJmKSJUotY4ScuIMZVh0pJpvOcoVWe6QG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f68N/O9NCxaK10aIXW4OB1SAeiXhcAkv65Ir8KHDPnSZ8Vdw9auQ==; 24:BT9tf5i3I4UUbz+YyOJD/m/buG5KvNxV3jhU3oFsFKCrD5/pnOTpLUiPCowGIH6vrpoX+J8ZfmXa1CZpvbSO+b3PNOy7mVOU4FozoHK71rw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2343; 7:J3C1wmzXQD/uNcgdZa5uZZQPszEBspzDJQBNW57ygBJMBhk2aw/67IwaxAUd/S79LSOdfOtun2xl81Psdp1tuucSOsiOVsA3uc6LNfTm+b1sgfZt2RBMmAXgRd3wqFFVudeZ+a/PiQJMhNCWJSX0bKEagAXlWnMLHI8Cqh7Djk1px0G4karE052XgQrIvgxY8bsbpYO9ajKorOGo4sTurKp9eVQY0d4Y6u9gYQnzQDS9wdIXb6mllWgOTnjgh6tj12FMUVGPigcfdh4AeBE0ihdNqID1hLBYt8SvrYGPwgXq7hRsZE5TfRIEczb+78xHmonhLTB4AKlQxGXE/FfOKA== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2017 14:38:57.8935 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2343 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170426_073922_867337_42A2CA62 X-CRM114-Status: UNSURE ( 7.37 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Robert Richter <rrichter@cavium.com>, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Hi Robert, On Wed, Apr 26, 2017 at 04:38:13PM +0200, Robert Richter wrote: > - pr_info("Adding device %s to group %d\n", dev_name(dev), group->id); > + pr_info("Adding device %s to group %d, default domain type %d\n", > + dev_name(dev), group->id, > + group->default_domain ? group->default_domain->type : -1); Printing just a number is not very user-friendly. We have only two default domain-types right now, so it is sufficient to just print additional information if a device is identity-mapped. Something like "Adding device %s to group %d - using identity mapping" Regards, Joerg
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 3b67144dead2..ae84899dabd2 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -586,7 +586,9 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev) trace_add_device_to_group(group->id, dev); - pr_info("Adding device %s to group %d\n", dev_name(dev), group->id); + pr_info("Adding device %s to group %d, default domain type %d\n", + dev_name(dev), group->id, + group->default_domain ? group->default_domain->type : -1); return 0;
There are several ways the bypass mode can be enabled. With commit fccb4e3b8ab0 iommu: Allow default domain type to be set on the kernel command line there is the option to switch into bypass mode. And, depending on devicetree options, bypass mode can be also enabled. This makes it hard to determine if direct mapping is enabled. Print message with the default domain type case. Signed-off-by: Robert Richter <rrichter@cavium.com> --- drivers/iommu/iommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)