diff options
author | Guo Ren <ren_guo@c-sky.com> | 2018-09-05 14:25:10 +0800 |
---|---|---|
committer | Guo Ren <ren_guo@c-sky.com> | 2018-10-25 23:36:19 +0800 |
commit | 00a9730e1007c6cc87a7c78af2f24a4105d616ee (patch) | |
tree | c014e5a0606a7a88b6e3493f49862c040f9aeea8 /arch/csky/include/asm/tlb.h | |
parent | 4859bfca11c7d63d55175bcd85a75d6cee4b7184 (diff) | |
download | blackbird-op-linux-00a9730e1007c6cc87a7c78af2f24a4105d616ee.tar.gz blackbird-op-linux-00a9730e1007c6cc87a7c78af2f24a4105d616ee.zip |
csky: Cache and TLB routines
This patch adds cache and tlb sync codes for abiv1 & abiv2.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/csky/include/asm/tlb.h')
-rw-r--r-- | arch/csky/include/asm/tlb.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/csky/include/asm/tlb.h b/arch/csky/include/asm/tlb.h new file mode 100644 index 000000000000..8c7cc097666f --- /dev/null +++ b/arch/csky/include/asm/tlb.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. + +#ifndef __ASM_CSKY_TLB_H +#define __ASM_CSKY_TLB_H + +#include <asm/cacheflush.h> + +#define tlb_start_vma(tlb, vma) \ + do { \ + if (!tlb->fullmm) \ + flush_cache_range(vma, vma->vm_start, vma->vm_end); \ + } while (0) + +#define tlb_end_vma(tlb, vma) \ + do { \ + if (!tlb->fullmm) \ + flush_tlb_range(vma, vma->vm_start, vma->vm_end); \ + } while (0) + +#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) + +#include <asm-generic/tlb.h> + +#endif /* __ASM_CSKY_TLB_H */ |