linux/arch/sparc
Mike Rapoport (IBM) 12af2b83d0 mm: introduce execmem_alloc() and execmem_free()
module_alloc() is used everywhere as a mean to allocate memory for code.

Beside being semantically wrong, this unnecessarily ties all subsystems
that need to allocate code, such as ftrace, kprobes and BPF to modules and
puts the burden of code allocation to the modules code.

Several architectures override module_alloc() because of various
constraints where the executable memory can be located and this causes
additional obstacles for improvements of code allocation.

Start splitting code allocation from modules by introducing execmem_alloc()
and execmem_free() APIs.

Initially, execmem_alloc() is a wrapper for module_alloc() and
execmem_free() is a replacement of module_memfree() to allow updating all
call sites to use the new APIs.

Since architectures define different restrictions on placement,
permissions, alignment and other parameters for memory that can be used by
different subsystems that allocate executable memory, execmem_alloc() takes
a type argument, that will be used to identify the calling subsystem and to
allow architectures define parameters for ranges suitable for that
subsystem.

No functional changes.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
2024-05-14 00:31:43 -07:00
..
boot sparc: Use $(kecho) to announce kernel images being ready 2023-12-04 13:28:06 +01:00
configs arch/*/configs/*defconfig: Replace AUTOFS4_FS by AUTOFS_FS 2023-07-29 14:08:22 -07:00
crypto crypto: sparc/crc32c - stop using the shash alignmask 2023-10-27 18:04:24 +08:00
include sparc: simplify module_alloc() 2024-05-14 00:31:43 -07:00
kernel sparc: simplify module_alloc() 2024-05-14 00:31:43 -07:00
lib sparc32: add __cmpxchg_u{8,16}() and teach __cmpxchg() to handle those sizes 2024-04-09 22:06:00 -07:00
math-emu
mm This includes the following changes related to sparc for v6.9: 2024-03-15 12:47:21 -07:00
net mm: introduce execmem_alloc() and execmem_free() 2024-05-14 00:31:43 -07:00
power
prom arch: turn off -Werror for architectures with known warnings 2023-12-10 17:21:33 -08:00
vdso This includes the following changes related to sparc for v6.9: 2024-03-15 12:47:21 -07:00
video sparc: Fix undefined reference to fb_is_primary_device 2024-02-21 14:08:41 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig This includes the following changes related to sparc for v6.9: 2024-03-15 12:47:21 -07:00
Kconfig.debug sparc: select FRAME_POINTER instead of redefining it 2024-02-16 16:50:26 +01:00
Makefile sparc: Fix undefined reference to fb_is_primary_device 2024-02-21 14:08:41 +01:00