From: Ben Levinsky <ben.levinsky@amd.com>
To: <andersson@kernel.org>, <mathieu.poirier@linaro.org>,
<linux-remoteproc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: <ben.levinsky@amd.com>, <tanmay.shah@amd.com>
Subject: [PATCH] remoteproc: guard wc-ioremap helpers with HAS_IOMEM
Date: Tue, 30 Jun 2026 10:40:56 -0700 [thread overview]
Message-ID: <20260630174056.667646-1-ben.levinsky@amd.com> (raw)
The common wc-ioremap carveout callbacks live in
remoteproc_internal.h, which is included by the remoteproc core.
This means the helper bodies are parsed even for builds that do not
enable any platform driver using those callbacks.
On s390, CONFIG_HAS_IOMEM and CONFIG_GENERIC_IOREMAP depend on
CONFIG_PCI. A randconfig with CONFIG_REMOTEPROC=y and CONFIG_PCI=n
therefore has no usable ioremap_wc() or iounmap() declarations, and
fails to build the common remoteproc objects with implicit declarations
from the helper bodies.
Only include linux/io.h and build the real wc-ioremap helpers when
CONFIG_HAS_IOMEM is enabled. Provide no-IOMEM stubs so the internal
header remains self-contained for randconfig and COMPILE_TEST coverage.
Fixes: 50227acbf4e5 ("remoteproc: Add common wc-ioremap carveout callbacks")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606301559.w8eorNQ2-lkp@intel.com/
Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h
index 02c00475b010..3a742ef6ef60 100644
--- a/drivers/remoteproc/remoteproc_internal.h
+++ b/drivers/remoteproc/remoteproc_internal.h
@@ -14,7 +14,9 @@
#include <linux/irqreturn.h>
#include <linux/firmware.h>
+#ifdef CONFIG_HAS_IOMEM
#include <linux/io.h>
+#endif
struct rproc;
@@ -123,6 +125,7 @@ rproc_find_carveout_by_name(struct rproc *rproc, const char *name, ...);
void rproc_add_rvdev(struct rproc *rproc, struct rproc_vdev *rvdev);
void rproc_remove_rvdev(struct rproc_vdev *rvdev);
+#ifdef CONFIG_HAS_IOMEM
static inline int rproc_mem_entry_ioremap_wc(struct rproc *rproc,
struct rproc_mem_entry *mem)
{
@@ -148,6 +151,19 @@ static inline int rproc_mem_entry_iounmap(struct rproc *rproc,
return 0;
}
+#else
+static inline int rproc_mem_entry_ioremap_wc(struct rproc *rproc,
+ struct rproc_mem_entry *mem)
+{
+ return -EOPNOTSUPP;
+}
+
+static inline int rproc_mem_entry_iounmap(struct rproc *rproc,
+ struct rproc_mem_entry *mem)
+{
+ return 0;
+}
+#endif
#define rproc_elf_load_rsc_table_optional(rproc, fw, dev_func, fmt, ...) \
({ \
--
2.34.1
next reply other threads:[~2026-06-30 17:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 17:40 Ben Levinsky [this message]
2026-07-01 15:21 ` [PATCH] remoteproc: guard wc-ioremap helpers with HAS_IOMEM Mathieu Poirier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260630174056.667646-1-ben.levinsky@amd.com \
--to=ben.levinsky@amd.com \
--cc=andersson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=tanmay.shah@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox