Re: [PATCH 12/20] powerpc/mm: Add hook to flush pgtables when a PTE page is freed
From: Stephen Rothwell <hidden>
Date: 2009-07-23 06:46:33
Attachments
- (unnamed) [application/pgp-signature] 197 bytes
From: Stephen Rothwell <hidden>
Date: 2009-07-23 06:46:33
Hi Ben, On Thu, 23 Jul 2009 15:59:46 +1000 Benjamin Herrenschmidt [off-list ref] wrote:
+#ifdef CONFIG_PPC_BOOK3E
+extern void tlb_flush_pgtable(struct mmu_gather *tlb, unsigned long address);
+#else
+#define tlb_flush_pgtable(tlb, address) do { } while(0)
static inline void tlb_flush_pgtable(struct mmu_gather *tlb, unsigned long address) {}
#else
-#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, (pte))
+#define __pte_free_tlb(tlb,pte,address) \
+do { \
+ tlb_flush_pgtable(tlb, address); \
+ pte_free((tlb)->mm, (pte)); \
+} while (0)This could (should?) be a static inline as well. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/