diff options
| -rw-r--r-- | arch/arm64/include/asm/current.h | 10 | ||||
| -rw-r--r-- | arch/arm64/mm/fault.c | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm64/include/asm/current.h b/arch/arm64/include/asm/current.h index f2bcbe2d9889..86c404171305 100644 --- a/arch/arm64/include/asm/current.h +++ b/arch/arm64/include/asm/current.h | |||
| @@ -9,9 +9,17 @@ | |||
| 9 | 9 | ||
| 10 | struct task_struct; | 10 | struct task_struct; |
| 11 | 11 | ||
| 12 | /* | ||
| 13 | * We don't use read_sysreg() as we want the compiler to cache the value where | ||
| 14 | * possible. | ||
| 15 | */ | ||
| 12 | static __always_inline struct task_struct *get_current(void) | 16 | static __always_inline struct task_struct *get_current(void) |
| 13 | { | 17 | { |
| 14 | return (struct task_struct *)read_sysreg(sp_el0); | 18 | unsigned long sp_el0; |
| 19 | |||
| 20 | asm ("mrs %0, sp_el0" : "=r" (sp_el0)); | ||
| 21 | |||
| 22 | return (struct task_struct *)sp_el0; | ||
| 15 | } | 23 | } |
| 16 | 24 | ||
| 17 | #define current get_current() | 25 | #define current get_current() |
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index a78a5c401806..156169c6981b 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c | |||
| @@ -88,21 +88,21 @@ void show_pte(struct mm_struct *mm, unsigned long addr) | |||
| 88 | break; | 88 | break; |
| 89 | 89 | ||
| 90 | pud = pud_offset(pgd, addr); | 90 | pud = pud_offset(pgd, addr); |
| 91 | printk(", *pud=%016llx", pud_val(*pud)); | 91 | pr_cont(", *pud=%016llx", pud_val(*pud)); |
| 92 | if (pud_none(*pud) || pud_bad(*pud)) | 92 | if (pud_none(*pud) || pud_bad(*pud)) |
| 93 | break; | 93 | break; |
| 94 | 94 | ||
| 95 | pmd = pmd_offset(pud, addr); | 95 | pmd = pmd_offset(pud, addr); |
| 96 | printk(", *pmd=%016llx", pmd_val(*pmd)); | 96 | pr_cont(", *pmd=%016llx", pmd_val(*pmd)); |
| 97 | if (pmd_none(*pmd) || pmd_bad(*pmd)) | 97 | if (pmd_none(*pmd) || pmd_bad(*pmd)) |
| 98 | break; | 98 | break; |
| 99 | 99 | ||
| 100 | pte = pte_offset_map(pmd, addr); | 100 | pte = pte_offset_map(pmd, addr); |
| 101 | printk(", *pte=%016llx", pte_val(*pte)); | 101 | pr_cont(", *pte=%016llx", pte_val(*pte)); |
| 102 | pte_unmap(pte); | 102 | pte_unmap(pte); |
| 103 | } while(0); | 103 | } while(0); |
| 104 | 104 | ||
| 105 | printk("\n"); | 105 | pr_cont("\n"); |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | #ifdef CONFIG_ARM64_HW_AFDBM | 108 | #ifdef CONFIG_ARM64_HW_AFDBM |
