linux/arch/microblaze
Linus Walleij 0d2b49479b microblaze: Make virt_to_pfn() a static inline
Making virt_to_pfn() a static inline taking a strongly typed
(const void *) makes the contract of a passing a pointer of that
type to the function explicit and exposes any misuse of the
macro virt_to_pfn() acting polymorphic and accepting many types
such as (void *), (unitptr_t) or (unsigned long) as arguments
without warnings.

Move the function down in the file so __pa() exists in our
scope, and it compiles. This in turn requires moving __pa()
as it depends on __virt_to_phys() that was below. (Lazy macro
evaluation conflicts with strict function ordering.)

Make a symmetric change to pfn_to_virt() so we have type
checking both ways.

Due to this the <asm/page.h> file being included into some
assembly files, some further inclusion guards are needed
to make sure assembly keeps compiling.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230808-virt-to-phys-microblaze-v1-1-e6df710fe0a1@linaro.org
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-08-23 09:35:22 +02:00
..
boot kbuild: unify cmd_copy and cmd_shipped 2022-02-14 10:37:32 +09:00
configs mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED 2023-05-26 19:01:47 +02:00
include microblaze: Make virt_to_pfn() a static inline 2023-08-23 09:35:22 +02:00
kernel microblaze: Explicitly include correct DT includes 2023-07-17 08:22:42 +02:00
lib microblaze: fix typos in comments 2022-05-02 08:36:10 +02:00
mm microblaze: Remove zalloc_maybe_bootmem() 2023-08-23 09:35:22 +02:00
pci microblaze/PCI: Moving PCI iounmap and dependent code 2022-11-25 11:39:23 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig Kconfig: introduce HAS_IOPORT option and select it as necessary 2023-04-05 22:15:19 +02:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Kconfig.platform docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
Makefile kbuild: fix "cat: .version: No such file or directory" 2022-11-24 09:26:02 +09:00