diff options
author | Peter Zijlstra <peterz@infradead.org> | 2018-09-20 04:55:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-04-03 04:33:02 -0400 |
commit | 0a8caf211bcf52cbb59e100ead4908fe88d2a510 (patch) | |
tree | bcc86e51b62f103f4817a46a92ad001a91d66ef6 | |
parent | fa0aafb8acb684e68231ff0a547ed249f8dc31a5 (diff) |
asm-generic/tlb: Remove tlb_table_flush()
There are no external users of this API (nor should there be); remove it.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | include/asm-generic/tlb.h | 1 | ||||
-rw-r--r-- | mm/mmu_gather.c | 34 |
2 files changed, 17 insertions, 18 deletions
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index ddd3d02be93d..fc661b4675ff 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
@@ -182,7 +182,6 @@ struct mmu_table_batch { | |||
182 | #define MAX_TABLE_BATCH \ | 182 | #define MAX_TABLE_BATCH \ |
183 | ((PAGE_SIZE - sizeof(struct mmu_table_batch)) / sizeof(void *)) | 183 | ((PAGE_SIZE - sizeof(struct mmu_table_batch)) / sizeof(void *)) |
184 | 184 | ||
185 | extern void tlb_table_flush(struct mmu_gather *tlb); | ||
186 | extern void tlb_remove_table(struct mmu_gather *tlb, void *table); | 185 | extern void tlb_remove_table(struct mmu_gather *tlb, void *table); |
187 | 186 | ||
188 | #endif | 187 | #endif |
diff --git a/mm/mmu_gather.c b/mm/mmu_gather.c index 35699a4d0a74..99740e1dd273 100644 --- a/mm/mmu_gather.c +++ b/mm/mmu_gather.c | |||
@@ -91,22 +91,6 @@ bool __tlb_remove_page_size(struct mmu_gather *tlb, struct page *page, int page_ | |||
91 | 91 | ||
92 | #endif /* HAVE_MMU_GATHER_NO_GATHER */ | 92 | #endif /* HAVE_MMU_GATHER_NO_GATHER */ |
93 | 93 | ||
94 | static void tlb_flush_mmu_free(struct mmu_gather *tlb) | ||
95 | { | ||
96 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | ||
97 | tlb_table_flush(tlb); | ||
98 | #endif | ||
99 | #ifndef CONFIG_HAVE_MMU_GATHER_NO_GATHER | ||
100 | tlb_batch_pages_flush(tlb); | ||
101 | #endif | ||
102 | } | ||
103 | |||
104 | void tlb_flush_mmu(struct mmu_gather *tlb) | ||
105 | { | ||
106 | tlb_flush_mmu_tlbonly(tlb); | ||
107 | tlb_flush_mmu_free(tlb); | ||
108 | } | ||
109 | |||
110 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | 94 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE |
111 | 95 | ||
112 | /* | 96 | /* |
@@ -159,7 +143,7 @@ static void tlb_remove_table_rcu(struct rcu_head *head) | |||
159 | free_page((unsigned long)batch); | 143 | free_page((unsigned long)batch); |
160 | } | 144 | } |
161 | 145 | ||
162 | void tlb_table_flush(struct mmu_gather *tlb) | 146 | static void tlb_table_flush(struct mmu_gather *tlb) |
163 | { | 147 | { |
164 | struct mmu_table_batch **batch = &tlb->batch; | 148 | struct mmu_table_batch **batch = &tlb->batch; |
165 | 149 | ||
@@ -191,6 +175,22 @@ void tlb_remove_table(struct mmu_gather *tlb, void *table) | |||
191 | 175 | ||
192 | #endif /* CONFIG_HAVE_RCU_TABLE_FREE */ | 176 | #endif /* CONFIG_HAVE_RCU_TABLE_FREE */ |
193 | 177 | ||
178 | static void tlb_flush_mmu_free(struct mmu_gather *tlb) | ||
179 | { | ||
180 | #ifdef CONFIG_HAVE_RCU_TABLE_FREE | ||
181 | tlb_table_flush(tlb); | ||
182 | #endif | ||
183 | #ifndef CONFIG_HAVE_MMU_GATHER_NO_GATHER | ||
184 | tlb_batch_pages_flush(tlb); | ||
185 | #endif | ||
186 | } | ||
187 | |||
188 | void tlb_flush_mmu(struct mmu_gather *tlb) | ||
189 | { | ||
190 | tlb_flush_mmu_tlbonly(tlb); | ||
191 | tlb_flush_mmu_free(tlb); | ||
192 | } | ||
193 | |||
194 | /** | 194 | /** |
195 | * tlb_gather_mmu - initialize an mmu_gather structure for page-table tear-down | 195 | * tlb_gather_mmu - initialize an mmu_gather structure for page-table tear-down |
196 | * @tlb: the mmu_gather structure to initialize | 196 | * @tlb: the mmu_gather structure to initialize |