| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Common implementation of switch_mm_irqs_off |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright IBM Corp. 2017 |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or |
|---|
| 7 | | - * modify it under the terms of the GNU General Public License |
|---|
| 8 | | - * as published by the Free Software Foundation; either version |
|---|
| 9 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 10 | | - * |
|---|
| 11 | 6 | */ |
|---|
| 12 | 7 | |
|---|
| 13 | 8 | #include <linux/mm.h> |
|---|
| .. | .. |
|---|
| 15 | 10 | #include <linux/sched/mm.h> |
|---|
| 16 | 11 | |
|---|
| 17 | 12 | #include <asm/mmu_context.h> |
|---|
| 13 | +#include <asm/pgalloc.h> |
|---|
| 18 | 14 | |
|---|
| 19 | 15 | #if defined(CONFIG_PPC32) |
|---|
| 20 | 16 | static inline void switch_mm_pgdir(struct task_struct *tsk, |
|---|
| .. | .. |
|---|
| 83 | 79 | * context |
|---|
| 84 | 80 | */ |
|---|
| 85 | 81 | if (cpu_has_feature(CPU_FTR_ALTIVEC)) |
|---|
| 86 | | - asm volatile ("dssall"); |
|---|
| 82 | + asm volatile (PPC_DSSALL); |
|---|
| 87 | 83 | |
|---|
| 88 | 84 | if (new_on_cpu) |
|---|
| 89 | 85 | radix_kvm_prefetch_workaround(next); |
|---|
| .. | .. |
|---|
| 97 | 93 | switch_mmu_context(prev, next, tsk); |
|---|
| 98 | 94 | } |
|---|
| 99 | 95 | |
|---|
| 96 | +#ifndef CONFIG_PPC_BOOK3S_64 |
|---|
| 97 | +void arch_exit_mmap(struct mm_struct *mm) |
|---|
| 98 | +{ |
|---|
| 99 | + void *frag = pte_frag_get(&mm->context); |
|---|
| 100 | + |
|---|
| 101 | + if (frag) |
|---|
| 102 | + pte_frag_destroy(frag); |
|---|
| 103 | +} |
|---|
| 104 | +#endif |
|---|