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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4894C7EE33 for ; Thu, 2 Mar 2023 09:53:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229986AbjCBJxQ (ORCPT ); Thu, 2 Mar 2023 04:53:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbjCBJxB (ORCPT ); Thu, 2 Mar 2023 04:53:01 -0500 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2058.outbound.protection.outlook.com [40.107.8.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6518D3C3A; Thu, 2 Mar 2023 01:52:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nX4FO2z7eqTImC6DY1jxGg2fsmzC8g4cJm0mCR3XATeUFQLhEHcBUSAiVooqPweOfq04CgtcGYSgzb+KkjoycJjNtKyiK1URW++7/mHdOHpYUgDWg0zpyYVa3vX+Vlpq8e03FNbxxC99LMzMthoPIjF+qXKqplIQbBdKp38ShEsH4IwQYWNYzDUgSQZdErQcvxAnFUjcw/kjm5C4hcG2SXodHQXAOqmFaxnj6xxBprs6T8vyX9TGgM/BZ6s98c3zhfRidxr1lRh434UBokhmzGxD8M/siygd1A3gg7U05CTf2Mjmo2YprFELyVESiRHb/o+HfUXC43vo8LpfscBG3A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y6wwmI7XU/u72f0RhZcJpQMKYINHkN4riuzoZNKkVtI=; b=CSPqV3zZAYGknkIx0SkKFrvA09eTtpv8dfqQ2PgnmVSuOmz5g512OKXYA/wWVNKyQzNfG702whVkhNRtD7/wiaMtgxRaW0e8NBliPbXo17rFuRFE0rc7DsFrrZ8qMcvVn6ODJO5qsTfORhnVBOAGBCaLwTCcs3j6Gvo5fVcybenMwdO3ol07VbN6pbHcNOS9lZUUdVyc6pgcyNDNt9iA6BkQ2OIEFtqfMO9JUo+TUa/7X1o9GRbtecrnIc+E0fnjpd//7E4GHd3SYmDea1rwYbO29fUVQTl0+vwGppTDm5yyCmuh1nfW6Ok7G29kwCtYmDZJ8axJJaDGZHba32pk/Q== 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=Y6wwmI7XU/u72f0RhZcJpQMKYINHkN4riuzoZNKkVtI=; b=ZKloaofZCPlBeU/yk/Y6YUu6hqK8QW8BT4XAdYd5bu+mVT2zJQlOrPd4gPgq7U1aNNif2Xv5c2veOHuOSwr6Qz6yxaeAj1K4lA8dKBdUwZ8wO5EVw3AKB+KM4gAuec7ZHYnlI2wGYYuPLtOWaT5lKTYLevyIlcgAOwlhNnmvee8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9628.eurprd04.prod.outlook.com (2603:10a6:10:30b::14) by PAXPR04MB9060.eurprd04.prod.outlook.com (2603:10a6:102:223::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.18; Thu, 2 Mar 2023 09:52:56 +0000 Received: from DB9PR04MB9628.eurprd04.prod.outlook.com ([fe80::8e85:409:6bbd:aa9f]) by DB9PR04MB9628.eurprd04.prod.outlook.com ([fe80::8e85:409:6bbd:aa9f%6]) with mapi id 15.20.6156.017; Thu, 2 Mar 2023 09:52:56 +0000 Message-ID: <37ad1463-c12c-f148-4fe3-07dab52e8e1b@nxp.com> Date: Thu, 2 Mar 2023 11:52:13 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH v5] remoteproc: imx_dsp_rproc: add custom memory copy implementation for i.MX DSP Cores To: Mathieu Poirier , "Iuliana Prodan (OSS)" Cc: Bjorn Andersson , Shawn Guo , Sascha Hauer , "S.J. Wang" , Fabio Estevam , Daniel Baluta , linux-imx , linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Pengutronix Kernel Team References: <20230221170356.27923-1-iuliana.prodan@oss.nxp.com> <20230301184916.GA1326133@p14s> <20230301185606.GB1326133@p14s> Content-Language: en-US From: Iuliana Prodan In-Reply-To: <20230301185606.GB1326133@p14s> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM4PR07CA0001.eurprd07.prod.outlook.com (2603:10a6:205:1::14) To DB9PR04MB9628.eurprd04.prod.outlook.com (2603:10a6:10:30b::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9628:EE_|PAXPR04MB9060:EE_ X-MS-Office365-Filtering-Correlation-Id: e886a66b-055a-410a-fd18-08db1b03e5c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z6s7ehyiOCCo/3ViXo2goOj5K2yV0LJWbQKUfOGJrtnh+yk1oxFffbx2yN2S8UKgRgw9RZfTTcRkR1/lLVBgxFlnoy+GA3bZWKEPaqT+fZ4HPMubV/yHmfUnIi2+JjtqvFgOxasDblW1ffRnYELTHcwrq+5E9UmQubQshGYh5Wi77Wg0SxChSnkE9JYkUgWSNVSHWTRYJEFSOn5ohngZmXf/2h03yr+sl3lyYs8BRkXRZITJxlH1hee0UD4sJpLfyTDmNM5nWRFh2XOAJs3v7WbDQchXcLInirPIgEVO17MfbgvqcO5q0TJ8Koij7FtcAsc9haqwAc11gE/sv9WbfML5z7HeoQbdKKATnfJ1RF/EPyzr2xadijeNb8RvZd30X+c6R+VqxFKtCTSpWi1SRscjmsT7e+ww2ciZ/sd3hO7NfGaPTzRp8THtEAaAdAAaQxfY+1wbZjeoHzjtpzwey4ZeQharbyAFwj+X/1HhmoFDBRwk6cFBPGLdqWuLbkcBPXptxeyh7MYHbx9F1nzCHDQ54NVcuEqjMadYM61cLg1WA+6L8nAKHHJb344n/QtKE1rcafozHhtehMRDTe4hKFz2ytfPF4zfRnvr2dkL/69SVyTPwh2DksGf81HO7+i7Fyxs8gPSaxL0M8BFlQwll4KwC8tabGcNe8CnpQi3rMIlAyo06ICNb+oSGeUZpvd1dk5lGN1WsBtzljUgcou/u2cGLl00ca89AYgKBHmX2zo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9628.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(451199018)(31686004)(86362001)(31696002)(2616005)(110136005)(5660300002)(8936002)(83380400001)(54906003)(41300700001)(44832011)(66899018)(186003)(4326008)(66946007)(6506007)(6512007)(66476007)(66556008)(8676002)(26005)(478600001)(316002)(6486002)(55236004)(53546011)(36756003)(2906002)(6666004)(38100700002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Y0JaRDZQNE5rUGlEclExVHZH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?= =?utf-8?B?TjNEOEtORU41OEpaNHluZU5hUDdNNGNSZWVuSnNEZkRUWnF0TWpwa1JoN3JR?= =?utf-8?B?VjBSOTFVVmpHOC9CR1BRK3Z4UVIzQ0dWaUpaUE9zWE0rZWQ3VGZscjEwdFha?= =?utf-8?B?dEFMUTNKRGJMblQyTkJIcGtRTVp1d01Da1U5WFpxTWRZWEZtSlR1NXBiMkU3?= =?utf-8?B?UmpVaWMyOGd2NTBlTFlRTlcrZnl5T1B0US9scDYxTlpCVkIwbTBGZWZ1eU56?= =?utf-8?B?UkVNdTZXNkwzaWs1elVDMnd4QS9pUEM1TEdNOTE4ZWo2RlIvWVA5TzIzVUU2?= =?utf-8?B?R2N3bnVoeHBpemtpTUNPUHRpenBqVzhwZ3d0djQyeWc0ck5HSFNnT2F3V3JL?= =?utf-8?B?ZHc9PQ==?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e886a66b-055a-410a-fd18-08db1b03e5c7 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9628.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2023 09:52:55.9199 (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: vjAKUTSQu5JoKQ2vxaDoYO3UMgPMGAOu5wNUQaCa+hXTbAic6f/uSgeyEMw+9dJGbZxCekBII8CDQHd4rJBAQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9060 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mathieu, On 3/1/2023 8:56 PM, Mathieu Poirier wrote: > On Wed, Mar 01, 2023 at 11:49:16AM -0700, Mathieu Poirier wrote: >> Hi Iuliana, >> >> On Tue, Feb 21, 2023 at 07:03:56PM +0200, Iuliana Prodan (OSS) wrote: >>> From: Iuliana Prodan >>> >>> The IRAM is part of the HiFi DSP. >>> According to hardware specification only 32-bits write are allowed >>> otherwise we get a Kernel panic. >>> >>> Therefore add a custom memory copy and memset functions to deal with >>> the above restriction. >>> >>> Signed-off-by: Iuliana Prodan >>> --- >>> Changes since v4 >>> - use GENMASK; >>> - s/ioread32/readl; >>> - s/iowrite32/writel; >>> - use for loop with writel instead of __iowrite32_copy; >>> - update multi-line comment format. >>> >> This looks good now. I will queue this on March 13th when 6.3-rc2 is out. >> > And out of curiosity, are the remote processors handled by imx_rproc.c also have > the same 32-bit write constraints? If so, it would be nice to have a patch that > fixes that as well. In such a case, imx_dsp_rproc_memcpy() and > imx_dsp_rproc_memset() should be renamed to something more generic and re-used > in imx_rproc.c. None that I know of. But, this restriction applies to any core who's writing to IRAM. When one is writing from anywhere else in the system to IRAM, this is a PIF write. And the inbound PIF writes are 32-bits at a time. Thanks, Iulia