Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2090890ybf; Mon, 2 Mar 2020 01:41:04 -0800 (PST) X-Google-Smtp-Source: APXvYqzC552EApIzUnoOoVu3RQFX+T6OyQPU7r4nlJ1ID0vWUfRXH3gEb/51gr0iI4zvZvC7HdTK X-Received: by 2002:a54:450d:: with SMTP id l13mr11214834oil.117.1583142063914; Mon, 02 Mar 2020 01:41:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583142063; cv=none; d=google.com; s=arc-20160816; b=j4++uaLztlYEIekLbVNAHNEPm64d/g5UBixgMlQVF+tdfsHQLeoREDud+hWYWyV8Xr zSqpYmgQGBx8bYXHUo049/1Wl6i2Fe27rjjvvOcI9Vl1BR3jctygDLVZ+n2BMsMV37IK Jhu1Ow5itCFLM0CxOk+PKa0vCgOP+7NWsxYBA+OLXH+yaqa8gytR43nHSKi6Lz6SLgGq I7UMBr/ppzk7V5GG9eAl17HFo5xcN2EOA4a6d1TdoP9quuq3gFGL987LTNNo9LEO7Pqs 8qfYrPp5v9RLIfa9s7ZbdjLM0CJVrrOXAIZy3QXAwcghqKqoOfdGPi1bApMd3JyU3Vr4 0z+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=wIY25Crc9LNlgCWJ/g9uTJtUwJKBySkdrV50ZPWaKQw=; b=EdQM9KqVdEO2qNQZC+Ah7Mi3lWtTWB4O3ZKN3gacvE0IE2te7M90jzMKvF024db2vS HORkiyU4pLbv3n8TXaGRjWhe1DoBm32j6xkTcr550pAgg64H6FSTsHbwyEw79JfnmmB2 W1ndelo5dvlVwvqnPuUYN/hAS0BRb1wEkLJ/JLn6C3f37wRJpjHSD9OtVs0pK/k8RlnB EOVcpUUwtENqxbOAxBRxIKVjWEtaM6FUZMsSkOy48w40L0oFdOnuXWMBhuwhu3X6q7OI K5tE83DcK2XAZp0df7uyizCKvG3zMDm01+5IilQdIARuCJKTlOSH6nSyGCKdkBnlZxSc u4qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=hcE2+Cjz; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kalray.eu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z24si6020798otm.135.2020.03.02.01.40.52; Mon, 02 Mar 2020 01:41:03 -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=@kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=hcE2+Cjz; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kalray.eu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727577AbgCBJjQ (ORCPT + 99 others); Mon, 2 Mar 2020 04:39:16 -0500 Received: from zimbra2.kalray.eu ([92.103.151.219]:38024 "EHLO zimbra2.kalray.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727517AbgCBJjN (ORCPT ); Mon, 2 Mar 2020 04:39:13 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 2105627E079B; Mon, 2 Mar 2020 10:39:12 +0100 (CET) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id QN6dY6cKWBYg; Mon, 2 Mar 2020 10:39:11 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id B55A527E083D; Mon, 2 Mar 2020 10:39:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu B55A527E083D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1583141951; bh=wIY25Crc9LNlgCWJ/g9uTJtUwJKBySkdrV50ZPWaKQw=; h=From:To:Date:Message-Id; b=hcE2+CjzyAaP7LMPqH4hcIRUbl4L/Tm9o9kzTjsnbv6zQP5fUioM3DYN1kS2JjPH4 ihc0Aln5zA074cPRgD0mevfjvtkJV7ARSwyxju4YwYyGlxCjeVYZgfAjJQM1ngzV7Q YmvsDx+nBD52UUM4I4ZjJ5PZAGltvuN7KHVJUZDA= X-Virus-Scanned: amavisd-new at zimbra2.kalray.eu Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id MH7Z2boo6q1d; Mon, 2 Mar 2020 10:39:11 +0100 (CET) Received: from triton.lin.mbt.kalray.eu (unknown [192.168.37.25]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id 951B727E079B; Mon, 2 Mar 2020 10:39:11 +0100 (CET) From: Clement Leger To: Ohad Ben-Cohen , Bjorn Andersson , Jonathan Corbet , Shawn Guo , Sascha Hauer , linux-remoteproc@vger.kernel.org Cc: 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 , Clement Leger Subject: [PATCH v5 3/8] remoteproc: Use u64 type for boot_addr Date: Mon, 2 Mar 2020 10:38:57 +0100 Message-Id: <20200302093902.27849-4-cleger@kalray.eu> X-Mailer: git-send-email 2.15.0.276.g89ea799 In-Reply-To: <20200302093902.27849-1-cleger@kalray.eu> References: <20200210162209.23149-1-cleger@kalray.eu> <20200302093902.27849-1-cleger@kalray.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, 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