[PATCH] rtc warning fix
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / asm-sh / mmu.h
blobcf47df79bb9415c43a310c16c3c93737ebc2c1d2
1 #ifndef __MMU_H
2 #define __MMU_H
4 #if !defined(CONFIG_MMU)
6 typedef struct {
7 struct vm_list_struct *vmlist;
8 unsigned long end_brk;
9 } mm_context_t;
11 #else
13 /* Default "unsigned long" context */
14 typedef unsigned long mm_context_id_t;
16 typedef struct {
17 mm_context_id_t id;
18 void *vdso;
19 } mm_context_t;
21 #endif /* CONFIG_MMU */
24 * Privileged Space Mapping Buffer (PMB) definitions
26 #define PMB_PASCR 0xff000070
27 #define PMB_IRMCR 0xff000078
29 #define PMB_ADDR 0xf6100000
30 #define PMB_DATA 0xf7100000
31 #define PMB_ENTRY_MAX 16
32 #define PMB_E_MASK 0x0000000f
33 #define PMB_E_SHIFT 8
35 #define PMB_SZ_16M 0x00000000
36 #define PMB_SZ_64M 0x00000010
37 #define PMB_SZ_128M 0x00000080
38 #define PMB_SZ_512M 0x00000090
39 #define PMB_SZ_MASK PMB_SZ_512M
40 #define PMB_C 0x00000008
41 #define PMB_WT 0x00000001
42 #define PMB_UB 0x00000200
43 #define PMB_V 0x00000100
45 #define PMB_NO_ENTRY (-1)
47 struct pmb_entry;
49 struct pmb_entry {
50 unsigned long vpn;
51 unsigned long ppn;
52 unsigned long flags;
55 * 0 .. NR_PMB_ENTRIES for specific entry selection, or
56 * PMB_NO_ENTRY to search for a free one
58 int entry;
60 struct pmb_entry *next;
61 /* Adjacent entry link for contiguous multi-entry mappings */
62 struct pmb_entry *link;
65 /* arch/sh/mm/pmb.c */
66 int __set_pmb_entry(unsigned long vpn, unsigned long ppn,
67 unsigned long flags, int *entry);
68 int set_pmb_entry(struct pmb_entry *pmbe);
69 void clear_pmb_entry(struct pmb_entry *pmbe);
70 struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
71 unsigned long flags);
72 void pmb_free(struct pmb_entry *pmbe);
73 long pmb_remap(unsigned long virt, unsigned long phys,
74 unsigned long size, unsigned long flags);
75 void pmb_unmap(unsigned long addr);
77 #endif /* __MMU_H */