Rust for Linux List
 help / color / mirror / Atom feed
* `io{re,un}map()` build error in s390 under `!CONFIG_HAS_IOMEM`
@ 2026-08-03 18:09 Miguel Ojeda
  2026-08-03 19:56 ` Arnd Bergmann
  0 siblings, 1 reply; 16+ messages in thread
From: Miguel Ojeda @ 2026-08-03 18:09 UTC (permalink / raw)
  To: Danilo Krummrich, Alice Ryhl, Daniel Almeida, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Arnd Bergmann, Miguel Ojeda
  Cc: driver-core, Christian Borntraeger, Sven Schnelle, linux-s390,
	linux-arch, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Tamir Duberstein,
	Alexandre Courbot, Onur Özkan, rust-for-linux

Hi all,

s390 does not provide `ioremap()`/`iounmap()` under `!CONFIG_HAS_IOMEM`:

    In file included from rust/helpers/helpers.c:68:
    rust/helpers/io.c:8:9: error: call to undeclared function 'ioremap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        8 |         return ioremap(offset, size);
          |                ^
    rust/helpers/io.c:8:9: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'void *' [-Wint-conversion]
        8 |         return ioremap(offset, size);
          |                ^~~~~~~~~~~~~~~~~~~~~
    rust/helpers/io.c:19:2: error: call to undeclared function 'iounmap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
       19 |         iounmap(addr);
          |         ^
    ./arch/s390/include/asm/io.h:31:17: note: expanded from macro 'iounmap'
       31 | #define iounmap iounmap
          |                 ^
    rust/helpers/io.c:19:2: note: did you mean 'kunmap'?
    ./arch/s390/include/asm/io.h:31:17: note: expanded from macro 'iounmap'
       31 | #define iounmap iounmap
          |                 ^
    ./include/linux/highmem.h:46:20: note: 'kunmap' declared here
       46 | static inline void kunmap(const struct page *page);
          |                    ^

so e.g. an `allnoconfig` with Rust fails.

I assume we will need to `#ifdef` the helpers, plus the users; or stub
at some layer to avoid changing callers.

I hope that helps & thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-08-06 15:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 18:09 `io{re,un}map()` build error in s390 under `!CONFIG_HAS_IOMEM` Miguel Ojeda
2026-08-03 19:56 ` Arnd Bergmann
2026-08-03 20:09   ` Danilo Krummrich
2026-08-04  7:13     ` Heiko Carstens
2026-08-04 10:36       ` Arnd Bergmann
2026-08-04 11:10         ` Danilo Krummrich
2026-08-04 12:02           ` Arnd Bergmann
2026-08-04 12:26             ` Gary Guo
2026-08-05 15:08             ` Danilo Krummrich
2026-08-04 12:21         ` Niklas Schnelle
2026-08-04 15:52           ` Arnd Bergmann
2026-08-05 15:36             ` Niklas Schnelle
2026-08-05 15:56               ` Arnd Bergmann
2026-08-06 13:25                 ` Niklas Schnelle
2026-08-06 13:44                   ` Arnd Bergmann
2026-08-06 15:21                     ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox