From patchwork Mon Jan 21 07:34:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pi-Hsun Shih X-Patchwork-Id: 10772683 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E120513B4 for ; Mon, 21 Jan 2019 07:34:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C09D520415 for ; Mon, 21 Jan 2019 07:34:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B125329B89; Mon, 21 Jan 2019 07:34:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A94420415 for ; Mon, 21 Jan 2019 07:34:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728126AbfAUHeQ (ORCPT ); Mon, 21 Jan 2019 02:34:16 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38562 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727137AbfAUHeP (ORCPT ); Mon, 21 Jan 2019 02:34:15 -0500 Received: by mail-pl1-f196.google.com with SMTP id e5so9389309plb.5 for ; Sun, 20 Jan 2019 23:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kvMKzn4llhsAXCz7nClSb99WoKQyMTJND7jRr4yO2iA=; b=nOxgppnbpHw50AVMZDSmtm88nYauhe/jyJcoo16iiXD7iNhca6GM6mNI2OQfOgZJM5 07moG3u2Ap52DonJmLUMmAl1T9jVXaenWMCijenreumSR8uRWlA5dpuao9pGU4C69II6 OAPZ1h6OsAFw0NoI9VbJPB4yJbN8sQjt5ThPE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kvMKzn4llhsAXCz7nClSb99WoKQyMTJND7jRr4yO2iA=; b=pXrf7q8AyY2ZyaitiuPqPsOGHZa++xjtH2T7/l+76uxxCPTCb29PjrBBluKZwNP1tJ 5bA6xSwSdMbzX3go56RuSupAaqooJhDNTpWgEXasiQmZDFaYcb5bho5Jm2t7fTQvPZoZ JA/jNMAirRhj5YuQy8CfWUu/flvO5Ti5PUWlH01Niu72fmcB0ewgBJvp1In1DDUYXl0p Ixh/Ore6bHr4ClPLLPsjANw1I3CiKup3GhOD8sVf2iwWQ4XSYAlXc143+1HtwZflRKg8 OadDZlzaWRKQH0Yz81miNo9HK7locFQOlldEFR8Di1lxrgeCH75mvgNzuOpSCcJXsDnX b1GQ== X-Gm-Message-State: AJcUuke8e4zKe7YpgHxLFoluyluyitZS1+kQ/rZ9C9L01SBjYZ2NW4M7 goL2xDeHqmDOiT6k/ubTDQ/zRrUHzjog1Q== X-Google-Smtp-Source: ALg8bN7Ts/JgTi7B8Nb2cXk7y524UViJHL1pgAqv+4LF/3R8UE8zTOP7O8CqUFYqRNGgb15KG6rO+w== X-Received: by 2002:a17:902:5066:: with SMTP id f35mr29208580plh.78.1548056054979; Sun, 20 Jan 2019 23:34:14 -0800 (PST) Received: from pihsun-z840.tpe.corp.google.com ([2401:fa00:1:10:7889:7a43:f899:134c]) by smtp.googlemail.com with ESMTPSA id r6sm19483243pgk.91.2019.01.20.23.34.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Jan 2019 23:34:14 -0800 (PST) From: Pi-Hsun Shih Cc: Pi-Hsun Shih , Ohad Ben-Cohen , Bjorn Andersson , linux-remoteproc@vger.kernel.org (open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] remoteproc: Add __iomem to return of rproc_da_to_va. Date: Mon, 21 Jan 2019 15:34:07 +0800 Message-Id: <20190121073408.56557-1-pihsun@chromium.org> X-Mailer: git-send-email 2.20.1.321.g9e740568ce-goog MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The return value of rproc_da_to_va would probably be device memory. Add __iomem annotation to it. Signed-off-by: Pi-Hsun Shih --- I feel that there might be more things that need to be changed (especially for the carveouts things). I didn't change them since I don't know how to test that part. Comments needed. --- drivers/remoteproc/remoteproc_core.c | 4 ++-- drivers/remoteproc/remoteproc_internal.h | 2 +- include/linux/remoteproc.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 54ec38fc5dca62..7cb8393e1b39f6 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -190,10 +190,10 @@ static phys_addr_t rproc_va_to_pa(void *cpu_addr) * here the output of the DMA API for the carveouts, which should be more * correct. */ -void *rproc_da_to_va(struct rproc *rproc, u64 da, int len) +void __iomem *rproc_da_to_va(struct rproc *rproc, u64 da, int len) { struct rproc_mem_entry *carveout; - void *ptr = NULL; + void __iomem *ptr = NULL; if (rproc->ops->da_to_va) { ptr = rproc->ops->da_to_va(rproc, da, len); diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index f6cad243d7cac9..df7abe049cdef2 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -51,7 +51,7 @@ void rproc_exit_sysfs(void); void rproc_free_vring(struct rproc_vring *rvring); int rproc_alloc_vring(struct rproc_vdev *rvdev, int i); -void *rproc_da_to_va(struct rproc *rproc, u64 da, int len); +void __iomem *rproc_da_to_va(struct rproc *rproc, u64 da, int len); int rproc_trigger_recovery(struct rproc *rproc); int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw); diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 68e72f33c705e1..065a68a5e6e577 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -356,7 +356,7 @@ struct rproc_ops { int (*start)(struct rproc *rproc); int (*stop)(struct rproc *rproc); void (*kick)(struct rproc *rproc, int vqid); - void * (*da_to_va)(struct rproc *rproc, u64 da, int len); + void __iomem *(*da_to_va)(struct rproc *rproc, u64 da, int len); int (*parse_fw)(struct rproc *rproc, const struct firmware *fw); struct resource_table *(*find_loaded_rsc_table)( struct rproc *rproc, const struct firmware *fw);