Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2760586ybf; Mon, 2 Mar 2020 15:08:51 -0800 (PST) X-Google-Smtp-Source: ADFU+vuNaeU/ojsOLp1gdQEKZKbnwqsiuM8qDGMlJgiynE5jeRrYD5grcvUoQEgrZERU6XYRcywL X-Received: by 2002:a05:6830:100e:: with SMTP id a14mr1213095otp.297.1583190531737; Mon, 02 Mar 2020 15:08:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583190531; cv=none; d=google.com; s=arc-20160816; b=byhkHUgAEPvFgsFKICrFrvaZKmJaWTmbvDD6dQJCM0kVNEFlGTf9HGGE9fQ7KklEJY q+ZhYDV+RLyFVZ7urtIVr5z8lH++xfRxbU6YDhWg/+eZxZgyky8C648npprNa/Fledhw w4flh0Vqpk1HPhvpkArwlXkvoge3VOAhrzQlslDjV0NT0QKUIPiVOA2FVplPoKy9m+2b b9ngh+YQOmaxAIylQcjitQbPAtH6B7ENie5H2W3Fup2trT6m8JXkSG0fdS59USHIEtGn FTuShQmre4imMgOCq9isUUdQkLFsDMhvHBDEhVBtc6ihacscJzppzaIRnbKf5MevD24A u9FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=bHCVavkwu6zfqNW43fiKG14XiAueMcaZslslsOZ/218=; b=OFyiv7MVKsZhy/fGHRQb+jGU3bFuYQbx9COW+mPSMVDOaljNVfx88oIVXDcGGhMGXv ZQRqriNC9dWVGRV2OjFPZ6X+hG790EI7Dn0mLEx3UaZ9gCKyEhDr2AgXjqS7ymitduxK gmgx+Nke1e8/Zvbps1WxGYqd3gsHfI8Y551xGDEZeGulhP6sUYOIMSMMfG3B/g+BedkP F0aKTm3F8hlOYhSRlY5K9M94q6NM4+7ecdZKmwkz6xMoAq0ch08aaW+Tk6rELvxX8FBx 08VQYJL7E8+Ik+bOzH0l+FXmZPeAb3Yxqx9Slq4/wu0kDG+OoO8q/UR41Vbc96q+7lbj K1ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ydM6de29; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id w20si4024009otj.294.2020.03.02.15.08.39; Mon, 02 Mar 2020 15:08:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ydM6de29; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726947AbgCBXIU (ORCPT + 99 others); Mon, 2 Mar 2020 18:08:20 -0500 Received: from mail-pj1-f66.google.com ([209.85.216.66]:50782 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726890AbgCBXIU (ORCPT ); Mon, 2 Mar 2020 18:08:20 -0500 Received: by mail-pj1-f66.google.com with SMTP id nm6so46092pjb.0 for ; Mon, 02 Mar 2020 15:08:17 -0800 (PST) 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=bHCVavkwu6zfqNW43fiKG14XiAueMcaZslslsOZ/218=; b=ydM6de292BVaEG4QIuyq3YDVMoEUXf/csuA62Efwp3SSERMdRa78DTYxPii0GhrquH ISL5cY5PnKvvgsRwpvwPaI7vfbfzJRRffct/nD7NxWwzR5+nM5zXinq7KnqGZ6IXRQ0a oc6KW7Dm8G/R+weAy54bB+Jxgl2/2PE2CimSIockQWJAFk6q7ZWhhb2y9G0cGsaZQBON jzosmItoJcleMLSIQDULAkmSSKVBi4F1legP3yobRaXw6QIUtUx8/QLvUzOBvdLuhxec JlIVk7m0qsebia9QlP3xo1u+DZYQyvO4TS9/u4XLRK2D0zuABuQfYiyrBrjveBgHGgoz CgMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bHCVavkwu6zfqNW43fiKG14XiAueMcaZslslsOZ/218=; b=DPFCiC+fSzHGOENHdDOmgFrl+Ok0aofI3x1DkhVEFxOr4aWXR4hzb2ACq+V/Ly9wbd 30fyP49MEaNpjHan40ZtvMhYWTdLuDsv3QLfVUKky3URkcAWl1hK4X6DOGYXkVFbXn7n SWjTJUnLZivKP+W8BgFDCv8bkOJGyfW7EbXmNkciQd6/BvaEhbOMbqxvrMBcPaoupXkm KMQzN+DZt99CbiIDugyOf0ZJH1+dxpY7eFwGfc8lmHforgtFh/mL9wp0ug/OJXbUUuoQ Qp9mX4kwUZdmoXRZXFHMn7y5hIrqW81Y0xAiTgqArwaIL6w3jFyXpsrtmhbI8kxTQ6Q9 mG2g== X-Gm-Message-State: ANhLgQ0Dhh4HD2/KQq/nUFCTBESgFs/USiLwXE8XJCy/OajjL7sSzjDb ejLNsIRdLMcu1z18SexcHPgpbA== X-Received: by 2002:a17:902:b7ca:: with SMTP id v10mr1336548plz.308.1583190497213; Mon, 02 Mar 2020 15:08:17 -0800 (PST) Received: from yoga (pat_11.qualcomm.com. [192.35.156.11]) by smtp.gmail.com with ESMTPSA id t11sm256202pjo.21.2020.03.02.15.08.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2020 15:08:16 -0800 (PST) Date: Mon, 2 Mar 2020 15:08:14 -0800 From: Bjorn Andersson To: Clement Leger Cc: Ohad Ben-Cohen , Jonathan Corbet , Shawn Guo , Sascha Hauer , linux-remoteproc@vger.kernel.org, Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andy Gross , Patrice Chotard , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Arnaud Pouliquen , Loic PALLARDY , s-anna , Mathieu Poirier Subject: Re: [PATCH v5 3/8] remoteproc: Use u64 type for boot_addr Message-ID: <20200302230814.GC262924@yoga> References: <20200210162209.23149-1-cleger@kalray.eu> <20200302093902.27849-1-cleger@kalray.eu> <20200302093902.27849-4-cleger@kalray.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200302093902.27849-4-cleger@kalray.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 02 Mar 01:38 PST 2020, Clement Leger wrote: > elf64 entry is defined as a u64. Since boot_addr is used to store the > elf entry point, change boot_addr type to u64 to support both elf32 > and elf64. In the same time, fix users that were using this variable. > > Signed-off-by: Clement Leger Reviewed-by: Bjorn Andersson > --- > drivers/remoteproc/remoteproc_elf_loader.c | 2 +- > drivers/remoteproc/remoteproc_internal.h | 2 +- > drivers/remoteproc/st_remoteproc.c | 2 +- > include/linux/remoteproc.h | 4 ++-- > 4 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c > index 606aae166eba..c2a9783cfb9a 100644 > --- a/drivers/remoteproc/remoteproc_elf_loader.c > +++ b/drivers/remoteproc/remoteproc_elf_loader.c > @@ -102,7 +102,7 @@ EXPORT_SYMBOL(rproc_elf_sanity_check); > * Note that the boot address is not a configurable property of all remote > * processors. Some will always boot at a specific hard-coded address. > */ > -u32 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw) > +u64 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw) > { > struct elf32_hdr *ehdr = (struct elf32_hdr *)fw->data; > > diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h > index 58580210575c..0deae5f237b8 100644 > --- a/drivers/remoteproc/remoteproc_internal.h > +++ b/drivers/remoteproc/remoteproc_internal.h > @@ -55,7 +55,7 @@ phys_addr_t rproc_va_to_pa(void *cpu_addr); > int rproc_trigger_recovery(struct rproc *rproc); > > int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw); > -u32 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw); > +u64 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw); > int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw); > int rproc_elf_load_rsc_table(struct rproc *rproc, const struct firmware *fw); > struct resource_table *rproc_elf_find_loaded_rsc_table(struct rproc *rproc, > diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c > index ee13d23b43a9..a3268d95a50e 100644 > --- a/drivers/remoteproc/st_remoteproc.c > +++ b/drivers/remoteproc/st_remoteproc.c > @@ -190,7 +190,7 @@ static int st_rproc_start(struct rproc *rproc) > } > } > > - dev_info(&rproc->dev, "Started from 0x%x\n", rproc->bootaddr); > + dev_info(&rproc->dev, "Started from 0x%llx\n", rproc->bootaddr); > > return 0; > > diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h > index bee559330204..1683d6c386a6 100644 > --- a/include/linux/remoteproc.h > +++ b/include/linux/remoteproc.h > @@ -382,7 +382,7 @@ struct rproc_ops { > struct rproc *rproc, const struct firmware *fw); > int (*load)(struct rproc *rproc, const struct firmware *fw); > int (*sanity_check)(struct rproc *rproc, const struct firmware *fw); > - u32 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw); > + u64 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw); > }; > > /** > @@ -498,7 +498,7 @@ struct rproc { > int num_traces; > struct list_head carveouts; > struct list_head mappings; > - u32 bootaddr; > + u64 bootaddr; > struct list_head rvdevs; > struct list_head subdevs; > struct idr notifyids; > -- > 2.15.0.276.g89ea799 >