From patchwork Thu Mar 30 13:17:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2838 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1558641F1E for ; Thu, 30 Mar 2023 15:19:36 +0200 (CEST) Received: by mail-pj1-f69.google.com with SMTP id nm11-20020a17090b19cb00b0023d0c90d851sf5889008pjb.1 for ; Thu, 30 Mar 2023 06:19:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680182374; cv=pass; d=google.com; s=arc-20160816; b=k5aOm/g17Oos4C4nNavSqWeLBPRLCbuZCHzG/C0W3dqf/bGZCW00yQwB2czkAK3bnX 2z7ateHAnPVxyjReqG79a1oyOnhWwSaroKmv85ZEeZ2GvQn34BnVNgYiANpUifH1om0z /SN+TSEYVbD3JF7BfRl8OBDVUGouEtDW7B2++exn1DQNes1e43FfLqGd11wvFZlsJYke PKzT+xYFHIAXhMFF2GZqKR2iVBW1BqKtO+CK/MS4OPc6Ps2dyKXKrVly5FqmaH51MzU+ 8GqCN2Sxloeo8ZoE2OQXMobfevBR0JwFBJ1pi/bkLTCgPbKNn2rKh1P7omLIx5Sds/06 ckdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=vEnOw1VZ5CE1U0zOGHaZPQZCR9rcbWALanzA4uGTnpM=; b=mIO8sswpA7HmSSkV140zAIXvqc8CHToOCzqWdEPKs5PXO1iQig6e9pYLMtC/s+ILj7 Wf2fLmKGWX3d3NIya999Z9fqPutaD/JVIWOt5+Ee8kQCeg9EQuRU4U43fFxDh9vdnP2v D8VQ8Tdxci8eBfKkQHJ13nXGMv6isb5GWqNMsQ8FRsVs4NsTVbhErM0+vmqJZBUOvJqd NCNBcVW89Crn9Uh9WaIUYL09y0jUW7wWNs21g8YhqCEKdWrZpVQEzrnYOxEuaSj2nMSI mvFNrJMl4mDQ5fq8hL25M8+uHqwDZxLR8QNtZtJ2Lb8ALfwlbNXXtF30lENtBAFzxpJX eh/Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pPb+W1Qg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1680182374; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=vEnOw1VZ5CE1U0zOGHaZPQZCR9rcbWALanzA4uGTnpM=; b=cJQcWboz8BkAbquNMNWhWWOaMto5K0SSKyKRKtuso380xNouO8OA2C2BFFn8GoWWMH Ui56LoYYJ26ioy7ajCnYtjBHOJRCLF9+18NJ85S10nWEmfDnDD8gyE2mHttQt5hHxU6D Xz35JPmll83CCec6E2ZjOcLJtKBI85GErN4aQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680182374; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vEnOw1VZ5CE1U0zOGHaZPQZCR9rcbWALanzA4uGTnpM=; b=AwCUf+REafXBOQeuBcYImdjAoVAvhVZWGloy3Dr8jgO5ESq9XWk1qRn0gC0hZiAh6l PYwmit/3J1bO6wMh/8WNiMxMlunRz1HhU0B6uDyAWEpj0UGbQ2K847zpMmUg+n/jrosC utAdZk4mX8QJiub635pjgXVQRdt9xAeaDqV1Q+RTK6w3E4E/3s8elAPqxj6gg+fzlW3h vBiTo0jV/0OxclF60lMEaIpyryUJmLALrtLp6Xoj2Otq1/jbi0F53NAFNabboTLMIk/b DBYeTMu8xwjDI8YKW92Dkj0bzuao7X88S6eslmVWnQfhBG6ZiE/2FSq4DBuIk/Q9o03A xgCw== X-Gm-Message-State: AAQBX9fCnV0eNmVxNU3TLaJTrkorPXGMBfH4TyahZiuhU8rRjbMUOnoy E8ABjcvi5Bk9aMOSof3hIx3yGhAV X-Google-Smtp-Source: AKy350aYicyAEb0Yv31K+2iY2mgP/S2PXtpBr2j6j1DXknj8656eaNY6L0QV7DYuXDPoNldLmLUwKQ== X-Received: by 2002:a17:902:a517:b0:1a2:73b3:b398 with SMTP id s23-20020a170902a51700b001a273b3b398mr2046461plq.6.1680182374442; Thu, 30 Mar 2023 06:19:34 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8481:b0:196:751e:4f6e with SMTP id c1-20020a170902848100b00196751e4f6els1899563plo.10.-pod-prod-gmail; Thu, 30 Mar 2023 06:19:33 -0700 (PDT) X-Received: by 2002:a17:90a:31c:b0:23f:870c:83a6 with SMTP id 28-20020a17090a031c00b0023f870c83a6mr27230496pje.0.1680182373238; Thu, 30 Mar 2023 06:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680182373; cv=none; d=google.com; s=arc-20160816; b=NC+OJP30SHPrVOt3gZdnAhb1KoKZIZ1dRrTanXpluFbNM8H4gUPEX3mXAGyDT0oeti ERXrvUpeDyjYPSVbU3iD1iI/e9UzfmWqP8Gwz4wRK6sMTgNFdW5SH+p5ViZlgM2iwH3w ZazbgIexiJ5MYljqq5FBHDHEQel0FTZVIuBJNMU6L2CRaSrIbo606kLigGutx40V87+a duZ6M27pBfQKuMZG5ut22OjrtNjmIt3hmEcyLLd64Vp8+yxI/rTYOS7TRfPK9XMe4U3J O4i9oMV6/IIpr1M78fPKEQw94S7vxF+m+rrJhyzVU/HsHbrfZXGm3sgIJgQF4vJqoZnd R+8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=S6l/tdN4cMocc6YNsFbnVaBOI5uqYV8apPR4ELkkR1Q=; b=ZsCbcY1oZrZehWNkS/m4oGoXyzFqYdFMFE9sSbAaRAzDW52SknAaQ/MrkG9MQ2aLZt SuUYO8cY9zoxek4PT8S4i9RvDkFSv2IvRST/STiA1jWJFJI8c0sPzpi6S2WQI607aSzQ 6cRZU4GgWG6ppZi7YKZJaaghGWJa/ZD39bmU5xraFaC47Tl7hEOVuDQ2MVWdExWOKFpr nxopMSVE2EVS5PzU8WzFalzELIRtJL8Ev3U3eUYcxQX9BYGvPH2zprljjN/37fC+MMLD hCpnt7Ccf2Vr4rO6+wqNg9joxY2xsxbxb/4/VsGuyRZbD/0WnzedSPPTKK6wUemttWDe dQ/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pPb+W1Qg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id jw14-20020a170903278e00b0019aa8c58b4fsor7351850plb.27.2023.03.30.06.19.32 for (Google Transport Security); Thu, 30 Mar 2023 06:19:32 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:6a20:ce22:b0:d9:8b07:eb0a with SMTP id ic34-20020a056a20ce2200b000d98b07eb0amr22599282pzb.24.1680182372424; Thu, 30 Mar 2023 06:19:32 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:8bc3:c2fc:8dab:d912]) by smtp.gmail.com with ESMTPSA id e15-20020a62aa0f000000b006259e883ee9sm22473622pff.189.2023.03.30.06.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 06:19:31 -0700 (PDT) From: Jagan Teki To: Heiko Stuebner , Joerg Roedel , Will Deacon , Robin Murphy , Rob Herring , Krzysztof Kozlowski Cc: iommu@lists.linux.dev, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-amarula , Jagan Teki Subject: [PATCH 1/3] dt-bindings: iommu: rockchip: Add rockchip, disable-device-link-resume Date: Thu, 30 Mar 2023 18:47:44 +0530 Message-Id: <20230330131746.1475514-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pPb+W1Qg; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Rockchip iommu is trying to enable the associated device at runtime resume however some devices might enable the iommu during their pm runtime resume operation which indeed leads iommu to use the wrong domain and this leads to device iommu page fault. Add rockchip,disable-device-link-resume flag and give an option for those devices to disable the device link during Rockchip iommu pm runtime operation. This makes the device enablement for that iommu domain ignored during the rk_iommu_resume call as it assumes it handled iommu device attachment in the associated device itself. Document rockchip,disable-device-link-resume flag. Signed-off-by: Jagan Teki --- .../devicetree/bindings/iommu/rockchip,iommu.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml index ba9124f721f1..ac8b03806cb3 100644 --- a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml +++ b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml @@ -58,6 +58,15 @@ properties: Some mmu instances may produce unexpected results when the reset operation is used. + rockchip,disable-device-link-resume: + $ref: /schemas/types.yaml#/definitions/flag + description: | + Do not link the device during runtime resume operation. + Some devices might enable the iommu during their pm runtime + resume operation, so disable the device link for those devices + otherwise iommu use the wrong domain and that leads to device + iommu page fault. + required: - compatible - reg