Commit 925aba56 authored by David S. Miller's avatar David S. Miller

On sparc64, flush_thread needs to setup the PGD cache

for 64-bit apps too.
parent 3e82bc84
......@@ -424,10 +424,10 @@ void flush_thread(void)
struct thread_info *t = current_thread_info();
if (t->task->mm) {
unsigned long pgd_cache = 0UL;
if (test_thread_flag(TIF_32BIT)) {
struct mm_struct *mm = t->task->mm;
pgd_t *pgd0 = &mm->pgd[0];
unsigned long pgd_cache;
if (pgd_none(*pgd0)) {
pmd_t *page = pmd_alloc_one_fast(NULL, 0);
......@@ -436,13 +436,13 @@ void flush_thread(void)
pgd_set(pgd0, page);
}
pgd_cache = pgd_val(*pgd0) << 11UL;
__asm__ __volatile__("stxa %0, [%1] %2\n\t"
"membar #Sync"
: /* no outputs */
: "r" (pgd_cache),
"r" (TSB_REG),
"i" (ASI_DMMU));
}
__asm__ __volatile__("stxa %0, [%1] %2\n\t"
"membar #Sync"
: /* no outputs */
: "r" (pgd_cache),
"r" (TSB_REG),
"i" (ASI_DMMU));
}
set_thread_wsaved(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment