[PATCH 15/27] asm-generic: Add missing generic tlb_flush definition

Arnd Bergmann
2009-04-30T15:51:57Z

All architectures with an MMU define tlb_flush as
flush_tlb_mm((tlb)->mm). This adds it as a default
implementation in asm-generic/tlb.h so that new nommu
architectures can simply use the header as is and
others can stop defining it themselves.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
---
include/asm-generic/tlb.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index f490e43..3a65502 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -47,6 +47,10 @@ struct mmu_gather {
/* Users of the generic TLB shootdown code must declare this storage space. */
DECLARE_PER_CPU(struct mmu_gather, mmu_gathers);

+#ifndef tlb_flush
+#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
+#endif
+
/* tlb_gather_mmu
* Return a pointer to an initialized struct mmu_gather.
*/
--
1.5.6.3