MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-nios2nommu / pgtable.h
blob9c2f0682d9c0cdbbb413114c773a86b54c8b0f83
1 #ifndef _NIOS_PGTABLE_H
2 #define _NIOS_PGTABLE_H
4 /*--------------------------------------------------------------------
6 * include/asm-nios2nommu/pgtable.h
8 * Derived from various works, Alpha, ix86, M68K, Sparc, ...et al
10 * Copyright (C) 2004 Microtronix Datacom Ltd
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
23 * Jan/20/2004 dgt NiosII
25 ---------------------------------------------------------------------*/
27 #include <asm-generic/4level-fixup.h>
29 //vic - this bit copied from m68knommu version
30 #include <asm/setup.h>
31 #include <asm/io.h>
33 typedef pte_t *pte_addr_t;
35 #define pgd_present(pgd) (1) /* pages are always present on NO_MM */
36 #define pgd_none(pgd) (0)
37 #define pgd_bad(pgd) (0)
38 #define pgd_clear(pgdp)
39 #define kern_addr_valid(addr) (1)
40 #define pmd_offset(a, b) ((void *)0)
42 #define PAGE_NONE __pgprot(0) /* these mean nothing to NO_MM */
43 #define PAGE_SHARED __pgprot(0) /* these mean nothing to NO_MM */
44 #define PAGE_COPY __pgprot(0) /* these mean nothing to NO_MM */
45 #define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */
46 #define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */
47 //vic - this bit copied from m68knommu version
49 extern void paging_init(void);
50 #define swapper_pg_dir ((pgd_t *) 0)
52 #define __swp_type(x) (0)
53 #define __swp_offset(x) (0)
54 #define __swp_entry(typ,off) ((swp_entry_t) { ((typ) | ((off) << 7)) })
55 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
56 #define __swp_entry_to_pte(x) ((pte_t) { (x).val })
58 static inline int pte_file(pte_t pte) { return 0; }
61 * ZERO_PAGE is a global shared page that is always zero: used
62 * for zero-mapped memory areas etc..
64 #define ZERO_PAGE(vaddr) (virt_to_page(0))
66 extern unsigned int kobjsize(const void *objp);
67 extern int is_in_rom(unsigned long);
70 * No page table caches to initialise
72 #define pgtable_cache_init() do { } while (0)
74 #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
75 remap_pfn_range(vma, vaddr, pfn, size, prot)
77 extern inline void flush_cache_mm(struct mm_struct *mm)
81 extern inline void flush_cache_range(struct mm_struct *mm,
82 unsigned long start,
83 unsigned long end)
87 /* Push the page at kernel virtual address and clear the icache */
88 extern inline void flush_page_to_ram (unsigned long address)
92 /* Push n pages at kernel virtual address and clear the icache */
93 extern inline void flush_pages_to_ram (unsigned long address, int n)
98 * All 32bit addresses are effectively valid for vmalloc...
99 * Sort of meaningless for non-VM targets.
101 #define VMALLOC_START 0
102 #define VMALLOC_END 0xffffffff
104 #endif /* _NIOS_PGTABLE_H */