David Feng | 0ae7653 | 2013-12-14 11:47:35 +0800 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2013 |
| 3 | * David Feng <fenghua@phytium.com.cn> |
| 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0+ |
| 6 | */ |
| 7 | |
| 8 | #include <asm-offsets.h> |
| 9 | #include <config.h> |
David Feng | 0ae7653 | 2013-12-14 11:47:35 +0800 | [diff] [blame] | 10 | #include <linux/linkage.h> |
| 11 | #include <asm/macro.h> |
| 12 | |
| 13 | /* |
| 14 | * void __asm_invalidate_tlb_all(void) |
| 15 | * |
| 16 | * invalidate all tlb entries. |
Philipp Tomsich | e6a0586 | 2017-07-04 10:04:54 +0200 | [diff] [blame^] | 17 | */ |
| 18 | .pushsection .text.__asm_invalidate_tlb_all, "ax" |
David Feng | 0ae7653 | 2013-12-14 11:47:35 +0800 | [diff] [blame] | 19 | ENTRY(__asm_invalidate_tlb_all) |
| 20 | switch_el x9, 3f, 2f, 1f |
| 21 | 3: tlbi alle3 |
| 22 | dsb sy |
| 23 | isb |
| 24 | b 0f |
| 25 | 2: tlbi alle2 |
| 26 | dsb sy |
| 27 | isb |
| 28 | b 0f |
| 29 | 1: tlbi vmalle1 |
| 30 | dsb sy |
| 31 | isb |
| 32 | 0: |
| 33 | ret |
| 34 | ENDPROC(__asm_invalidate_tlb_all) |
Philipp Tomsich | e6a0586 | 2017-07-04 10:04:54 +0200 | [diff] [blame^] | 35 | .popsection |