diff options
-rw-r--r-- | Documentation/arm64/tagged-pointers.txt | 14 | ||||
-rw-r--r-- | arch/arm64/include/asm/hwcap.h | 2 | ||||
-rw-r--r-- | arch/arm64/kernel/process.c | 21 | ||||
-rw-r--r-- | arch/arm64/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/arm64/mm/fault.c | 2 |
5 files changed, 26 insertions, 15 deletions
diff --git a/Documentation/arm64/tagged-pointers.txt b/Documentation/arm64/tagged-pointers.txt index 264e9841563a..d9995f1f51b3 100644 --- a/Documentation/arm64/tagged-pointers.txt +++ b/Documentation/arm64/tagged-pointers.txt | |||
@@ -18,17 +18,17 @@ this byte for application use, with the following caveats: | |||
18 | parameters containing user virtual addresses *must* have | 18 | parameters containing user virtual addresses *must* have |
19 | their top byte cleared before trapping to the kernel. | 19 | their top byte cleared before trapping to the kernel. |
20 | 20 | ||
21 | (2) Tags are not guaranteed to be preserved when delivering | 21 | (2) Non-zero tags are not preserved when delivering signals. |
22 | signals. This means that signal handlers in applications | 22 | This means that signal handlers in applications making use |
23 | making use of tags cannot rely on the tag information for | 23 | of tags cannot rely on the tag information for user virtual |
24 | user virtual addresses being maintained for fields inside | 24 | addresses being maintained for fields inside siginfo_t. |
25 | siginfo_t. One exception to this rule is for signals raised | 25 | One exception to this rule is for signals raised in response |
26 | in response to debug exceptions, where the tag information | 26 | to watchpoint debug exceptions, where the tag information |
27 | will be preserved. | 27 | will be preserved. |
28 | 28 | ||
29 | (3) Special care should be taken when using tagged pointers, | 29 | (3) Special care should be taken when using tagged pointers, |
30 | since it is likely that C compilers will not hazard two | 30 | since it is likely that C compilers will not hazard two |
31 | addresses differing only in the upper bits. | 31 | virtual addresses differing only in the upper byte. |
32 | 32 | ||
33 | The architecture prevents the use of a tagged PC, so the upper byte will | 33 | The architecture prevents the use of a tagged PC, so the upper byte will |
34 | be set to a sign-extension of bit 55 on exception return. | 34 | be set to a sign-extension of bit 55 on exception return. |
diff --git a/arch/arm64/include/asm/hwcap.h b/arch/arm64/include/asm/hwcap.h index 6d4482fa35bc..e2950b098e76 100644 --- a/arch/arm64/include/asm/hwcap.h +++ b/arch/arm64/include/asm/hwcap.h | |||
@@ -43,6 +43,6 @@ | |||
43 | COMPAT_HWCAP_VFPv3|COMPAT_HWCAP_VFPv4|\ | 43 | COMPAT_HWCAP_VFPv3|COMPAT_HWCAP_VFPv4|\ |
44 | COMPAT_HWCAP_NEON|COMPAT_HWCAP_IDIV) | 44 | COMPAT_HWCAP_NEON|COMPAT_HWCAP_IDIV) |
45 | 45 | ||
46 | extern unsigned int elf_hwcap; | 46 | extern unsigned long elf_hwcap; |
47 | #endif | 47 | #endif |
48 | #endif | 48 | #endif |
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 57fb55c44c90..7ae8a1f00c3c 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
@@ -143,15 +143,26 @@ void machine_restart(char *cmd) | |||
143 | 143 | ||
144 | void __show_regs(struct pt_regs *regs) | 144 | void __show_regs(struct pt_regs *regs) |
145 | { | 145 | { |
146 | int i; | 146 | int i, top_reg; |
147 | u64 lr, sp; | ||
148 | |||
149 | if (compat_user_mode(regs)) { | ||
150 | lr = regs->compat_lr; | ||
151 | sp = regs->compat_sp; | ||
152 | top_reg = 12; | ||
153 | } else { | ||
154 | lr = regs->regs[30]; | ||
155 | sp = regs->sp; | ||
156 | top_reg = 29; | ||
157 | } | ||
147 | 158 | ||
148 | show_regs_print_info(KERN_DEFAULT); | 159 | show_regs_print_info(KERN_DEFAULT); |
149 | print_symbol("PC is at %s\n", instruction_pointer(regs)); | 160 | print_symbol("PC is at %s\n", instruction_pointer(regs)); |
150 | print_symbol("LR is at %s\n", regs->regs[30]); | 161 | print_symbol("LR is at %s\n", lr); |
151 | printk("pc : [<%016llx>] lr : [<%016llx>] pstate: %08llx\n", | 162 | printk("pc : [<%016llx>] lr : [<%016llx>] pstate: %08llx\n", |
152 | regs->pc, regs->regs[30], regs->pstate); | 163 | regs->pc, lr, regs->pstate); |
153 | printk("sp : %016llx\n", regs->sp); | 164 | printk("sp : %016llx\n", sp); |
154 | for (i = 29; i >= 0; i--) { | 165 | for (i = top_reg; i >= 0; i--) { |
155 | printk("x%-2d: %016llx ", i, regs->regs[i]); | 166 | printk("x%-2d: %016llx ", i, regs->regs[i]); |
156 | if (i % 2 == 0) | 167 | if (i % 2 == 0) |
157 | printk("\n"); | 168 | printk("\n"); |
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 12ad8f3d0cfd..055cfb80e05c 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
@@ -57,7 +57,7 @@ | |||
57 | unsigned int processor_id; | 57 | unsigned int processor_id; |
58 | EXPORT_SYMBOL(processor_id); | 58 | EXPORT_SYMBOL(processor_id); |
59 | 59 | ||
60 | unsigned int elf_hwcap __read_mostly; | 60 | unsigned long elf_hwcap __read_mostly; |
61 | EXPORT_SYMBOL_GPL(elf_hwcap); | 61 | EXPORT_SYMBOL_GPL(elf_hwcap); |
62 | 62 | ||
63 | static const char *cpu_name; | 63 | static const char *cpu_name; |
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 6d6acf153bff..c23751b06120 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c | |||
@@ -130,7 +130,7 @@ static void __do_user_fault(struct task_struct *tsk, unsigned long addr, | |||
130 | force_sig_info(sig, &si, tsk); | 130 | force_sig_info(sig, &si, tsk); |
131 | } | 131 | } |
132 | 132 | ||
133 | void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs) | 133 | static void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs) |
134 | { | 134 | { |
135 | struct task_struct *tsk = current; | 135 | struct task_struct *tsk = current; |
136 | struct mm_struct *mm = tsk->active_mm; | 136 | struct mm_struct *mm = tsk->active_mm; |