diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-13 13:20:02 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-13 13:20:02 -0400 |
| commit | ec059019b7e6ae3926a8e1dec02a62d64dd8c060 (patch) | |
| tree | ab60e0f2d21154dda05f58af310a66c94179d70a /arch/um | |
| parent | 1251704a631b62591ad1d1b6ead252e9e597d5f5 (diff) | |
| parent | ce4586063f1af780b1c6b7e344907e6f9c1ba59a (diff) | |
Merge branch 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML fixes from Richard Weinberger:
"No new stuff, just fixes"
* 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
um: Add missing NR_CPUS include
um: Fix to call read_initrd after init_bootmem
um: Include kbuild.h instead of duplicating its macros
um: Fix PTRACE_POKEUSER on x86_64
um: Set number of CPUs
um: Fix _print_addr()
Diffstat (limited to 'arch/um')
| -rw-r--r-- | arch/um/Kconfig.common | 5 | ||||
| -rw-r--r-- | arch/um/kernel/initrd.c | 4 | ||||
| -rw-r--r-- | arch/um/kernel/sysrq.c | 6 | ||||
| -rw-r--r-- | arch/um/kernel/um_arch.c | 6 | ||||
| -rw-r--r-- | arch/um/os-Linux/skas/process.c | 4 |
5 files changed, 15 insertions, 10 deletions
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common index ed9c5b5ff028..85f6dd204ab6 100644 --- a/arch/um/Kconfig.common +++ b/arch/um/Kconfig.common | |||
| @@ -57,3 +57,8 @@ config HZ | |||
| 57 | config SUBARCH | 57 | config SUBARCH |
| 58 | string | 58 | string |
| 59 | option env="SUBARCH" | 59 | option env="SUBARCH" |
| 60 | |||
| 61 | config NR_CPUS | ||
| 62 | int | ||
| 63 | range 1 1 | ||
| 64 | default 1 | ||
diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c index 48bae81f8dca..6f6e7896e53f 100644 --- a/arch/um/kernel/initrd.c +++ b/arch/um/kernel/initrd.c | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | static char *initrd __initdata = NULL; | 14 | static char *initrd __initdata = NULL; |
| 15 | static int load_initrd(char *filename, void *buf, int size); | 15 | static int load_initrd(char *filename, void *buf, int size); |
| 16 | 16 | ||
| 17 | static int __init read_initrd(void) | 17 | int __init read_initrd(void) |
| 18 | { | 18 | { |
| 19 | void *area; | 19 | void *area; |
| 20 | long long size; | 20 | long long size; |
| @@ -46,8 +46,6 @@ static int __init read_initrd(void) | |||
| 46 | return 0; | 46 | return 0; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | __uml_postsetup(read_initrd); | ||
| 50 | |||
| 51 | static int __init uml_initrd_setup(char *line, int *add) | 49 | static int __init uml_initrd_setup(char *line, int *add) |
| 52 | { | 50 | { |
| 53 | initrd = line; | 51 | initrd = line; |
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index a76295f7ede9..6b995e870d55 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c | |||
| @@ -20,10 +20,8 @@ | |||
| 20 | 20 | ||
| 21 | static void _print_addr(void *data, unsigned long address, int reliable) | 21 | static void _print_addr(void *data, unsigned long address, int reliable) |
| 22 | { | 22 | { |
| 23 | pr_info(" [<%08lx>]", address); | 23 | pr_info(" [<%08lx>] %s%pF\n", address, reliable ? "" : "? ", |
| 24 | pr_cont(" %s", reliable ? "" : "? "); | 24 | (void *)address); |
| 25 | print_symbol("%s", address); | ||
| 26 | pr_cont("\n"); | ||
| 27 | } | 25 | } |
| 28 | 26 | ||
| 29 | static const struct stacktrace_ops stackops = { | 27 | static const struct stacktrace_ops stackops = { |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 4b85acd4020c..64a1fd06f3fd 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
| @@ -338,11 +338,17 @@ int __init linux_main(int argc, char **argv) | |||
| 338 | return start_uml(); | 338 | return start_uml(); |
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | int __init __weak read_initrd(void) | ||
| 342 | { | ||
| 343 | return 0; | ||
| 344 | } | ||
| 345 | |||
| 341 | void __init setup_arch(char **cmdline_p) | 346 | void __init setup_arch(char **cmdline_p) |
| 342 | { | 347 | { |
| 343 | stack_protections((unsigned long) &init_thread_info); | 348 | stack_protections((unsigned long) &init_thread_info); |
| 344 | setup_physmem(uml_physmem, uml_reserved, physmem_size, highmem); | 349 | setup_physmem(uml_physmem, uml_reserved, physmem_size, highmem); |
| 345 | mem_total_pages(physmem_size, iomem_size, highmem); | 350 | mem_total_pages(physmem_size, iomem_size, highmem); |
| 351 | read_initrd(); | ||
| 346 | 352 | ||
| 347 | paging_init(); | 353 | paging_init(); |
| 348 | strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); | 354 | strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 23025d645160..03b3c4cc7735 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <registers.h> | 21 | #include <registers.h> |
| 22 | #include <skas.h> | 22 | #include <skas.h> |
| 23 | #include <sysdep/stub.h> | 23 | #include <sysdep/stub.h> |
| 24 | #include <linux/threads.h> | ||
| 24 | 25 | ||
| 25 | int is_skas_winch(int pid, int fd, void *data) | 26 | int is_skas_winch(int pid, int fd, void *data) |
| 26 | { | 27 | { |
| @@ -233,9 +234,6 @@ static int userspace_tramp(void *stack) | |||
| 233 | return 0; | 234 | return 0; |
| 234 | } | 235 | } |
| 235 | 236 | ||
| 236 | /* Each element set once, and only accessed by a single processor anyway */ | ||
| 237 | #undef NR_CPUS | ||
| 238 | #define NR_CPUS 1 | ||
| 239 | int userspace_pid[NR_CPUS]; | 237 | int userspace_pid[NR_CPUS]; |
| 240 | 238 | ||
| 241 | int start_userspace(unsigned long stub_stack) | 239 | int start_userspace(unsigned long stub_stack) |
