Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2503211pxb; Tue, 24 Aug 2021 00:12:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpbyDE+chygk2sc8i5QnNSt7HYynnzgjXC9a1K8pZeznbkU5i2QoW4h8Mqru9dWsU6+NBd X-Received: by 2002:a17:906:a14b:: with SMTP id bu11mr39825536ejb.260.1629789140605; Tue, 24 Aug 2021 00:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629789140; cv=none; d=google.com; s=arc-20160816; b=AIoEbIVjH4BdQwUVz6fPlaCIj1DFzcWG1/iW5YsR1Beqho1y34YOxAvfaXO1m9QmNj 7tcL8BBoYy/snuuxj3Ig0yslK9THGsth/Zqc3kJ8ZgHDkdiCplb+O4G0/M5htqFC4/U7 7L67cSu6BCUo6w1hGoXJ7R81hCVsu/XrJjhkIYKF8nMI2mRWVAjc4lEWnez0aRLGgYSV iIjJmLZokq25cdYyH8uxmOIfqlqa0qd52sIVc9jstLsbZd38Vd+qXDE1yf7fxF/YgvcS ZvJ8SiUxJxMCebWm3XpqQ/QIzPs5/A8fH5Xv5kH8FzKQT+bdunboUd1Grhba2+e/ZRnH XHfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=LgRucL3K4cUFafkmcwegDWstDciTynvkAhKij7AEIBk=; b=VUBUBTT1BfsMGlbwZoEF/oplmob8r9w0m2m+IqV180uTIiYvc8D21idspkWvSn6xJN NtODpxFihetKXQ60LLX9AfRfZY57SCsAEFiNyjyt+ugf0Fha/+GIWe+QsS+DgooBIe/t sdwzAgQ5VS6BXx+59f9zXrOsGXvVAHSx3RkhOCYK3XPvsOnMkgX44WgUs49f7rUbJ8DN EmAYAwYFmkXd57loAyufiuEX77LL8OsrQZ/dXcUOtMjruj6KcEi4X3fo+XLiGn4r+g6p rDfGH7ejpa30XVqBAyBp3JyZqR6HsHtIndkvxBSHDOneq4U5XOTBxYDORMhasj3t0q5X ncyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XjwCcBqT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 10si16768766ejw.91.2021.08.24.00.11.57; Tue, 24 Aug 2021 00:12:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XjwCcBqT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231332AbhHXHLX (ORCPT + 99 others); Tue, 24 Aug 2021 03:11:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbhHXHLX (ORCPT ); Tue, 24 Aug 2021 03:11:23 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A04BC061575 for ; Tue, 24 Aug 2021 00:10:39 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id f6so17542393iox.0 for ; Tue, 24 Aug 2021 00:10:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LgRucL3K4cUFafkmcwegDWstDciTynvkAhKij7AEIBk=; b=XjwCcBqTjO8zbpgRAvkXX4cEK21t+nleXjTkL4VzdxxdLsNvjwNcndFWSg6JlrSwJq bpSdGFO+BrTrAT8Vmftfwj9hkT+k9VzKKyZauDR/U1vyuv5aWPiz/wR4BLCxKVgR0+Ar HAtZRuWjONau0qmolRjDQ0es97dtHpDqC2jDM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LgRucL3K4cUFafkmcwegDWstDciTynvkAhKij7AEIBk=; b=t6w3p9zA1H9gEF1BYCDKeJvYhlJGfVUbirLWLj+zgeSu9t9USvpBCSVY5pU68r3oZ3 8yE+osUsyPpTBjiNTlPhmIPdx4kyTlMpRb8+mrEcN8iOLGmNMRC8lh3HDtEgcvjWQvlz xLruV+ZHj+tPEId6qOXca6QE2DQV6piWAGqq9LtZJz80XYyJa5mVDbLNZk0SfGzHKxUE uPDdJoPd2qhgYCvDf0YWb+1BBHRCwOj8rREO8IRatI+FwWZHXz+GQ5F5Vt7TiwTOFABC 7F7AQIiNfY5ThBoeOt+d50XgRnwC7GZMMMD9GPfJISaoFqATemwW4VPz37fNgQM2xKg0 GfLg== X-Gm-Message-State: AOAM53185ro6fYiyqys395GR/jrI/Tv+MLzLaVXZN6G4Xxu+64SuCiUC VOnWQFb0cTZAKezGgHvBO4WHaC6HemXhj+645Ri5RA== X-Received: by 2002:a05:6602:341:: with SMTP id w1mr29896459iou.40.1629789038867; Tue, 24 Aug 2021 00:10:38 -0700 (PDT) MIME-Version: 1.0 References: <20210813065324.29220-1-yong.wu@mediatek.com> <20210813065324.29220-12-yong.wu@mediatek.com> In-Reply-To: <20210813065324.29220-12-yong.wu@mediatek.com> From: Hsin-Yi Wang Date: Tue, 24 Aug 2021 15:10:12 +0800 Message-ID: Subject: Re: [PATCH v2 11/29] iommu/mediatek: Always pm_runtime_get while tlb flush To: Yong Wu Cc: Joerg Roedel , Rob Herring , Matthias Brugger , Will Deacon , Robin Murphy , Krzysztof Kozlowski , Evan Green , Tomasz Figa , Tomasz Figa , "moderated list:ARM/Mediatek SoC support" , srv_heupstream@mediatek.com, Devicetree List , lkml , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , iommu@lists.linux-foundation.org, youlin.pei@mediatek.com, Nicolas Boichat , anan.sun@mediatek.com, chao.hao@mediatek.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 13, 2021 at 2:57 PM Yong Wu wrote: > > Prepare for 2 HWs that sharing pgtable in different power-domains. > > The previous SoC don't have PM. Only mt8192 has power-domain, > and it is display's power-domain which nearly always is enabled. > > When there are 2 M4U HWs, it may has problem. > In this function, we get the pm_status via the m4u dev, but it don't > reflect the real power-domain status of the HW since there may be other > HW also use that power-domain. > > Currently we could not get the real power-domain status, thus always > pm_runtime_get here. > > Prepare for mt8195, thus, no need fix tags here. > > This patch may drop the performance, we expect the user could > pm_runtime_get_sync before dma_alloc_attrs which need tlb ops. Can you check if there are existing users that need to add this change? > > Signed-off-by: Yong Wu > ---