- Re-introduce the arm64 get_current() optimisation

- KERN_CONT fallout fix in show_pte()
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJYb9ovAAoJEGvWsS0AyF7xDVEP/1ANCRdnazK7U1+Rgtf9wmia
 H8vQyWr9aa4lEH85i1G6LK8/PCwc6S2mR91ohL/yn8FKIlQYUqRcqIeI3sHht3sk
 1rYLrZnOayvG9HTJK6SQOCZr0L4j5BDnkbDlX59ffZKhdw+s+r5WSO1lkfPuws/b
 JBlE6rPcoPWeQ4biSpyOwjZOAbx4sTuOC+NEJ3VOc+0SlONjS2PBPuo2Ud4+SJlr
 UxeypDlxcZm3jtrPAfjNrDjMPHaqUd1+q2RoqPalc8YjJFRcd8JkdaQUFPypuR1E
 W6RsQIVeyDlgJky4sHgSIpw/oc/uu0pzc6tcxrkuOGr4m2Xns8ooZ7RDy+fYpSlZ
 t04rBpi9wI9PHqRrqpa6luOVp2aoKQhEd/FUHrGEx8/G4idPO8HLIxB16sdysExb
 6WgoACUJIeCyowW2kmH4I97zoAaYgSLo38hNMN41uSCVvpu01IIjwrBHf05+DJPE
 JqKXhgx5QOVa9ztQWDmmozG5uccArFliTBtJ/NUsK6qYphPWxCH2XqL1Wv8KyF+a
 PQIFGld0Fa4iagkXs6plHc3K9aVTabnvudXyneeIcxSoQyTo7GZw/s1tvsieXiSE
 fDyRtIAjBWGLajNPy4otJcZld68MKEJoK9eGvhN1GtQKxTuZAd3OBc4jMmxR0fAB
 hNt/VR+PzvARDWwisHfN
 =G6xL
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - re-introduce the arm64 get_current() optimisation

 - KERN_CONT fallout fix in show_pte()

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: restore get_current() optimisation
  arm64: mm: fix show_pte KERN_CONT fallout
This commit is contained in:
Linus Torvalds 2017-01-06 15:18:58 -08:00
commit b1ee51702e
2 changed files with 13 additions and 5 deletions

View file

@ -9,9 +9,17 @@
struct task_struct;
/*
* We don't use read_sysreg() as we want the compiler to cache the value where
* possible.
*/
static __always_inline struct task_struct *get_current(void)
{
return (struct task_struct *)read_sysreg(sp_el0);
unsigned long sp_el0;
asm ("mrs %0, sp_el0" : "=r" (sp_el0));
return (struct task_struct *)sp_el0;
}
#define current get_current()

View file

@ -88,21 +88,21 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
break;
pud = pud_offset(pgd, addr);
printk(", *pud=%016llx", pud_val(*pud));
pr_cont(", *pud=%016llx", pud_val(*pud));
if (pud_none(*pud) || pud_bad(*pud))
break;
pmd = pmd_offset(pud, addr);
printk(", *pmd=%016llx", pmd_val(*pmd));
pr_cont(", *pmd=%016llx", pmd_val(*pmd));
if (pmd_none(*pmd) || pmd_bad(*pmd))
break;
pte = pte_offset_map(pmd, addr);
printk(", *pte=%016llx", pte_val(*pte));
pr_cont(", *pte=%016llx", pte_val(*pte));
pte_unmap(pte);
} while(0);
printk("\n");
pr_cont("\n");
}
#ifdef CONFIG_ARM64_HW_AFDBM