aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/mmu.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-01 13:53:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-01 13:53:43 -0400
commit00e9028a95fb8a4d79f2fb695a853f33ea7d3b57 (patch)
tree2dea2ae498a6ce57de8890e87185aca5e9f3ad2d /arch/sh/include/asm/mmu.h
parent57b1494d2ba544c62673234da6115c21fac27ffc (diff)
parent7cb93181629c613ee2b8f4ffe3446f8003074842 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (28 commits) mm/hugetlb.c must #include <asm/io.h> video: Fix up hp6xx driver build regressions. sh: defconfig updates. sh: Kill off stray mach-rsk7203 reference. serial: sh-sci: Fix up SH7760/SH7780/SH7785 early printk regression. sh: Move out individual boards without mach groups. sh: Make sure AT_SYSINFO_EHDR is exposed to userspace in asm/auxvec.h. sh: Allow SH-3 and SH-5 to use common headers. sh: Provide common CPU headers, prune the SH-2 and SH-2A directories. sh/maple: clean maple bus code sh: More header path fixups for mach dir refactoring. sh: Move out the solution engine headers to arch/sh/include/mach-se/ sh: I2C fix for AP325RXA and Migo-R sh: Shuffle the board directories in to mach groups. sh: dma-sh: Fix up dreamcast dma.h mach path. sh: Switch KBUILD_DEFCONFIG to shx3_defconfig. sh: Add ARCH_DEFCONFIG entries for sh and sh64. sh: Fix compile error of Solution Engine sh: Proper __put_user_asm() size mismatch fix. sh: Stub in a dummy ENTRY_OFFSET for uImage offset calculation. ...
Diffstat (limited to 'arch/sh/include/asm/mmu.h')
-rw-r--r--arch/sh/include/asm/mmu.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/arch/sh/include/asm/mmu.h b/arch/sh/include/asm/mmu.h
new file mode 100644
index 000000000000..fdcb93bc6d11
--- /dev/null
+++ b/arch/sh/include/asm/mmu.h
@@ -0,0 +1,76 @@
1#ifndef __MMU_H
2#define __MMU_H
3
4/* Default "unsigned long" context */
5typedef unsigned long mm_context_id_t[NR_CPUS];
6
7typedef struct {
8#ifdef CONFIG_MMU
9 mm_context_id_t id;
10 void *vdso;
11#else
12 struct vm_list_struct *vmlist;
13 unsigned long end_brk;
14#endif
15#ifdef CONFIG_BINFMT_ELF_FDPIC
16 unsigned long exec_fdpic_loadmap;
17 unsigned long interp_fdpic_loadmap;
18#endif
19} mm_context_t;
20
21/*
22 * Privileged Space Mapping Buffer (PMB) definitions
23 */
24#define PMB_PASCR 0xff000070
25#define PMB_IRMCR 0xff000078
26
27#define PMB_ADDR 0xf6100000
28#define PMB_DATA 0xf7100000
29#define PMB_ENTRY_MAX 16
30#define PMB_E_MASK 0x0000000f
31#define PMB_E_SHIFT 8
32
33#define PMB_SZ_16M 0x00000000
34#define PMB_SZ_64M 0x00000010
35#define PMB_SZ_128M 0x00000080
36#define PMB_SZ_512M 0x00000090
37#define PMB_SZ_MASK PMB_SZ_512M
38#define PMB_C 0x00000008
39#define PMB_WT 0x00000001
40#define PMB_UB 0x00000200
41#define PMB_V 0x00000100
42
43#define PMB_NO_ENTRY (-1)
44
45struct pmb_entry;
46
47struct pmb_entry {
48 unsigned long vpn;
49 unsigned long ppn;
50 unsigned long flags;
51
52 /*
53 * 0 .. NR_PMB_ENTRIES for specific entry selection, or
54 * PMB_NO_ENTRY to search for a free one
55 */
56 int entry;
57
58 struct pmb_entry *next;
59 /* Adjacent entry link for contiguous multi-entry mappings */
60 struct pmb_entry *link;
61};
62
63/* arch/sh/mm/pmb.c */
64int __set_pmb_entry(unsigned long vpn, unsigned long ppn,
65 unsigned long flags, int *entry);
66int set_pmb_entry(struct pmb_entry *pmbe);
67void clear_pmb_entry(struct pmb_entry *pmbe);
68struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
69 unsigned long flags);
70void pmb_free(struct pmb_entry *pmbe);
71long pmb_remap(unsigned long virt, unsigned long phys,
72 unsigned long size, unsigned long flags);
73void pmb_unmap(unsigned long addr);
74
75#endif /* __MMU_H */
76