Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2318755pxb; Mon, 20 Sep 2021 18:41:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1JczzUHU/PPI95qjajkLR2MEudcGBq5b04DMaBfGVkYhfs7VWAoc/xQhCmHWX2gupwsP3 X-Received: by 2002:a05:6e02:1bad:: with SMTP id n13mr16557848ili.142.1632188471054; Mon, 20 Sep 2021 18:41:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188471; cv=none; d=google.com; s=arc-20160816; b=fHAqd2HzMWf2EHWYLDIAppuQ6ZyTIBYbqw/WY7JuKjQutGrBKeEga0DpjCw/E53xMv ic2hmzqCXnrv+nIKzJ8fGijkb6p4Fy8NpmRJ6Dff7okwVJaziq45V9KsQUTPVUWsBhyz WKfpob7/FqnTWmaYv8EsJVXixShO229IRFnFQpvl1o2VNwDqPNzcdqEcN5Q/vQt1RsEP ej1VXdN3MFhLZ6jzE3STd2dr+iAuJGyJLhePCJXsJIfmZXZg9Rr99qjtXFoizRb94AT8 N6q7lk5bL/XCo695ioDONjjJj2GVn/umCT3g+At3yaxHDGtVbslDX13+ciV3VJcRKruJ gU2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bNaDFmzVv3uKPgKAqiQqJeFLc8FV9NeWINL4Lel0gO0=; b=0+ZbruCcEalGOfOcdQk1Q64UZ2TVSGQ64eRgV2thyqhFKUYw648G4XlcN5MMblm5yG ixzNyGYIvKT3lDh5RAqyKGs2hlzNbdiZ5+OO0h3zMFzzRvJHvttY52r0LasQWULQJPvD fSUCDYobIO7JjQHy1Y0T6q91mHQFr2MmxqTtf4Z4fpZ1UvaXWfgbiVa3xJXoPrbUqVo+ 105IoR7GsvPx8rSWY1kRjLkvEtbqtTxYAwLzgjIYVJLGRzCC9u8bxUKwFLr5fN8rq+77 zNOvT3F7wXXAJ2NIwVGAZCJ2/WHblTafnmNLxrYS1whIRD+GLz4uoawISfaV3AA+3liD /81A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b0pO9F7K; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s26si15522836iov.21.2021.09.20.18.41.00; Mon, 20 Sep 2021 18:41:11 -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=@linaro.org header.s=google header.b=b0pO9F7K; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231318AbhITQZa (ORCPT + 99 others); Mon, 20 Sep 2021 12:25:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230331AbhITQZY (ORCPT ); Mon, 20 Sep 2021 12:25:24 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BC77C061574 for ; Mon, 20 Sep 2021 09:23:57 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id s16so8481487pfk.0 for ; Mon, 20 Sep 2021 09:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bNaDFmzVv3uKPgKAqiQqJeFLc8FV9NeWINL4Lel0gO0=; b=b0pO9F7KxZdfy+vW9e/AF1J2CxXgi7bTOPPwUmpqOKwsmYQu2JrK2SDKY5lnXdSN6t 0f+qEjn+IDksJl75FTZnuq3Vlo9rVExKtfY+L5yr+S1TDwJUA0CQnPvzeum048IbTXce 2ok2uAVgzxTby5Xl3toVcqQt3JJIwwSRrzmg/hLzEJP4JWIzmlP3pP/V8LIURdcsdjII oKGh6My7P7DM69py7SaKWNKCUxD1qYv4g27xKHbze5PU6iL6CcpwMggveTWqGVvKzjxC 7TOj9aPwETWxc1mvjrxhDQ5M5sGXQd1AHLIOQvtZ0O945FhD/n9+PI5cYuLLMcCfQiYA MIkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bNaDFmzVv3uKPgKAqiQqJeFLc8FV9NeWINL4Lel0gO0=; b=Gy46Xqn0+g4UAubzSWaDiwUnGvW83FSpZZQ0yAPEDUqxLwqvCHW+AjG+BWjDT+JX2k mjakGKrDfKG0LUyALnY2IuSSqXE9OjXa/C5M9OHUE9J1fddCmBf4sCBO2bXciW6napZt LwGAuVFVKMLLl7OSZ7rHiQKRaIsgWRh2mt+2Kn9y3LVLgjLmdH7qdL+LA/rk0CidCxVF RtKQT+PR4zTCwQvVEwHMddlw5aYjLm/onRgzxnZkpG0oWXjDrKJNCj3AUiqw0Nf/s89P v6coMyDMhdNKI2luwibX4IARtUHTT6rZSlVplicM3aQLgfXURvQI14nCJx2IhdRErV9n rQzg== X-Gm-Message-State: AOAM53253QLPfP/97CWXxkjezGRleg4YVOx+5cw7WizOQTcxAm5c2vJi P1XKV6NAjDGT/x6eR9JBQRJ36A== X-Received: by 2002:a62:1d4d:0:b0:443:eac2:8a1b with SMTP id d74-20020a621d4d000000b00443eac28a1bmr21576833pfd.2.1632155036924; Mon, 20 Sep 2021 09:23:56 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id p24sm14593784pfh.136.2021.09.20.09.23.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 09:23:55 -0700 (PDT) Date: Mon, 20 Sep 2021 10:23:53 -0600 From: Mathieu Poirier To: "Peng Fan (OSS)" Cc: ohad@wizery.com, bjorn.andersson@linaro.org, o.rempel@pengutronix.de, 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: Re: [PATCH V4 1/6] remoteproc: elf_loader: fix loading segment when is_iomem true Message-ID: <20210920162353.GA2023964@p14s> References: <20210910090621.3073540-1-peng.fan@oss.nxp.com> <20210910090621.3073540-2-peng.fan@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210910090621.3073540-2-peng.fan@oss.nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 10, 2021 at 05:06:16PM +0800, Peng Fan (OSS) wrote: > From: Peng Fan > > It seems luckliy work on i.MX platform, but it is wrong. > Need use memcpy_toio, not memcpy_fromio. > Lucky or not I just can't understand how this worked in the first place. > Fixes: 40df0a91b2a52 ("remoteproc: add is_iomem to da_to_va") SHA tag should be 12 characters. > Tested-by: Dong Aisheng (i.MX8MQ) > Reported-by: kernel test robot > Reported-by: Dong Aisheng > Signed-off-by: Peng Fan I will add a CC:stable, fix the title, fix the SHA and pick this patch. > --- > 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 >