From patchwork Tue Sep 6 09:55:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Singh X-Patchwork-Id: 12968231 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54C0EC54EE9 for ; Tue, 6 Sep 2022 21:50:32 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.400389.642099 (Exim 4.92) (envelope-from ) id 1oVgSe-0002Oo-LH; Tue, 06 Sep 2022 21:50:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 400389.642099; Tue, 06 Sep 2022 21:50:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oVgSe-0002Oc-HX; Tue, 06 Sep 2022 21:50:24 +0000 Received: by outflank-mailman (input) for mailman id 400389; Tue, 06 Sep 2022 21:50:23 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oVgIM-0000Cs-Gl for xen-devel@lists.xenproject.org; Tue, 06 Sep 2022 21:39:46 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 68ef33a5-2dca-11ed-af93-0125da4c0113; Tue, 06 Sep 2022 11:58:08 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1BE18D6E; Tue, 6 Sep 2022 02:58:16 -0700 (PDT) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D16E93F534; Tue, 6 Sep 2022 02:58:08 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 68ef33a5-2dca-11ed-af93-0125da4c0113 From: Rahul Singh To: xen-devel@lists.xenproject.org Cc: Zenghui Yu , Bertrand Marquis , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Will Deacon Subject: [PATCH v4 01/10] xen/arm: smmuv3: Fix l1 stream table size in the error message Date: Tue, 6 Sep 2022 10:55:48 +0100 Message-Id: <19503760e0f4ac61d11b4f381050dd1f436010c0.1662455798.git.rahul.singh@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 From: Zenghui Yu Backport Linux commit dc898eb84b25. This is the clean backport without any changes. The actual size of level-1 stream table is l1size. This looks like an oversight on commit d2e88e7c081ef ("iommu/arm-smmu: Fix LOG2SIZE setting for 2-level stream tables") which forgot to update the @size in error message as well. As memory allocation failure is already bad enough, nothing worse would happen. But let's be careful. Signed-off-by: Zenghui Yu Link: https://lore.kernel.org/r/20200826141758.341-1-yuzenghui@huawei.com Signed-off-by: Will Deacon Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dc898eb84b25 Signed-off-by: Rahul Singh Acked-by: Stefano Stabellini --- Changes in v4: - Move Stefano Acked-by after Signed-off Changes in v3: - Added Stefano Acked-by Changes in v2: - fix commit msg --- xen/drivers/passthrough/arm/smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthrough/arm/smmu-v3.c index f2562acc38..340609264d 100644 --- a/xen/drivers/passthrough/arm/smmu-v3.c +++ b/xen/drivers/passthrough/arm/smmu-v3.c @@ -2348,7 +2348,7 @@ static int arm_smmu_init_strtab_2lvl(struct arm_smmu_device *smmu) if (!strtab) { dev_err(smmu->dev, "failed to allocate l1 stream table (%u bytes)\n", - size); + l1size); return -ENOMEM; } cfg->strtab = strtab;