From patchwork Sun Mar 7 20:47:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Horia Geanta X-Patchwork-Id: 12121097 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27D09C433DB for ; Sun, 7 Mar 2021 20:55:44 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E39664F65 for ; Sun, 7 Mar 2021 20:55:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E39664F65 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=LF4DN8J50rnHGFUDPkSwjDHLQU4ATKFiATrnzRhLo/Q=; b=A3v076eAmPcLt6PtRU8fok1qN RA9Y7JOfcvjM7DDRc7z9zDouc9eS8qGicywhfNkRSlGqhsosh9Y85FyrQby/D6flj4lINXCdKUuf9 jF+VksTDcDYkPeacdd4D8O2eI/IQoAq5DBrNmWjyc68EXHbNVn+r7FpYD65xvqVwbo/T4uAW6Ara7 erLCXWDlXiKIYWPW4yUVHmp55kGpDQfiNOE0wszX+xvQ68ScPwV81xwYc1dLYnkhTpb2/hCgcRXku 90ZRX13sxFVXFZxDSFC+aDII5JXyJ+Imdw8P9Gclr+YB2Ak22jR1iq2DT57oUqyyZzk6CFrX0BZZp i7h94OnpA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJ0PS-00CS6q-1x; Sun, 07 Mar 2021 20:53:54 +0000 Received: from mail-db8eur05on2088.outbound.protection.outlook.com ([40.107.20.88] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJ0PH-00CS29-Dx for linux-arm-kernel@lists.infradead.org; Sun, 07 Mar 2021 20:53:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QdHz9rOwTZN3zT9ZxcfC2KyOJMZMLBpSLNjIV8fcMqhoJ3rukSHyT2PWYfmj9mLEIcsl9SQM9jBrz6B/xFGUAfT1AZ+JFCLeSXx4gZ6gildSCpyAKctleA1w/bkG9aBS3JSuu4aoMwb4fEd9CS4FtEv4wrN2kU7vOMAnU3UFkvGL3kE+vzCdJP7FJVUeY4uIRftn9WwG1Ih1OdhvsQ7pOUu3vWwDcmDKxGSfvwrObZoVqtWeqlAZ/DpkRW4YOwsy/94kadsnwezodLkRqdIoD27ztHV5v/3qjkA45XQPEn61TGH/2nBG7KkgVUJUVZiZPbtbmJw790jmHJOtq/DqXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GUbfoWdyg2tVEY/bafEWr3tP1IKX3l+AnFEoCk8R+n4=; b=C93WjnI4H3vFVmfpwA7yErp7nBZBJW2sIsvaV1LKWVCmPxJgcPftWr/4hdUipmAQ15+tNle5ObPQj9iGwd9e5zbWSGzpUbQGj7PtUKMBr2f2ho7z64sWDqOIfoqouqePujaVrTpkdUujSGFWP9EP+f+yBA+2bPqC5YK9NRclMV7h+poCtcta4D3YvXg1AZzby1x4A+TMg7Grd5n6JA9Dqi955JzWratxNxA8CrxhAFcHz7vTL/fdEg8W1/VPl8zkP7zr3SY7CcRZpf3y3VrIdRp9EcF0VIV/40ggWgFk33grCchpCtSluoTxW/KYMApNZrbuXFjy+pAM8w9UWv4e4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GUbfoWdyg2tVEY/bafEWr3tP1IKX3l+AnFEoCk8R+n4=; b=IssOA8z0PUfoB8IWZtbiFl6iHTsL8ATQ8vXmIFQjrSSK5o1Au3Gn1/REn+YDdeOrLp5KVKt1HNcxghaExsF+6mv7LNhAgzqwR02pKhtqkBXwsVHYFL9dbqjLOrOmDaeW3aK0GTj3ceHIcTkq0Pj0EhqybQYHbOC4Ts/1XS3FvSg= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB4046.eurprd04.prod.outlook.com (2603:10a6:803:4d::29) by VI1PR0402MB3792.eurprd04.prod.outlook.com (2603:10a6:803:20::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.23; Sun, 7 Mar 2021 20:53:36 +0000 Received: from VI1PR04MB4046.eurprd04.prod.outlook.com ([fe80::29a6:a7ec:c1d:47ba]) by VI1PR04MB4046.eurprd04.prod.outlook.com ([fe80::29a6:a7ec:c1d:47ba%5]) with mapi id 15.20.3912.026; Sun, 7 Mar 2021 20:53:36 +0000 From: =?utf-8?q?Horia_Geant=C4=83?= To: Shawn Guo , Li Yang , Rob Herring Cc: Greg Ungerer , Sascha Hauer , Robin Murphy , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] arm64: dts: ls1046a: mark crypto engine dma coherent Date: Sun, 7 Mar 2021 22:47:35 +0200 Message-Id: <20210307204737.12063-2-horia.geanta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210307204737.12063-1-horia.geanta@nxp.com> References: <20210307204737.12063-1-horia.geanta@nxp.com> X-Originating-IP: [83.217.231.2] X-ClientProxiedBy: FR2P281CA0016.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a::26) To VI1PR04MB4046.eurprd04.prod.outlook.com (2603:10a6:803:4d::29) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv15138.swis.ro-buh01.nxp.com (83.217.231.2) by FR2P281CA0016.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.16 via Frontend Transport; Sun, 7 Mar 2021 20:53:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6eba5fd1-3f80-4eb7-a59b-08d8e1ab13c9 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3792: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:49; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qT1Sw9HpDVB6bgpJa90EMJgDZaSCmiXEyujLt53cBqcS6YwYONm9aVW13MpuM/O1wN7O/VzT+kj6OdQ2yp370jSuhnIMgbRGKwJEqS6j99jwXXOf7tG/PoxGvLQ+wxPkftTMqipkCemig5SWmxfdjEjFlyJnwF5PE9xH+yl9d9Y3eADIt9uPsrCsGL8F+OH6Qr6XzMIM3VmfGzH+vX96u26NJoko6vTXFFi6pEI+muwmVC2zuT3Dj5ElmQ/g3FGzAb3OOuWLP4FStZDQDnro5Y8H+NyqnJp2pJKy3UR7JgIlMUogCvCoYCh0TAHGfew1v+/CvyYcPOzvEdxkuYlwf4KNddMhozPYSPDPTFNFKF6Kw070xtJh/fo2yN+yTdXeKvp99FjrS71AL9QAJWMykza3PczZaIB76gmzehwBlTE77H/rNWvuBklT0NCEo7U5i++lqGKiffERI41oaAKxRaVFNv3gNZF1YlqnEmdBXAd6IZkmgciSr37jS6bZVTz8yrjgvRcCaB0a0q5YQFDNfyKE42AS6vWDnnIuzKnmqXKjsCCrCSkbDFMmABz7+bPsk8zMe2SrhSJm/DY7Jg09doIQgULMH+UHJxViUdDevsk= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB4046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(376002)(346002)(366004)(396003)(136003)(2906002)(45080400002)(8676002)(5660300002)(66556008)(956004)(54906003)(16526019)(66946007)(86362001)(1076003)(110136005)(2616005)(26005)(36756003)(66476007)(316002)(8936002)(186003)(7696005)(478600001)(6486002)(4326008)(966005)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?ymHZrdG1H+5+A041D5onqFfqf29TcY?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PyjfOTo?= =?utf-8?q?Bm9x1RF3sDv/Uf1SVRm6Jg/4tR5derafPbwQTFsc9WwHpDCx7Rdu9Uu4dKM7Yp4qV?= =?utf-8?q?UY7rNoov74y277ka1McX2YJs3CY8VzH4FWF17YMT3rqV4PVxXnt5u4YWgSYQtabZT?= =?utf-8?q?hxGf8MzllcWKz2ge6VwKOJaPrP6ojz8rRKmGfctKpn0wmboZzJ3eUx9YCftz1nsmB?= =?utf-8?q?RQSWIs320OJdbWzFWaRnqPfVrViBDbD0cbsyT3GCkB+EUf+Pxc9kyeLQZQBBmw0OI?= =?utf-8?q?GEdH0zA8ab45kjdxnrsllz6Wa2d/OJ9+av0mEY4TRqucdpRfuW7WoYf9P11Ei2PtD?= =?utf-8?q?B0xEP55F2dPPXoEHc5JeQ77ksjXCTKuIrbELpJa2g/+plglVR7xEaYkT9cGiKpW8V?= =?utf-8?q?JZcIm3Bej/Na0x?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6eba5fd1-3f80-4eb7-a59b-08d8e1ab13c9 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2021 20:53:36.3922 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DSvXcHR6kn8EouF5f0SByGwAnRW+KZBR+cX6G/jqUtROLzx/U9ZHZF3qLvGDcvl3QWqLQRZJQP8YYc2/EIQV/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3792 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210307_205343_606108_6FB4B97B X-CRM114-Status: GOOD ( 12.40 ) 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 Crypto engine (CAAM) on LS1046A platform is configured HW-coherent, mark accordingly the DT node. As reported by Greg and Sascha, and explained by Robin, lack of "dma-coherent" property for an IP that is configured HW-coherent can lead to problems, e.g. on v5.11: > kernel BUG at drivers/crypto/caam/jr.c:247! > Internal error: Oops - BUG: 0 [#1] PREEMPT SMP > Modules linked in: > CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.11.0-20210225-3-00039-g434215968816-dirty #12 > Hardware name: TQ TQMLS1046A SoM on Arkona AT1130 (C300) board (DT) > pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--) > pc : caam_jr_dequeue+0x98/0x57c > lr : caam_jr_dequeue+0x98/0x57c > sp : ffff800010003d50 > x29: ffff800010003d50 x28: ffff8000118d4000 > x27: ffff8000118d4328 x26: 00000000000001f0 > x25: ffff0008022be480 x24: ffff0008022c6410 > x23: 00000000000001f1 x22: ffff8000118d4329 > x21: 0000000000004d80 x20: 00000000000001f1 > x19: 0000000000000001 x18: 0000000000000020 > x17: 0000000000000000 x16: 0000000000000015 > x15: ffff800011690230 x14: 2e2e2e2e2e2e2e2e > x13: 2e2e2e2e2e2e2020 x12: 3030303030303030 > x11: ffff800011700a38 x10: 00000000fffff000 > x9 : ffff8000100ada30 x8 : ffff8000116a8a38 > x7 : 0000000000000001 x6 : 0000000000000000 > x5 : 0000000000000000 x4 : 0000000000000000 > x3 : 00000000ffffffff x2 : 0000000000000000 > x1 : 0000000000000000 x0 : 0000000000001800 > Call trace: > caam_jr_dequeue+0x98/0x57c > tasklet_action_common.constprop.0+0x164/0x18c > tasklet_action+0x44/0x54 > __do_softirq+0x160/0x454 > __irq_exit_rcu+0x164/0x16c > irq_exit+0x1c/0x30 > __handle_domain_irq+0xc0/0x13c > gic_handle_irq+0x5c/0xf0 > el1_irq+0xb4/0x180 > arch_cpu_idle+0x18/0x30 > default_idle_call+0x3c/0x1c0 > do_idle+0x23c/0x274 > cpu_startup_entry+0x34/0x70 > rest_init+0xdc/0xec > arch_call_rest_init+0x1c/0x28 > start_kernel+0x4ac/0x4e4 > Code: 91392021 912c2000 d377d8c6 97f24d96 (d4210000) Cc: # v4.10+ Fixes: 8126d88162a5 ("arm64: dts: add QorIQ LS1046A SoC support") Link: https://lore.kernel.org/linux-crypto/fe6faa24-d8f7-d18f-adfa-44fa0caa1598@arm.com Reported-by: Greg Ungerer Reported-by: Sascha Hauer Tested-by: Sascha Hauer Signed-off-by: Horia Geantă Acked-by: Greg Ungerer --- arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi index f581a6d1f881..37fec474673a 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi @@ -354,6 +354,7 @@ ranges = <0x0 0x00 0x1700000 0x100000>; reg = <0x00 0x1700000 0x0 0x100000>; interrupts = ; + dma-coherent; sec_jr0: jr@10000 { compatible = "fsl,sec-v5.4-job-ring",