From e5083a63b6a8546c5fe1e571fe529e3939787ec2 Mon Sep 17 00:00:00 2001 From: Johannes Weiner Date: Wed, 4 Mar 2009 16:21:31 +0100 Subject: xtensa: nommu support Add support for !CONFIG_MMU setups. Signed-off-by: Johannes Weiner Signed-off-by: Chris Zankel --- arch/xtensa/include/asm/pgtable.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'arch/xtensa/include/asm/pgtable.h') diff --git a/arch/xtensa/include/asm/pgtable.h b/arch/xtensa/include/asm/pgtable.h index 8014d96b21f1..a138770c358e 100644 --- a/arch/xtensa/include/asm/pgtable.h +++ b/arch/xtensa/include/asm/pgtable.h @@ -183,7 +183,15 @@ extern unsigned long empty_zero_page[1024]; #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) +#ifdef CONFIG_MMU extern pgd_t swapper_pg_dir[PAGE_SIZE/sizeof(pgd_t)]; +extern void paging_init(void); +extern void pgtable_cache_init(void); +#else +# define swapper_pg_dir NULL +static inline void paging_init(void) { } +static inline void pgtable_cache_init(void) { } +#endif /* * The pmd contains the kernel virtual address of the pte page. @@ -383,8 +391,6 @@ ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) #else -extern void paging_init(void); - #define kern_addr_valid(addr) (1) extern void update_mmu_cache(struct vm_area_struct * vma, @@ -398,9 +404,6 @@ extern void update_mmu_cache(struct vm_area_struct * vma, #define io_remap_pfn_range(vma,from,pfn,size,prot) \ remap_pfn_range(vma, from, pfn, size, prot) - -extern void pgtable_cache_init(void); - typedef pte_t *pte_addr_t; #endif /* !defined (__ASSEMBLY__) */ -- cgit v1.2.1