blob: 8cb8f3833239a487dca7203738b5c0e330eb5be3 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _SPARC64_TLB_H
3#define _SPARC64_TLB_H
4
5#include <linux/swap.h>
6#include <linux/pagemap.h>
7#include <asm/pgalloc.h>
8#include <asm/tlbflush.h>
9#include <asm/mmu_context.h>
10
11#ifdef CONFIG_SMP
12void smp_flush_tlb_pending(struct mm_struct *,
13 unsigned long, unsigned long *);
14#endif
15
16#ifdef CONFIG_SMP
17void smp_flush_tlb_mm(struct mm_struct *mm);
18#define do_flush_tlb_mm(mm) smp_flush_tlb_mm(mm)
19#else
20#define do_flush_tlb_mm(mm) __flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT)
21#endif
22
23void __flush_tlb_pending(unsigned long, unsigned long, unsigned long *);
24void flush_tlb_pending(void);
25
26#define tlb_start_vma(tlb, vma) do { } while (0)
27#define tlb_end_vma(tlb, vma) do { } while (0)
28#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
29#define tlb_flush(tlb) flush_tlb_pending()
30
31/*
32 * SPARC64's hardware TLB fill does not use the Linux page-tables
33 * and therefore we don't need a TLBI when freeing page-table pages.
34 */
35
36#ifdef CONFIG_HAVE_RCU_TABLE_FREE
37#define tlb_needs_table_invalidate() (false)
38#endif
39
40#include <asm-generic/tlb.h>
41
42#endif /* _SPARC64_TLB_H */