diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-22 17:06:37 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-22 17:06:37 -0400 |
| commit | 45b74a65b9934d5e1520d97aa4e09cf2b8c69ac0 (patch) | |
| tree | 7c451271a6c274da9b7f37fcb2592d4cfc972644 | |
| parent | 433bcf67370bc170a345634aa1be4ee8ac905de9 (diff) | |
| parent | dbf2a4b1ffab2867505be3b24221d5efa2200c91 (diff) | |
Merge branch 'parisc-4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull more parisc updates from Helge Deller:
- fix boot failure of 64-bit kernel. It got broken by the unwind
optimization commit in merge window.
- fix 64-bit userspace support (static 64-bit applications only, e.g.
we don't yet have 64-bit userspace support in glibc).
- consolidate unwind initialization code.
- add machine model description to stack trace.
* 'parisc-4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Add hardware description to stack traces
parisc: Fix boot failure of 64-bit kernel
parisc: Consolidate unwind initialization calls
parisc: Update comments in syscall.S regarding wide userland
parisc: Fix ptraced 64-bit applications to call 64-bit syscalls
parisc: Restore possibility to execute 64-bit applications
| -rw-r--r-- | arch/parisc/include/asm/elf.h | 9 | ||||
| -rw-r--r-- | arch/parisc/include/asm/linkage.h | 9 | ||||
| -rw-r--r-- | arch/parisc/include/asm/processor.h | 6 | ||||
| -rw-r--r-- | arch/parisc/include/asm/traps.h | 4 | ||||
| -rw-r--r-- | arch/parisc/include/asm/unwind.h | 6 | ||||
| -rw-r--r-- | arch/parisc/kernel/entry.S | 79 | ||||
| -rw-r--r-- | arch/parisc/kernel/processor.c | 2 | ||||
| -rw-r--r-- | arch/parisc/kernel/stacktrace.c | 15 | ||||
| -rw-r--r-- | arch/parisc/kernel/sys_parisc.c | 5 | ||||
| -rw-r--r-- | arch/parisc/kernel/syscall.S | 35 | ||||
| -rw-r--r-- | arch/parisc/kernel/traps.c | 37 | ||||
| -rw-r--r-- | arch/parisc/kernel/unwind.c | 43 |
12 files changed, 113 insertions, 137 deletions
diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h index f019d3ec0c1c..d00973aab7f1 100644 --- a/arch/parisc/include/asm/elf.h +++ b/arch/parisc/include/asm/elf.h | |||
| @@ -235,6 +235,7 @@ typedef unsigned long elf_greg_t; | |||
| 235 | #define SET_PERSONALITY(ex) \ | 235 | #define SET_PERSONALITY(ex) \ |
| 236 | ({ \ | 236 | ({ \ |
| 237 | set_personality((current->personality & ~PER_MASK) | PER_LINUX); \ | 237 | set_personality((current->personality & ~PER_MASK) | PER_LINUX); \ |
| 238 | clear_thread_flag(TIF_32BIT); \ | ||
| 238 | current->thread.map_base = DEFAULT_MAP_BASE; \ | 239 | current->thread.map_base = DEFAULT_MAP_BASE; \ |
| 239 | current->thread.task_size = DEFAULT_TASK_SIZE; \ | 240 | current->thread.task_size = DEFAULT_TASK_SIZE; \ |
| 240 | }) | 241 | }) |
| @@ -243,9 +244,11 @@ typedef unsigned long elf_greg_t; | |||
| 243 | 244 | ||
| 244 | #define COMPAT_SET_PERSONALITY(ex) \ | 245 | #define COMPAT_SET_PERSONALITY(ex) \ |
| 245 | ({ \ | 246 | ({ \ |
| 246 | set_thread_flag(TIF_32BIT); \ | 247 | if ((ex).e_ident[EI_CLASS] == ELFCLASS32) { \ |
| 247 | current->thread.map_base = DEFAULT_MAP_BASE32; \ | 248 | set_thread_flag(TIF_32BIT); \ |
| 248 | current->thread.task_size = DEFAULT_TASK_SIZE32; \ | 249 | current->thread.map_base = DEFAULT_MAP_BASE32; \ |
| 250 | current->thread.task_size = DEFAULT_TASK_SIZE32; \ | ||
| 251 | } else clear_thread_flag(TIF_32BIT); \ | ||
| 249 | }) | 252 | }) |
| 250 | 253 | ||
| 251 | /* | 254 | /* |
diff --git a/arch/parisc/include/asm/linkage.h b/arch/parisc/include/asm/linkage.h index 49f6f3d772cc..cd6fe4febead 100644 --- a/arch/parisc/include/asm/linkage.h +++ b/arch/parisc/include/asm/linkage.h | |||
| @@ -22,15 +22,6 @@ | |||
| 22 | name: ASM_NL\ | 22 | name: ASM_NL\ |
| 23 | .export name | 23 | .export name |
| 24 | 24 | ||
| 25 | #ifdef CONFIG_64BIT | ||
| 26 | #define ENDPROC(name) \ | ||
| 27 | END(name) | ||
| 28 | #else | ||
| 29 | #define ENDPROC(name) \ | ||
| 30 | .type name, @function !\ | ||
| 31 | END(name) | ||
| 32 | #endif | ||
| 33 | |||
| 34 | #define ENTRY_CFI(name, ...) \ | 25 | #define ENTRY_CFI(name, ...) \ |
| 35 | ENTRY(name) ASM_NL\ | 26 | ENTRY(name) ASM_NL\ |
| 36 | .proc ASM_NL\ | 27 | .proc ASM_NL\ |
diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h index 2dbe5580a1a4..2bd5e695bdad 100644 --- a/arch/parisc/include/asm/processor.h +++ b/arch/parisc/include/asm/processor.h | |||
| @@ -256,11 +256,7 @@ on downward growing arches, it looks like this: | |||
| 256 | * it in here from the current->personality | 256 | * it in here from the current->personality |
| 257 | */ | 257 | */ |
| 258 | 258 | ||
| 259 | #ifdef CONFIG_64BIT | 259 | #define USER_WIDE_MODE (!is_32bit_task()) |
| 260 | #define USER_WIDE_MODE (!test_thread_flag(TIF_32BIT)) | ||
| 261 | #else | ||
| 262 | #define USER_WIDE_MODE 0 | ||
| 263 | #endif | ||
| 264 | 260 | ||
| 265 | #define start_thread(regs, new_pc, new_sp) do { \ | 261 | #define start_thread(regs, new_pc, new_sp) do { \ |
| 266 | elf_addr_t *sp = (elf_addr_t *)new_sp; \ | 262 | elf_addr_t *sp = (elf_addr_t *)new_sp; \ |
diff --git a/arch/parisc/include/asm/traps.h b/arch/parisc/include/asm/traps.h index e00013248907..8ecc1f0c0483 100644 --- a/arch/parisc/include/asm/traps.h +++ b/arch/parisc/include/asm/traps.h | |||
| @@ -2,7 +2,9 @@ | |||
| 2 | #ifndef __ASM_TRAPS_H | 2 | #ifndef __ASM_TRAPS_H |
| 3 | #define __ASM_TRAPS_H | 3 | #define __ASM_TRAPS_H |
| 4 | 4 | ||
| 5 | #ifdef __KERNEL__ | 5 | #define PARISC_ITLB_TRAP 6 /* defined by architecture. Do not change. */ |
| 6 | |||
| 7 | #if !defined(__ASSEMBLY__) | ||
| 6 | struct pt_regs; | 8 | struct pt_regs; |
| 7 | 9 | ||
| 8 | /* traps.c */ | 10 | /* traps.c */ |
diff --git a/arch/parisc/include/asm/unwind.h b/arch/parisc/include/asm/unwind.h index f133b7efbebb..9547e5261a8b 100644 --- a/arch/parisc/include/asm/unwind.h +++ b/arch/parisc/include/asm/unwind.h | |||
| @@ -73,8 +73,10 @@ unwind_table_remove(struct unwind_table *table); | |||
| 73 | 73 | ||
| 74 | void unwind_frame_init(struct unwind_frame_info *info, struct task_struct *t, | 74 | void unwind_frame_init(struct unwind_frame_info *info, struct task_struct *t, |
| 75 | struct pt_regs *regs); | 75 | struct pt_regs *regs); |
| 76 | void unwind_frame_init_from_blocked_task(struct unwind_frame_info *info, struct task_struct *t); | 76 | void unwind_frame_init_from_blocked_task(struct unwind_frame_info *info, |
| 77 | void unwind_frame_init_running(struct unwind_frame_info *info, struct pt_regs *regs); | 77 | struct task_struct *t); |
| 78 | void unwind_frame_init_task(struct unwind_frame_info *info, | ||
| 79 | struct task_struct *task, struct pt_regs *regs); | ||
| 78 | int unwind_once(struct unwind_frame_info *info); | 80 | int unwind_once(struct unwind_frame_info *info); |
| 79 | int unwind_to_user(struct unwind_frame_info *info); | 81 | int unwind_to_user(struct unwind_frame_info *info); |
| 80 | 82 | ||
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index c7508f5717fb..242c5ab65611 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <asm/signal.h> | 36 | #include <asm/signal.h> |
| 37 | #include <asm/unistd.h> | 37 | #include <asm/unistd.h> |
| 38 | #include <asm/ldcw.h> | 38 | #include <asm/ldcw.h> |
| 39 | #include <asm/traps.h> | ||
| 39 | #include <asm/thread_info.h> | 40 | #include <asm/thread_info.h> |
| 40 | 41 | ||
| 41 | #include <linux/linkage.h> | 42 | #include <linux/linkage.h> |
| @@ -692,7 +693,7 @@ ENTRY(fault_vector_20) | |||
| 692 | def 3 | 693 | def 3 |
| 693 | extint 4 | 694 | extint 4 |
| 694 | def 5 | 695 | def 5 |
| 695 | itlb_20 6 | 696 | itlb_20 PARISC_ITLB_TRAP |
| 696 | def 7 | 697 | def 7 |
| 697 | def 8 | 698 | def 8 |
| 698 | def 9 | 699 | def 9 |
| @@ -735,7 +736,7 @@ ENTRY(fault_vector_11) | |||
| 735 | def 3 | 736 | def 3 |
| 736 | extint 4 | 737 | extint 4 |
| 737 | def 5 | 738 | def 5 |
| 738 | itlb_11 6 | 739 | itlb_11 PARISC_ITLB_TRAP |
| 739 | def 7 | 740 | def 7 |
| 740 | def 8 | 741 | def 8 |
| 741 | def 9 | 742 | def 9 |
| @@ -776,7 +777,7 @@ END(fault_vector_11) | |||
| 776 | * copy_thread moved args into task save area. | 777 | * copy_thread moved args into task save area. |
| 777 | */ | 778 | */ |
| 778 | 779 | ||
| 779 | ENTRY_CFI(ret_from_kernel_thread) | 780 | ENTRY(ret_from_kernel_thread) |
| 780 | /* Call schedule_tail first though */ | 781 | /* Call schedule_tail first though */ |
| 781 | BL schedule_tail, %r2 | 782 | BL schedule_tail, %r2 |
| 782 | nop | 783 | nop |
| @@ -791,7 +792,7 @@ ENTRY_CFI(ret_from_kernel_thread) | |||
| 791 | copy %r31, %r2 | 792 | copy %r31, %r2 |
| 792 | b finish_child_return | 793 | b finish_child_return |
| 793 | nop | 794 | nop |
| 794 | ENDPROC_CFI(ret_from_kernel_thread) | 795 | END(ret_from_kernel_thread) |
| 795 | 796 | ||
| 796 | 797 | ||
| 797 | /* | 798 | /* |
| @@ -815,9 +816,8 @@ ENTRY_CFI(_switch_to) | |||
| 815 | LDREG TASK_THREAD_INFO(%r25), %r25 | 816 | LDREG TASK_THREAD_INFO(%r25), %r25 |
| 816 | bv %r0(%r2) | 817 | bv %r0(%r2) |
| 817 | mtctl %r25,%cr30 | 818 | mtctl %r25,%cr30 |
| 818 | ENDPROC_CFI(_switch_to) | ||
| 819 | 819 | ||
| 820 | ENTRY_CFI(_switch_to_ret) | 820 | ENTRY(_switch_to_ret) |
| 821 | mtctl %r0, %cr0 /* Needed for single stepping */ | 821 | mtctl %r0, %cr0 /* Needed for single stepping */ |
| 822 | callee_rest | 822 | callee_rest |
| 823 | callee_rest_float | 823 | callee_rest_float |
| @@ -825,7 +825,7 @@ ENTRY_CFI(_switch_to_ret) | |||
| 825 | LDREG -RP_OFFSET(%r30), %r2 | 825 | LDREG -RP_OFFSET(%r30), %r2 |
| 826 | bv %r0(%r2) | 826 | bv %r0(%r2) |
| 827 | copy %r26, %r28 | 827 | copy %r26, %r28 |
| 828 | ENDPROC_CFI(_switch_to_ret) | 828 | ENDPROC_CFI(_switch_to) |
| 829 | 829 | ||
| 830 | /* | 830 | /* |
| 831 | * Common rfi return path for interruptions, kernel execve, and | 831 | * Common rfi return path for interruptions, kernel execve, and |
| @@ -886,14 +886,12 @@ ENTRY_CFI(syscall_exit_rfi) | |||
| 886 | STREG %r19,PT_SR5(%r16) | 886 | STREG %r19,PT_SR5(%r16) |
| 887 | STREG %r19,PT_SR6(%r16) | 887 | STREG %r19,PT_SR6(%r16) |
| 888 | STREG %r19,PT_SR7(%r16) | 888 | STREG %r19,PT_SR7(%r16) |
| 889 | ENDPROC_CFI(syscall_exit_rfi) | ||
| 890 | |||
