blob: a138770c358ed1d134fcb0274b93f4eeee515757 [file] [log] [blame]
Chris Zankel9a8fd552005-06-23 22:01:26 -07001/*
Chris Zankel66569202007-08-22 10:14:51 -07002 * include/asm-xtensa/pgtable.h
Chris Zankel9a8fd552005-06-23 22:01:26 -07003 *
4 * This program is free software; you can redistribute it and/or modify
Chris Zankel01858d12007-08-06 23:57:57 -07005 * it under the terms of the GNU General Public License version 2 as
Chris Zankel9a8fd552005-06-23 22:01:26 -07006 * published by the Free Software Foundation.
7 *
Chris Zankel01858d12007-08-06 23:57:57 -07008 * Copyright (C) 2001 - 2007 Tensilica Inc.
Chris Zankel9a8fd552005-06-23 22:01:26 -07009 */
10
11#ifndef _XTENSA_PGTABLE_H
12#define _XTENSA_PGTABLE_H
13
14#include <asm-generic/pgtable-nopmd.h>
15#include <asm/page.h>
16
Chris Zankel9a8fd552005-06-23 22:01:26 -070017/*
18 * We only use two ring levels, user and kernel space.
19 */
20
21#define USER_RING 1 /* user ring level */
22#define KERNEL_RING 0 /* kernel ring level */
23
24/*
25 * The Xtensa architecture port of Linux has a two-level page table system,
Chris Zankel01858d12007-08-06 23:57:57 -070026 * i.e. the logical three-level Linux page table layout is folded.
Chris Zankel9a8fd552005-06-23 22:01:26 -070027 * Each task has the following memory page tables:
28 *
29 * PGD table (page directory), ie. 3rd-level page table:
30 * One page (4 kB) of 1024 (PTRS_PER_PGD) pointers to PTE tables
31 * (Architectures that don't have the PMD folded point to the PMD tables)
32 *
33 * The pointer to the PGD table for a given task can be retrieved from
34 * the task structure (struct task_struct*) t, e.g. current():
35 * (t->mm ? t->mm : t->active_mm)->pgd
36 *
37 * PMD tables (page middle-directory), ie. 2nd-level page tables:
38 * Absent for the Xtensa architecture (folded, PTRS_PER_PMD == 1).
39 *
40 * PTE tables (page table entry), ie. 1st-level page tables:
41 * One page (4 kB) of 1024 (PTRS_PER_PTE) PTEs with a special PTE
42 * invalid_pte_table for absent mappings.
43 *
44 * The individual pages are 4 kB big with special pages for the empty_zero_page.
45 */
Chris Zankel01858d12007-08-06 23:57:57 -070046
Chris Zankel9a8fd552005-06-23 22:01:26 -070047#define PGDIR_SHIFT 22
48#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
49#define PGDIR_MASK (~(PGDIR_SIZE-1))
50
51/*
52 * Entries per page directory level: we use two-level, so
53 * we don't really have any PMD directory physically.
54 */
55#define PTRS_PER_PTE 1024
56#define PTRS_PER_PTE_SHIFT 10
Chris Zankel9a8fd552005-06-23 22:01:26 -070057#define PTRS_PER_PGD 1024
58#define PGD_ORDER 0
Chris Zankel9a8fd552005-06-23 22:01:26 -070059#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
Chris Zankel01858d12007-08-06 23:57:57 -070060#define FIRST_USER_ADDRESS 0
Chris Zankel9a8fd552005-06-23 22:01:26 -070061#define FIRST_USER_PGD_NR (FIRST_USER_ADDRESS >> PGDIR_SHIFT)
62
Chris Zankel66569202007-08-22 10:14:51 -070063/*
64 * Virtual memory area. We keep a distance to other memory regions to be
Chris Zankel9a8fd552005-06-23 22:01:26 -070065 * on the safe side. We also use this area for cache aliasing.
66 */
67
Chris Zankel9a8fd552005-06-23 22:01:26 -070068#define VMALLOC_START 0xC0000000
Chris Zankel3b4a49e2008-01-07 16:42:21 -080069#define VMALLOC_END 0xC7FEFFFF
70#define TLBTEMP_BASE_1 0xC7FF0000
71#define TLBTEMP_BASE_2 0xC7FF8000
Chris Zankel9a8fd552005-06-23 22:01:26 -070072
Chris Zankel66569202007-08-22 10:14:51 -070073/*
74 * Xtensa Linux config PTE layout (when present):
Chris Zankel9a8fd552005-06-23 22:01:26 -070075 * 31-12: PPN
76 * 11-6: Software
77 * 5-4: RING
78 * 3-0: CA
79 *
80 * Similar to the Alpha and MIPS ports, we need to keep track of the ref
81 * and mod bits in software. We have a software "you can read
82 * from this page" bit, and a hardware one which actually lets the
83 * process read from the page. On the same token we have a software
84 * writable bit and the real hardware one which actually lets the
85 * process write to the page.
86 *
87 * See further below for PTE layout for swapped-out pages.
88 */
89
Chris Zankel01858d12007-08-06 23:57:57 -070090#define _PAGE_HW_EXEC (1<<0) /* hardware: page is executable */
91#define _PAGE_HW_WRITE (1<<1) /* hardware: page is writable */
92
93#define _PAGE_FILE (1<<1) /* non-linear mapping, if !present */
94#define _PAGE_PROTNONE (3<<0) /* special case for VM_PROT_NONE */
Chris Zankel9a8fd552005-06-23 22:01:26 -070095
96/* None of these cache modes include MP coherency: */
Chris Zankel01858d12007-08-06 23:57:57 -070097#define _PAGE_CA_BYPASS (0<<2) /* bypass, non-speculative */
98#define _PAGE_CA_WB (1<<2) /* write-back */
99#define _PAGE_CA_WT (2<<2) /* write-through */
100#define _PAGE_CA_MASK (3<<2)
101#define _PAGE_INVALID (3<<2)
Chris Zankel9a8fd552005-06-23 22:01:26 -0700102
103#define _PAGE_USER (1<<4) /* user access (ring=1) */
Chris Zankel9a8fd552005-06-23 22:01:26 -0700104
105/* Software */
Chris Zankel01858d12007-08-06 23:57:57 -0700106#define _PAGE_WRITABLE_BIT 6
107#define _PAGE_WRITABLE (1<<6) /* software: page writable */
Chris Zankel9a8fd552005-06-23 22:01:26 -0700108#define _PAGE_DIRTY (1<<7) /* software: page dirty */
109#define _PAGE_ACCESSED (1<<8) /* software: page accessed (read) */
Chris Zankel9a8fd552005-06-23 22:01:26 -0700110
Chris Zankel01858d12007-08-06 23:57:57 -0700111/* On older HW revisions, we always have to set bit 0 */
112#if XCHAL_HW_VERSION_MAJOR < 2000
113# define _PAGE_VALID (1<<0)
114#else
115# define _PAGE_VALID 0
116#endif
117
118#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
119#define _PAGE_PRESENT (_PAGE_VALID | _PAGE_CA_WB | _PAGE_ACCESSED)
Chris Zankel9a8fd552005-06-23 22:01:26 -0700120
121#ifdef CONFIG_MMU
122
Chris Zankel01858d12007-08-06 23:57:57 -0700123#define PAGE_NONE __pgprot(_PAGE_INVALID | _PAGE_USER | _PAGE_PROTNONE)
124#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER)
125#define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_HW_EXEC)
126#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER)
127#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_HW_EXEC)
128#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_WRITABLE)
129#define PAGE_SHARED_EXEC \
130 __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_WRITABLE | _PAGE_HW_EXEC)
Chris Zankel66569202007-08-22 10:14:51 -0700131#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_HW_WRITE)
132#define PAGE_KERNEL_EXEC __pgprot(_PAGE_PRESENT|_PAGE_HW_WRITE|_PAGE_HW_EXEC)
Chris Zankel9a8fd552005-06-23 22:01:26 -0700133
Chris Zankel01858d12007-08-06 23:57:57 -0700134#if (DCACHE_WAY_SIZE > PAGE_SIZE)
Chris Zankel66569202007-08-22 10:14:51 -0700135# define _PAGE_DIRECTORY (_PAGE_VALID | _PAGE_ACCESSED)
Chris Zankel01858d12007-08-06 23:57:57 -0700136#else
Chris Zankel66569202007-08-22 10:14:51 -0700137# define _PAGE_DIRECTORY (_PAGE_VALID | _PAGE_ACCESSED | _PAGE_CA_WB)
Chris Zankel01858d12007-08-06 23:57:57 -0700138#endif
Chris Zankel9a8fd552005-06-23 22:01:26 -0700139
140#else /* no mmu */
141
142# define PAGE_NONE __pgprot(0)
143# define PAGE_SHARED __pgprot(0)
144# define PAGE_COPY __pgprot(0)
145# define PAGE_READONLY __pgprot(0)
146# define PAGE_KERNEL __pgprot(0)
147
148#endif
149
150/*
151 * On certain configurations of Xtensa MMUs (eg. the initial Linux config),
152 * the MMU can't do page protection for execute, and considers that the same as
153 * read. Also, write permissions may imply read permissions.
154 * What follows is the closest we can get by reasonable means..
155 * See linux/mm/mmap.c for protection_map[] array that uses these definitions.
156 */
Chris Zankel01858d12007-08-06 23:57:57 -0700157#define __P000 PAGE_NONE /* private --- */
158#define __P001 PAGE_READONLY /* private --r */
159#define __P010 PAGE_COPY /* private -w- */
160#define __P011 PAGE_COPY /* private -wr */
161#define __P100 PAGE_READONLY_EXEC /* private x-- */
162#define __P101 PAGE_READONLY_EXEC /* private x-r */
163#define __P110 PAGE_COPY_EXEC /* private xw- */
164#define __P111 PAGE_COPY_EXEC /* private xwr */
Chris Zankel9a8fd552005-06-23 22:01:26 -0700165
Chris Zankel01858d12007-08-06 23:57:57 -0700166#define __S000 PAGE_NONE /* shared --- */
167#define __S001 PAGE_READONLY /* shared --r */
168#define __S010 PAGE_SHARED /* shared -w- */
169#define __S011 PAGE_SHARED /* shared -wr */
170#define __S100 PAGE_READONLY_EXEC /* shared x-- */
171#define __S101 PAGE_READONLY_EXEC /* shared x-r */
172#define __S110 PAGE_SHARED_EXEC /* shared xw- */
173#define __S111 PAGE_SHARED_EXEC /* shared xwr */
Chris Zankel9a8fd552005-06-23 22:01:26 -0700174
175#ifndef __ASSEMBLY__
176
177#define pte_ERROR(e) \
178 printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
179#define pgd_ERROR(e) \
180 printk("%s:%d: bad pgd entry %08lx.\n", __FILE__, __LINE__, pgd_val(e))
181
182extern unsigned long empty_zero_page[1024];
183
184#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
185
Johannes Weinere5083a62009-03-04 16:21:31 +0100186#ifdef CONFIG_MMU
Chris Zankel9a8fd552005-06-23 22:01:26 -0700187extern pgd_t swapper_pg_dir[PAGE_SIZE/sizeof(pgd_t)];
Johannes Weinere5083a62009-03-04 16:21:31 +0100188extern void paging_init(void);
189extern void pgtable_cache_init(void);
190#else
191# define swapper_pg_dir NULL
192static inline void paging_init(void) { }
193static inline void pgtable_cache_init(void) { }
194#endif
Chris Zankel9a8fd552005-06-23 22:01:26 -0700195
196/*
197 * The pmd contains the kernel virtual address of the pte page.
198 */
Dave McCracken46a82b22006-09-25 23:31:48 -0700199#define pmd_page_vaddr(pmd) ((unsigned long)(pmd_val(pmd) & PAGE_MASK))
Chris Zankel9a8fd552005-06-23 22:01:26 -0700200#define pmd_page(pmd) virt_to_page(pmd_val(pmd))
201
202/*
Chris Zankel01858d12007-08-06 23:57:57 -0700203 * pte status.
Chris Zankel9a8fd552005-06-23 22:01:26 -0700204 */
Chris Zankel01858d12007-08-06 23:57:57 -0700205#define pte_none(pte) (pte_val(pte) == _PAGE_INVALID)
206#define pte_present(pte) \
207 (((pte_val(pte) & _PAGE_CA_MASK) != _PAGE_INVALID) \
208 || ((pte_val(pte) & _PAGE_PROTNONE) == _PAGE_PROTNONE))
Chris Zankel9a8fd552005-06-23 22:01:26 -0700209#define pte_clear(mm,addr,ptep) \
Chris Zankel01858d12007-08-06 23:57:57 -0700210 do { update_pte(ptep, __pte(_PAGE_INVALID)); } while(0)
Chris Zankel9a8fd552005-06-23 22:01:26 -0700211
212#define pmd_none(pmd) (!pmd_val(pmd))
213#define pmd_present(pmd) (pmd_val(pmd) & PAGE_MASK)
Chris Zankel9a8fd552005-06-23 22:01:26 -0700214#define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK)
Chris Zankel01858d12007-08-06 23:57:57 -0700215#define pmd_clear(pmdp) do { set_pmd(pmdp, __pmd(0)); } while (0)
Chris Zankel9a8fd552005-06-23 22:01:26 -0700216
Chris Zankel01858d12007-08-06 23:57:57 -0700217static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITABLE; }
Chris Zankel9a8fd552005-06-23 22:01:26 -0700218static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
219static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
220static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
Nick Piggin7e675132008-04-28 02:13:00 -0700221static inline int pte_special(pte_t pte) { return 0; }
222
Chris Zankel01858d12007-08-06 23:57:57 -0700223static inline pte_t pte_wrprotect(pte_t pte)
224 { pte_val(pte) &= ~(_PAGE_WRITABLE | _PAGE_HW_WRITE); return pte; }
225static inline pte_t pte_mkclean(pte_t pte)
226 { pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HW_WRITE); return pte; }
227static inline pte_t pte_mkold(pte_t pte)
228 { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
229static inline pte_t pte_mkdirty(pte_t pte)
230 { pte_val(pte) |= _PAGE_DIRTY; return pte; }
231static inline pte_t pte_mkyoung(pte_t pte)
232 { pte_val(pte) |= _PAGE_ACCESSED; return pte; }
233static inline pte_t pte_mkwrite(pte_t pte)
234 { pte_val(pte) |= _PAGE_WRITABLE; return pte; }
Nick Piggin7e675132008-04-28 02:13:00 -0700235static inline pte_t pte_mkspecial(pte_t pte)
236 { return pte; }
Chris Zankel9a8fd552005-06-23 22:01:26 -0700237
238/*
239 * Conversion functions: convert a page and protection to a page entry,
240 * and a page entry and page directory to the page they refer to.
241 */
Chris Zankel01858d12007-08-06 23:57:57 -0700242
Chris Zankel9a8fd552005-06-23 22:01:26 -0700243#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT)
244#define pte_same(a,b) (pte_val(a) == pte_val(b))
245#define pte_page(x) pfn_to_page(pte_pfn(x))
246#define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
247#define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)
248
Adrian Bunkd99cf712005-09-03 15:57:53 -0700249static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
Chris Zankel9a8fd552005-06-23 22:01:26 -0700250{
251 return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));
252}
253
254/*
255 * Certain architectures need to do special things when pte's
256 * within a page table are directly modified. Thus, the following
257 * hook is made available.
258 */
259static inline void update_pte(pte_t *ptep, pte_t pteval)
260{
261 *ptep = pteval;
Chris Zankel66569202007-08-22 10:14:51 -0700262#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
263 __asm__ __volatile__ ("dhwb %0, 0" :: "a" (ptep));
264#endif
265
Chris Zankel9a8fd552005-06-23 22:01:26 -0700266}
267
Tim Schmielau8c65b4a2005-11-07 00:59:43 -0800268struct mm_struct;
269
Adrian Bunkd99cf712005-09-03 15:57:53 -0700270static inline void
Chris Zankel9a8fd552005-06-23 22:01:26 -0700271set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval)
272{
273 update_pte(ptep, pteval);
274}
275
276
Adrian Bunkd99cf712005-09-03 15:57:53 -0700277static inline void
Chris Zankel9a8fd552005-06-23 22:01:26 -0700278set_pmd(pmd_t *pmdp, pmd_t pmdval)
279{
280 *pmdp = pmdval;
Chris Zankel9a8fd552005-06-23 22:01:26 -0700281}
282
Tim Schmielau8c65b4a2005-11-07 00:59:43 -0800283struct vm_area_struct;
Chris Zankel9a8fd552005-06-23 22:01:26 -0700284
285static inline int
286ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr,
287 pte_t *ptep)
288{
289 pte_t pte = *ptep;
290 if (!pte_young(pte))
291 return 0;
292 update_pte(ptep, pte_mkold(pte));
293 return 1;
294}
295
Chris Zankel9a8fd552005-06-23 22:01:26 -0700296static inline pte_t
297ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
298{
299 pte_t pte = *ptep;
300 pte_clear(mm, addr, ptep);
301 return pte;
302}
303
304static inline void
305ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
306{
307 pte_t pte = *ptep;
308 update_pte(ptep, pte_wrprotect(pte));
309}
310
311/* to find an entry in a kernel page-table-directory */
312#define pgd_offset_k(address) pgd_offset(&init_mm, address)
313
314/* to find an entry in a page-table-directory */
315#define pgd_offset(mm,address) ((mm)->pgd + pgd_index(address))
316
317#define pgd_index(address) ((address) >> PGDIR_SHIFT)
318
319/* Find an entry in the second-level page table.. */
320#define pmd_offset(dir,address) ((pmd_t*)(dir))
321
322/* Find an entry in the third-level page table.. */
323#define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
324#define pte_offset_kernel(dir,addr) \
Dave McCracken46a82b22006-09-25 23:31:48 -0700325 ((pte_t*) pmd_page_vaddr(*(dir)) + pte_index(addr))
Chris Zankel9a8fd552005-06-23 22:01:26 -0700326#define pte_offset_map(dir,addr) pte_offset_kernel((dir),(addr))
327#define pte_offset_map_nested(dir,addr) pte_offset_kernel((dir),(addr))
328
329#define pte_unmap(pte) do { } while (0)
330#define pte_unmap_nested(pte) do { } while (0)
331
332
333/*
334 * Encode and decode a swap entry.
Chris Zankel9a8fd552005-06-23 22:01:26 -0700335 *
Chris Zankel01858d12007-08-06 23:57:57 -0700336 * Format of swap pte:
337 * bit 0 MBZ
338 * bit 1 page-file (must be zero)
339 * bits 2 - 3 page hw access mode (must be 11: _PAGE_INVALID)
340 * bits 4 - 5 ring protection (must be 01: _PAGE_USER)
341 * bits 6 - 10 swap type (5 bits -> 32 types)
342 * bits 11 - 31 swap offset / PAGE_SIZE (21 bits -> 8GB)
343
344 * Format of file pte:
345 * bit 0 MBZ
346 * bit 1 page-file (must be one: _PAGE_FILE)
347 * bits 2 - 3 page hw access mode (must be 11: _PAGE_INVALID)
348 * bits 4 - 5 ring protection (must be 01: _PAGE_USER)
349 * bits 6 - 31 file offset / PAGE_SIZE
Chris Zankel9a8fd552005-06-23 22:01:26 -0700350 */
351
Chris Zankel01858d12007-08-06 23:57:57 -0700352#define __swp_type(entry) (((entry).val >> 6) & 0x1f)
353#define __swp_offset(entry) ((entry).val >> 11)
354#define __swp_entry(type,offs) \
355 ((swp_entry_t) {((type) << 6) | ((offs) << 11) | _PAGE_INVALID})
Chris Zankel9a8fd552005-06-23 22:01:26 -0700356#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
357#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
358
Chris Zankel01858d12007-08-06 23:57:57 -0700359#define PTE_FILE_MAX_BITS 28
360#define pte_to_pgoff(pte) (pte_val(pte) >> 4)
361#define pgoff_to_pte(off) \
362 ((pte_t) { ((off) << 4) | _PAGE_INVALID | _PAGE_FILE })
Chris Zankel9a8fd552005-06-23 22:01:26 -0700363
364#endif /* !defined (__ASSEMBLY__) */
365
366
367#ifdef __ASSEMBLY__
368
369/* Assembly macro _PGD_INDEX is the same as C pgd_index(unsigned long),
370 * _PGD_OFFSET as C pgd_offset(struct mm_struct*, unsigned long),
371 * _PMD_OFFSET as C pmd_offset(pgd_t*, unsigned long)
372 * _PTE_OFFSET as C pte_offset(pmd_t*, unsigned long)
373 *
374 * Note: We require an additional temporary register which can be the same as
375 * the register that holds the address.
376 *
377 * ((pte_t*) ((unsigned long)(pmd_val(*pmd) & PAGE_MASK)) + pte_index(addr))
378 *
379 */
380#define _PGD_INDEX(rt,rs) extui rt, rs, PGDIR_SHIFT, 32-PGDIR_SHIFT
381#define _PTE_INDEX(rt,rs) extui rt, rs, PAGE_SHIFT, PTRS_PER_PTE_SHIFT
382
383#define _PGD_OFFSET(mm,adr,tmp) l32i mm, mm, MM_PGD; \
384 _PGD_INDEX(tmp, adr); \
385 addx4 mm, tmp, mm
386
387#define _PTE_OFFSET(pmd,adr,tmp) _PTE_INDEX(tmp, adr); \
388 srli pmd, pmd, PAGE_SHIFT; \
389 slli pmd, pmd, PAGE_SHIFT; \
390 addx4 pmd, tmp, pmd
391
392#else
393
Chris Zankel9a8fd552005-06-23 22:01:26 -0700394#define kern_addr_valid(addr) (1)
395
396extern void update_mmu_cache(struct vm_area_struct * vma,
397 unsigned long address, pte_t pte);
398
399/*
Randy Dunlap33bf5612005-09-13 01:25:50 -0700400 * remap a physical page `pfn' of size `size' with page protection `prot'
Chris Zankel9a8fd552005-06-23 22:01:26 -0700401 * into virtual address `from'
402 */
Chris Zankel66569202007-08-22 10:14:51 -0700403
Randy Dunlap33bf5612005-09-13 01:25:50 -0700404#define io_remap_pfn_range(vma,from,pfn,size,prot) \
405 remap_pfn_range(vma, from, pfn, size, prot)
Chris Zankel9a8fd552005-06-23 22:01:26 -0700406
Chris Zankel9a8fd552005-06-23 22:01:26 -0700407typedef pte_t *pte_addr_t;
408
409#endif /* !defined (__ASSEMBLY__) */
410
411#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
Chris Zankel9a8fd552005-06-23 22:01:26 -0700412#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
413#define __HAVE_ARCH_PTEP_SET_WRPROTECT
414#define __HAVE_ARCH_PTEP_MKDIRTY
415#define __HAVE_ARCH_PTE_SAME
416
417#include <asm-generic/pgtable.h>
418
419#endif /* _XTENSA_PGTABLE_H */