From patchwork Tue Oct 25 16:54:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 13019564 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5BA0AC38A2D for ; Tue, 25 Oct 2022 16:56:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+gjQiNFCS/k+R+SoQdaz5sWs6Bxf4u57Q3C5uRYzJ4s=; b=RJv3Son7ER8evR MjPjJEl9/Ug79dBrC2FEFC3B77S4nmIOiJWBQbZHbf73sc8Yv+UiYj7YUhayEZ0WGCBSEVc3y3ZFZ LXRDPfrYxpEL0OY3nE2STRt2/0jvfVJCYSsxQnQvmnK31k3pr2ysEaCSfgX2z/gwzzVnec3y5BP70 Oa4xEWen6aCu0aujzopb232Il+DxwBEpLuGZD6gSVE88RW1yOlnF2wbE0W2qAEnY3JIHYQLgz9LNN Dde2bn3plspYLG/e3aj2xQH+HrqAZWV/Fb/ud+sxq+eGYhBttKMUuvGIzTqzLxlyL7BPcsCGeXDg+ cmCyTuBbbFFD3iyyfmfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onNCl-006M9n-8U; Tue, 25 Oct 2022 16:55:07 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onNCJ-006Lzp-8u for linux-arm-kernel@lists.infradead.org; Tue, 25 Oct 2022 16:54:40 +0000 Received: by mail-wr1-x42d.google.com with SMTP id y16so11693539wrt.12 for ; Tue, 25 Oct 2022 09:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=d/ULxq2EdVWZOhwK21JX/tvDkCGf2dqu3n7qEL+lTOY=; b=gWB9UysqAbqOPf2utGCOJH9LJdHOTVvaB5IzqXJ++K/yLuCOmVzCGmTWOlhFwGnNZ0 /1dY+xVgUo+QcHKWnYnpR5lT0jOKo+LhbGfj7zACigig7IiRakyNWEOebPeyBRg9NfRa gFWh5ww9Y0Jc+XhTLLpQqIOM21QcG72QsPGe+gi5I9OSY0fVe2rKCalR6BMzhJwfZ91Q Zgmp9N7XliVwx3Ml6S9CO1NA9AbKpCiYuL+qAWLMxnMXHUnEb69TTsEaOEJ0njKBXIrq NtiigBcNGVlOe3WJ7lJgbHvYDnRr3BeFTzYElFREinnm+LCJ0/Resp8Sv5GGG8mgsqVG ANjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d/ULxq2EdVWZOhwK21JX/tvDkCGf2dqu3n7qEL+lTOY=; b=J5t9Wqbrw0HODPlbX4BJStyOjcGPvq9Lioi/sXn9ttf1V9hIpQQAz+WAqYupA19Vsc WwbkKuu1RV58eydEsMIhkmA3NMjfgVWNRx2zdE/FyTfC5yRCOCaTBi8llIazyEKkiqqL jfJaiio8PMvV2h0GaOmI93x3AxK7lE6dcgLZ7mAFKKaPwxGaWdzUdcwexbkIPv7V3mYn w2DdDXKVjD2Knyt+/AsK9hp8nFKB3OddNi5H2zT2VA89FPUdmUHOitK4+b6Mu9WUirkq raXc3cojB/zbfy4nLgnzJfnLVVGuXMAmQaxbDl+CapnSja9/4/axJPrWzl+pGCSBPsZw ABRw== X-Gm-Message-State: ACrzQf3PBTMAnqhNRco2GL4emrXwZ5a55X0iNQogZBtpE4cnEVW8R1Ef 0UrD4SsDDacvbw1hsE4wey8= X-Google-Smtp-Source: AMsMyM4V89EQvtcJaplOO/9x329iSAUjR7qxmdGlVdpsRjAzRPe8F7TxA5tDAipFjnBHO1jzESd3aA== X-Received: by 2002:a05:6000:1c0a:b0:22e:5d8a:c903 with SMTP id ba10-20020a0560001c0a00b0022e5d8ac903mr25013588wrb.182.1666716878012; Tue, 25 Oct 2022 09:54:38 -0700 (PDT) Received: from kista.localdomain (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id a20-20020a05600c349400b003a6a3595edasm3023989wmq.27.2022.10.25.09.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 09:54:37 -0700 (PDT) From: Jernej Skrabec To: maxime@cerno.tech, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com Cc: wens@csie.org, samuel@sholland.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH v2 4/5] iommu/sun50i: Fix flush size Date: Tue, 25 Oct 2022 18:54:14 +0200 Message-Id: <20221025165415.307591-5-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221025165415.307591-1-jernej.skrabec@gmail.com> References: <20221025165415.307591-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_095439_336239_31ED9BDA X-CRM114-Status: GOOD ( 11.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Function sun50i_table_flush() takes number of entries as an argument, not number of bytes. Fix that mistake in sun50i_dte_get_page_table(). Fixes: 4100b8c229b3 ("iommu: Add Allwinner H6 IOMMU driver") Signed-off-by: Jernej Skrabec --- drivers/iommu/sun50i-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index df871af04bcb..e62e245060ac 100644 --- a/drivers/iommu/sun50i-iommu.c +++ b/drivers/iommu/sun50i-iommu.c @@ -512,7 +512,7 @@ static u32 *sun50i_dte_get_page_table(struct sun50i_iommu_domain *sun50i_domain, sun50i_iommu_free_page_table(iommu, drop_pt); } - sun50i_table_flush(sun50i_domain, page_table, PT_SIZE); + sun50i_table_flush(sun50i_domain, page_table, NUM_PT_ENTRIES); sun50i_table_flush(sun50i_domain, dte_addr, 1); return page_table;