um: Some minor cleanups
Subsystems (2)
cover um: Some minor cleanups
Tiwei Bie (9):
um: Mark parse_host_cpu_flags as __init
um: Mark parse_cache_line as __init
um: Mark get_top_address as __init
um: Mark set_stklim as __init
um: Mark install_fatal_handler as __init
um: Mark setup_env_path as __init
um: Remove unused PGD_BOUND macro
um: Remove unused THREAD_NAME_LEN macro
um: Remove unused user_context function
arch/um/kernel/process.c | 8 -------- arch/um/kernel/um_arch.c | 7 ++++--- arch/um/os-Linux/main.c | 8 +++----- arch/x86/um/shared/sysdep/ptrace.h | 2 -- 4 files changed, 7 insertions(+), 18 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/9 um: Mark parse_host_cpu_flags as __init
It's only invoked during boot from get_host_cpu_features().
--- arch/um/kernel/um_arch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/kernel/um_arch.c +1 -1
@@ -264,7 +264,7 @@ EXPORT_SYMBOL(end_iomem);#define MIN_VMALLOC (32 * 1024 * 1024) -static void parse_host_cpu_flags (char *line) +static void __init parse_host_cpu_flags (char *line) {int i;for (i =0 ; i <32 *NCAPINTS ; i++) {
Signature · 1 line
2.34.1
PATCH 2/9 um: Mark parse_cache_line as __init
In reply to Tiwei BieIt's only invoked during boot from get_host_cpu_features().
--- arch/um/kernel/um_arch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/um/kernel/um_arch.c +2 -1
@@ -272,7 +272,8 @@ static void __init parse_host_cpu_flags(char *line)set_cpu_cap (&boot_cpu_data, i); } } -static void parse_cache_line (char *line) + +static void __init parse_cache_line (char *line) {long res;char *to_parse =strstr (line,":" );
Signature · 1 line
2.34.1
PATCH 3/9 um: Mark get_top_address as __init
In reply to Tiwei BieIt's only invoked during boot from linux_main().
--- arch/um/kernel/um_arch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/kernel/um_arch.c +1 -1
@@ -289,7 +289,7 @@ static void __init parse_cache_line(char *line) } } -static unsigned long get_top_address (char **envp) +static unsigned long __init get_top_address (char **envp) {unsigned long top_addr = (unsigned long ) &top_addr;int i;
Signature · 1 line
2.34.1
PATCH 4/9 um: Mark set_stklim as __init
In reply to Tiwei BieIt's only invoked during boot from main().
--- arch/um/os-Linux/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/os-Linux/main.c +1 -1
@@ -25,7 +25,7 @@long elf_aux_hwcap; -static void set_stklim (void ) +static void __init set_stklim (void ) {struct rlimit lim;
Signature · 1 line
2.34.1
PATCH 5/9 um: Mark install_fatal_handler as __init
In reply to Tiwei BieIt's only invoked during boot from main().
--- arch/um/os-Linux/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/os-Linux/main.c +1 -1
@@ -48,7 +48,7 @@ static void last_ditch_exit(int sig)exit (1 ); } -static void install_fatal_handler (int sig) +static void __init install_fatal_handler (int sig) {struct sigaction action;
Signature · 1 line
2.34.1
PATCH 6/9 um: Mark setup_env_path as __init
In reply to Tiwei BieIt's only invoked during boot from main().
--- arch/um/os-Linux/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/os-Linux/main.c +1 -1
@@ -73,7 +73,7 @@ static void __init install_fatal_handler(int sig)#define UML_LIB_PATH ":" OS_LIB_PATH "/uml" -static void setup_env_path (void ) +static void __init setup_env_path (void ) {char *new_path =NULL ;char *old_path =NULL ;
Signature · 1 line
2.34.1
PATCH 7/9 um: Remove unused PGD_BOUND macro
In reply to Tiwei BieIt's no longer used since commit 11100b1dfb6e ("uml: delete unused code").
--- arch/um/os-Linux/main.c | 1 - 1 file changed, 1 deletion(-)
arch/um/os-Linux/main.c +0 -1
@@ -19,7 +19,6 @@#include <um_malloc.h> #include "internal.h" -#define PGD_BOUND (4 * 1024 * 1024)#define STACKSIZE (8 * 1024 * 1024)#define THREAD_NAME_LEN (256)
Signature · 1 line
2.34.1
PATCH 8/9 um: Remove unused THREAD_NAME_LEN macro
In reply to Tiwei BieIt's no longer used since commit 42fda66387da ("uml: throw out CONFIG_MODE_TT").
--- arch/um/os-Linux/main.c | 1 - 1 file changed, 1 deletion(-)
arch/um/os-Linux/main.c +0 -1
@@ -20,7 +20,6 @@#include "internal.h" #define STACKSIZE (8 * 1024 * 1024) -#define THREAD_NAME_LEN (256)long elf_aux_hwcap;
Signature · 1 line
2.34.1
PATCH 9/9 um: Remove unused user_context function
In reply to Tiwei BieIt's no longer used since commit 6aa802ce6acc ("uml: throw out CHOOSE_MODE").
--- arch/um/kernel/process.c | 8 -------- arch/x86/um/shared/sysdep/ptrace.h | 2 -- 2 files changed, 10 deletions(-)
arch/um/kernel/process.c +0 -8
@@ -213,14 +213,6 @@ int __uml_cant_sleep(void) {/* Is in_interrupt() really needed? */ } -int user_context (unsigned long sp) -{ -unsigned long stack; - - stack = sp & (PAGE_MASK <<CONFIG_KERNEL_STACK_ORDER ); -return stack != (unsigned long )current_thread_info (); -} -extern exitcall_t __uml_exitcall_begin, __uml_exitcall_end;void do_uml_exitcalls (void )
arch/x86/um/shared/sysdep/ptrace.h +0 -2
@@ -74,8 +74,6 @@ struct uml_pt_regs {#define UPT_FAULTINFO (r) (&(r)->faultinfo)#define UPT_IS_USER (r) ((r)->is_user) -extern int user_context (unsigned long sp); -extern int arch_init_registers (int pid);#endif /* __SYSDEP_X86_PTRACE_H */
Signature · 1 line
2.34.1