[PATCH 1/5] um: Make local functions and variables static

2024-01-23 Thread Tiwei Bie
This will also fix the warnings like: warning: no previous prototype for ‘fork_handler’ [-Wmissing-prototypes] 140 | void fork_handler(void) | ^~~~ Signed-off-by: Tiwei Bie --- arch/um/drivers/pcap_kern.c | 4 ++-- arch/um/drivers/ubd_user.c | 2 +

[PATCH 2/5] um: Fix the declaration of vfree

2024-01-23 Thread Tiwei Bie
The definition of vfree has changed since commit b3bdda02aa54 ("vmalloc: add const to void* parameters"). Update the declaration of vfree in um_malloc.h to match the latest definition. Signed-off-by: Tiwei Bie --- arch/um/include/shared/um_malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH 3/5] um: Remove unused functions

2024-01-23 Thread Tiwei Bie
These functions are not used anymore. Removing them will also address below -Wmissing-prototypes warnings: arch/um/kernel/process.c:51:5: warning: no previous prototype for ‘pid_to_processor_id’ [-Wmissing-prototypes] arch/um/kernel/process.c:253:5: warning: no previous prototype for ‘copy_to_us

[PATCH 4/5] um: Fix the return type of __switch_to

2024-01-23 Thread Tiwei Bie
Make it match the declaration in asm-generic/switch_to.h. And also include the header to allow the compiler to check it. Signed-off-by: Tiwei Bie --- arch/um/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c

[PATCH 0/5] um: Minor fixes and cleanups

2024-01-23 Thread Tiwei Bie
A series of minor fixes and cleanups for UML. Tiwei Bie (5): um: Make local functions and variables static um: Fix the declaration of vfree um: Remove unused functions um: Fix the return type of __switch_to um: Add missing headers arch/um/drivers/pcap_kern.c | 4 +-- arch

[PATCH 5/5] um: Add missing headers

2024-01-23 Thread Tiwei Bie
This will address below -Wmissing-prototypes warnings: arch/um/kernel/mem.c:202:8: warning: no previous prototype for ‘pgd_alloc’ [-Wmissing-prototypes] arch/um/kernel/mem.c:215:7: warning: no previous prototype for ‘uml_kmalloc’ [-Wmissing-prototypes] arch/um/kernel/process.c:207:6: warning: no

[PATCH 2/2] modpost: Add '.ltext' and '.ltext.*' to TEXT_SECTIONS

2024-01-23 Thread Nathan Chancellor
After the linked LLVM change, building ARCH=um defconfig results in a segmentation fault in modpost. Prior to commit a23e7584ecf3 ("modpost: unify 'sym' and 'to' in default_mismatch_handler()"), there was a warning: WARNING: modpost: vmlinux.o(__ex_table+0x88): Section mismatch in reference to

[PATCH 1/2] um: Fix adding '-no-pie' for clang

2024-01-23 Thread Nathan Chancellor
The kernel builds with -fno-PIE, so commit 883354afbc10 ("um: link vmlinux with -no-pie") added the compiler linker flag '-no-pie' via cc-option because '-no-pie' was only supported in GCC 6.1.0 and newer. While this works for GCC, this does not work for clang because cc-option uses '-c', which st

[PATCH 0/2] Fix UML build with clang-18 and newer

2024-01-23 Thread Nathan Chancellor
Hi all, This series resolves two independent but related issues that were recently exposed by two LLVM changes. https://github.com/llvm/llvm-project/commit/ec92d74a0ef89b9dd46aee6ec8aca6bfd3c66a54 exposes that '-no-pie' is not getting added to the linker flags with clang, resulting in building ob

Re: [PATCH 6/6] of: Add KUnit test to confirm DTB is loaded

2024-01-23 Thread David Gow
On Tue, 23 Jan 2024 at 06:48, Stephen Boyd wrote: > > Quoting David Gow (2024-01-15 21:03:12) > > On Sat, 13 Jan 2024 at 04:07, Stephen Boyd wrote: > > > > > > Add a KUnit test that confirms a DTB has been loaded, i.e. there is a > > > root node, and that the of_have_populated_dt() API works prop