Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1277393pxb; Fri, 10 Sep 2021 02:11:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkgIizyWvXT92TxpYaNX4k9VARODKpUSB3F8LIZRwn2VAb7DfwbgU3gt7k6Xc6hlSnFmOl X-Received: by 2002:a17:906:4751:: with SMTP id j17mr8445464ejs.145.1631265079111; Fri, 10 Sep 2021 02:11:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631265079; cv=pass; d=google.com; s=arc-20160816; b=k9SgT1Xlxeq9NKQcRze9/kvVK1Yk36FV3ZGShzkCkEO+0B1Lrs1ubt01JIJDHmqp+L tZSSRe9TFuXLUezS0PtOqRaWvTtRR6GZIo7WyeOculIkTkwHBs/ve9/Jw4wRWFm5eMZW qe+fmFART2hqFtk/8XzHOf87x0etxIgq8kVd/+5Df4lyCHNfF7jJcKv1r6O2Dn830oAW o/mDTP++vnF+4Vrl6OPIS0IGA8scuEPQZ44Ix2RW3lrHqublfy/aPsPx4CpVB8CzmcNu qtp8VApmlrDABTeSJbWyuLGWVxFtGFFVuM2MxmMJ+uWgsXn+Vmgl7T6YCoZd2zeqGWCm iIEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Pl5B+yjr5YhPukrJQKVdX7vDi9qLNpcs+DEFloHaWEo=; b=YRQBzEnq5US7zeSv1hRzUMUhvxuX1I7/sUEl+zZwaVM9QpawAthXCZ441D8nUjoOZT nv86LPNCAYi9g7n8insplEK2ZTOLNzWlwC73ssfqwXKaeWNUMdxYnL5MAe8Qeg5wKDI9 hqjBfCBucXnpZBDWF9piQ6j7USGQi/BlEO5h7Nj9dGFEWGajdz9HinodhJXRSi/8T9vx rJcTtEgNVvJSeM9UmPstJHcifeKRKV6fhf/Rw1ZXnb3cgeV5pgf24dwCui6Sua3u+453 eWY6gQBPqFQLdTWQ7LyDrIWTcZVbo9QlNuJrF4xApCHHY745dcpaTQjnFZYnSrvS8aCa POyQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=i5cXqCOO; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si4688675edd.519.2021.09.10.02.10.55; Fri, 10 Sep 2021 02:11:19 -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=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=i5cXqCOO; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231952AbhIJJIq (ORCPT + 99 others); Fri, 10 Sep 2021 05:08:46 -0400 Received: from mail-eopbgr50055.outbound.protection.outlook.com ([40.107.5.55]:63811 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231946AbhIJJIl (ORCPT ); Fri, 10 Sep 2021 05:08:41 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dRCDLaCu8kCWlJK+gmga65GOZApM9zim+Yq39mjjfMpYAMcMpiIOpvZ0CCKfrNwqhtZMblGXE7Py8JRT4v1xibBf+vRrqR2PSRe1q9MEvmjMNUWazX/udzGBs1CYN8FWYjLlQAAcJIC9++NVXHX9PHyCfvLN8SWfBT9+fjQazYSD63jKRm+6j8anMS7YPRNYY6zJo0hK+H2YRSMf1k/tt/Q1So0oom/BkfhnHwrKcO46qLIHysCs1VYnL5+3a33o/W71vUuERFRX5VAZNAQ4jG3wx6A9WiR015/YjSvE14OLzOyjuy9f8qji3aJ0b5Kn+NlBBwWXd00xfiEatHzZtQ== 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; bh=Pl5B+yjr5YhPukrJQKVdX7vDi9qLNpcs+DEFloHaWEo=; b=POl2f2WG/StBb+bkRcjy1c6IET+34CCNy7dNUcITP5PCGhSuzUP6QbMSJOR75DmqHSd5kaSQiklUPeoNfVKcvNkWFPQAYygW8EO035dxR3M67Qw72Y4k39rcixPL0kAD0aVX1UxO5of87nJg6feUJbd+ERQ92uT2dvZ4+L9u5qr7BhcE+DWpHRiX30wp3fHymF6v787mHXHoNDhXCwSN9YywUdLavvP4BXs0v8Fd6M5Wc3v+i7O6RzY4Glk6qV4gOzxtVt4enjflnO0cPLxoAvtbv1DN9rWqfqYUVgm+VtU+9vpKzlDOFe3uDA6j8nA1k3yqqXWmA3fnlZtXGil1hQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Pl5B+yjr5YhPukrJQKVdX7vDi9qLNpcs+DEFloHaWEo=; b=i5cXqCOOBwtj2XEouwqhQGjEoSbbTAHM5pX8OXCNY2IZzHgJdnZdI76DeO8zqpPCjuZXDRPYgnf0qqsocHwv6aWcUUVRd+d9GHAVeR2A6pxWRBOPden9bLcvCx5idUk9JV4I66bxeA3uG/xTWbAOCgkAdXqgi0zXaabEkPIK5uA= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4763.eurprd04.prod.outlook.com (2603:10a6:10:1c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Fri, 10 Sep 2021 09:07:26 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::4868:6843:a39f:aa53]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::4868:6843:a39f:aa53%4]) with mapi id 15.20.4500.017; Fri, 10 Sep 2021 09:07:25 +0000 From: "Peng Fan (OSS)" To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, aisheng.dong@nxp.com, Peng Fan , kernel test robot Subject: [PATCH V4 1/6] remoteproc: elf_loader: fix loading segment when is_iomem true Date: Fri, 10 Sep 2021 17:06:16 +0800 Message-Id: <20210910090621.3073540-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210910090621.3073540-1-peng.fan@oss.nxp.com> References: <20210910090621.3073540-1-peng.fan@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG3P274CA0012.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::24) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG3P274CA0012.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Fri, 10 Sep 2021 09:07:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 52d492db-0851-4095-ff29-08d9743a6844 X-MS-TrafficTypeDiagnostic: DB7PR04MB4763: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: boiUn4gsEGrxdjVvMiRIQ18L6aXWPFgl3apmYqiLNi12Bw9QKBMeeePcw4XMNghTHoRZuL0SZ03fnmR55/qCFkXYsjruADXKruNkbcP96idlvpTUr8juZhBrAmhSyxRdREV5ubaJUFF+aHOKCZyXI3MpcxLEBDywIYCevHeI3G/fsslIFUdlwL87JHJmyds2QuI53qm+oc9wq5LaR0zTGtWfRE+bLSl6WhtwMyIo+aZalAz6xo+q6o+T5ZL4qvxKRA31bDLBd8WWEeF1aYMNNqd9J5m7gZxo+yjPrWPjj0/Q1bchSeOsEflQ8hL+kQszFKzBS9P34CleFmQz01mlY6Vf2nAgOnIm8hjM4pmr1eMPNBJe6yh2mnOJqUEpDDL0ZOg6meQNav96wxiQO5Hz4ffhfFqPc+yK5EnH7Ti6t8PcmboTKg3WtrhED02+P07OBmv9EzWMHPaLcDgfs924dK+tJwzK6qRBBqv62oxUASvy+8jg082JARZBy4Wsw0B4uxDyPcjXscEFhhRgJZcKWlhAgSkTj+SoTUJxSUE1hZLQn976gz8wc6dlu3N7EIbjtnfjVxZbLyu5skPnKVL7ngAK3H5QrpzSToFMJbZmYp1dOfdtaihsm1m3Qu31IeN2/uFw/02CMCbpP5u3fl58VDXS5jaGRtaCAU2KO9C7hLtUaW78piKW5YgTWsrCQK1+1UjbYE1vqL3z6wTdfsXh0Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB6PR0402MB2760.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(346002)(366004)(136003)(376002)(396003)(6512007)(8936002)(66946007)(66556008)(66476007)(83380400001)(7416002)(6506007)(1076003)(54906003)(6666004)(38350700002)(38100700002)(6486002)(8676002)(316002)(186003)(52116002)(86362001)(26005)(478600001)(2906002)(2616005)(5660300002)(956004)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?lcOq7eklj1/UXy9fo+SklFhghzIqWed63cRhvteePHJPJagCuVlsotmmMe/l?= =?us-ascii?Q?jTHceWaljDL+tNOQ4in0hS3G0m23SkvOIEmV1MHX0K7u77QvpvtIJpqoPwLU?= =?us-ascii?Q?FphVPtLPhpKD2FmxHFnASceTYb0IqF4qYtP1EndwL1/OK4F0mcOr+Exslu2a?= =?us-ascii?Q?u08H3Ca1U1/s2JOXrFy99/q9Cb4UYggB68R0GoXII8/QY+I0dPNUhsw0JoCd?= =?us-ascii?Q?oYLG55F7eiUvsfj8nj6RNqjG0Iv5gRT/5CvYe7nttedJPVAZ5CC3PGMKoFIe?= =?us-ascii?Q?DNiV/+ladUHdErqAqEuPzGOnQ+Ju3lcm7uA2VgSmH5tIqCAnmA17Abf6+dXy?= =?us-ascii?Q?mVWv2IvFMp5oIFz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WXU9qyN7?= =?us-ascii?Q?Jz1XyPNQuIrPXb1ui6QKvkzO7p59E2Vx5tDQJebDqZf5YK3cgf/4/CreeE7o?= =?us-ascii?Q?apB4uBS+qXxVJ0Yv0Lo4ayN0?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52d492db-0851-4095-ff29-08d9743a6844 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2021 09:07:25.9221 (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: ObVR8+FlGnNVRGWylI1RPyH4zOpCUi5CDTAWXpcy2YaXJjJHcUd9s0pd0uRpDXRsz2bi7ezs0OvLJmojEa50NQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4763 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan It seems luckliy work on i.MX platform, but it is wrong. Need use memcpy_toio, not memcpy_fromio. Fixes: 40df0a91b2a52 ("remoteproc: add is_iomem to da_to_va") Tested-by: Dong Aisheng (i.MX8MQ) Reported-by: kernel test robot Reported-by: Dong Aisheng Signed-off-by: Peng Fan --- drivers/remoteproc/remoteproc_elf_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index 469c52e62faff..44e7f9308f4bc 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -220,7 +220,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) /* put the segment where the remote processor expects it */ if (filesz) { if (is_iomem) - memcpy_fromio(ptr, (void __iomem *)(elf_data + offset), filesz); + memcpy_toio((void __iomem *)ptr, elf_data + offset, filesz); else memcpy(ptr, elf_data + offset, filesz); } -- 2.25.1