Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2780614ybh; Mon, 9 Mar 2020 12:53:25 -0700 (PDT) X-Google-Smtp-Source: ADFU+vueWJboioYTEeynZ4HLSKUTBv5PjVLP8ssRvi7CtJY33opI01lrjI4Drovq7rs/C7Tc91sC X-Received: by 2002:a54:410e:: with SMTP id l14mr25389oic.42.1583783605215; Mon, 09 Mar 2020 12:53:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583783605; cv=none; d=google.com; s=arc-20160816; b=XsL3E7ckfDvBTst6oxSuuePOhRlZrQinGeZV3vl4qRVEaOkcbSUEndhmDQYnXK2RSQ 8xyXr0O4tyJqAKKSmdNlR/20iQ1vzuzCQSCiVy+jIE3V8D32Cenm1mMGyaR41o5W2WFD IKL884K4YrQvOHDmGjNtysB4wzPZOgTWKirC1VtQnX9f/PiFySOJZgofs2g6yJE6bTE8 R/GuSg9sTujAtkXZsN/ahq2P8lOjo5cHziTvrjY2Dw4Rx5inJdfV5aAIutU7nmjhiz/F ZDyoCQR4+Oy0JnDrIQtlZI9NyYkPXwWdzHrmtH/8ahP6BC8SjkrwY38eO7AuBj1l35bP zYYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Z6CzFVUTmbba/AoB85RS3nr6uH+MlqeQEe/r4/Zh99Y=; b=i4RnF7IUB+W5/MEWv9V/8WrL/sKgYDaP2BKWMLTlMQAZpJI356nRwoKCM7kmk+xNWb z7xrAuq0iPWIQqVi2fO5HXnP+CHK+HNgXiJlwNEntN6cYGaBWgnbX15zNRXZvGLC4I69 vYZGQNPjhCm/RnJ1HFLYGOTJ8grF9zdChGdSIzPA4dp4Zy1Vgu+dE4r/Z++s8xA8tblX vTpFCq5SLAiQpXG3dzG3dF6IjtxQxchfzyIH185T7ZiJSK/gay1ULR2D0FmUZrood/lJ c/shEENQSqNES2XWgeUFoULWPbIw01XzTTu31034xR4AMLrutw9bk86dJKkCfVOmg0Ng 3z+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wDLkXcCb; 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 i124si2740127oib.172.2020.03.09.12.53.12; Mon, 09 Mar 2020 12:53:25 -0700 (PDT) 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=wDLkXcCb; 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 S1726415AbgCITww (ORCPT + 99 others); Mon, 9 Mar 2020 15:52:52 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:37288 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725992AbgCITww (ORCPT ); Mon, 9 Mar 2020 15:52:52 -0400 Received: by mail-pf1-f194.google.com with SMTP id p14so5313245pfn.4 for ; Mon, 09 Mar 2020 12:52:51 -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:user-agent; bh=Z6CzFVUTmbba/AoB85RS3nr6uH+MlqeQEe/r4/Zh99Y=; b=wDLkXcCbKfKQ/LaQ5JGk5OZxyZO0H8nu//+GoeXir5ZiBfMnciqCXYux/Vo34z4LmU Fy8MlfSucuT3hu0Omzu6/gRcWm5AvUkPq6LbBftR/hYYC+jXHJEF2WxlSZ7RWplDkcXi GddHkakFvne0aQuHyp2kJ1WIYU9xNMMG7IMNTUmSVOoM9wnf2sTxT+0gRYfKWHEuLI+s y+7jWnzY6CwjezEo6zFvqwWO60jVqzgyT+caE60jXlyfuYxeRe0HCLlWPeceIIAXaAXq M5XHHt3Km4pVGbRBbYKUsc80Vo69UevSO0VutCg8Dy4Kn+O4y26Xjg/GeGlYFvGm/5Ar 3Lsw== 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:user-agent; bh=Z6CzFVUTmbba/AoB85RS3nr6uH+MlqeQEe/r4/Zh99Y=; b=rEPPL/gfzKle888Iu9VUnxQqW0d/6cCTZtwTVfy8o0pXqUzyvjzE5Tf2jXr++tXcd+ dxHhJcevY+DX6uoF/McQXx9Q9FKP+ToXt4zqA4r01hBhcT8Y4FVA4m8dtPBC6u9OD0HK HWSgjS+4vK01FIE9b9SpesYv6bFl0J+IM7XupR7zYo55gTp86uX5jreCf+zliN+1q6LH 1qmHvsnBZ7oNNCujHsM17ModKsYYfPp8aj4e/6sfhMHnyh1QcjCc5Gi2HEfQTBop6x6m Ae/3FdYyHw83gp2AWXWIEcTJlz/h1LfaqtFF2+TMYyIL5w+YKnrQh163sl8FCymWR819 tr9A== X-Gm-Message-State: ANhLgQ3eD9vN13fikiGkpKlJmCzmx8cmj/X0cQ6gbshw7s8uontAC4wf 2cFazfNjgV2lc0VncCIWPfW7xw== X-Received: by 2002:aa7:953b:: with SMTP id c27mr5965025pfp.201.1583783570743; Mon, 09 Mar 2020 12:52:50 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id c17sm24619108pfo.71.2020.03.09.12.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 12:52:50 -0700 (PDT) Date: Mon, 9 Mar 2020 13:52:47 -0600 From: Mathieu Poirier To: Clement Leger Cc: Ohad Ben-Cohen , Bjorn Andersson , 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 Subject: Re: [PATCH v5 3/8] remoteproc: Use u64 type for boot_addr Message-ID: <20200309195247.GC1399@xps15> 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> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 02, 2020 at 10:38:57AM +0100, 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 > --- > 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, The return type of function rproc_get_boot_addr() should also be changed from u32 to u64. Or perhaps this is intentional to make sure rproc->bootaddr never occupies more than 32bit? > 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 >