patch-2.4.19 linux-2.4.19/include/asm-mips/pgalloc.h
Next file: linux-2.4.19/include/asm-mips/pgtable-bits.h
Previous file: linux-2.4.19/include/asm-mips/pci.h
Back to the patch index
Back to the overall index
- Lines: 77
- Date:
Fri Aug 2 17:39:45 2002
- Orig file:
linux-2.4.18/include/asm-mips/pgalloc.h
- Orig date:
Mon Jul 2 13:56:40 2001
diff -urN linux-2.4.18/include/asm-mips/pgalloc.h linux-2.4.19/include/asm-mips/pgalloc.h
@@ -11,6 +11,7 @@
#include <linux/config.h>
#include <linux/mm.h>
+#include <asm/fixmap.h>
/* TLB flushing:
*
@@ -18,14 +19,32 @@
* - flush_tlb_mm(mm) flushes the specified mm context TLB entries
* - flush_tlb_page(mm, vmaddr) flushes a single page
* - flush_tlb_range(mm, start, end) flushes a range of pages
+ * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
*/
-extern void flush_tlb_all(void);
-extern void flush_tlb_mm(struct mm_struct *mm);
-extern void flush_tlb_range(struct mm_struct *mm, unsigned long start,
+extern void local_flush_tlb_all(void);
+extern void local_flush_tlb_mm(struct mm_struct *mm);
+extern void local_flush_tlb_range(struct mm_struct *mm, unsigned long start,
unsigned long end);
-extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page);
+extern void local_flush_tlb_page(struct vm_area_struct *vma,
+ unsigned long page);
+
+#ifdef CONFIG_SMP
+
+extern void flush_tlb_all(void);
+extern void flush_tlb_mm(struct mm_struct *);
+extern void flush_tlb_range(struct mm_struct *, unsigned long, unsigned long);
+extern void flush_tlb_page(struct vm_area_struct *, unsigned long);
-extern inline void flush_tlb_pgtables(struct mm_struct *mm,
+#else /* CONFIG_SMP */
+
+#define flush_tlb_all() local_flush_tlb_all()
+#define flush_tlb_mm(mm) local_flush_tlb_mm(mm)
+#define flush_tlb_range(mm,vmaddr,end) local_flush_tlb_range(mm, vmaddr, end)
+#define flush_tlb_page(vma,page) local_flush_tlb_page(vma, page)
+
+#endif /* CONFIG_SMP */
+
+static inline void flush_tlb_pgtables(struct mm_struct *mm,
unsigned long start, unsigned long end)
{
/* Nothing to do on MIPS. */
@@ -50,7 +69,7 @@
extern __inline__ pgd_t *get_pgd_slow(void)
{
- pgd_t *ret = (pgd_t *)__get_free_page(GFP_KERNEL), *init;
+ pgd_t *ret = (pgd_t *)__get_free_pages(GFP_KERNEL, PGD_ORDER), *init;
if (ret) {
init = pgd_offset(&init_mm, 0);
@@ -83,11 +102,9 @@
extern __inline__ void free_pgd_slow(pgd_t *pgd)
{
- free_page((unsigned long)pgd);
+ free_pages((unsigned long)pgd, PGD_ORDER);
}
-extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted);
-
extern __inline__ pte_t *get_pte_fast(void)
{
unsigned long *ret;
@@ -162,7 +179,7 @@
free_page((unsigned long)pte);
}
-#define pte_free(pte) pte_free_slow(pte)
+#define pte_free(pte) pte_free_fast(pte)
#define pgd_free(pgd) free_pgd_fast(pgd)
#define pgd_alloc(mm) get_pgd_fast()
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)