diff options
author | Mikael Starvik <mikael.starvik@axis.com> | 2005-07-27 14:44:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:26:01 -0400 |
commit | 5d01e6ce785884a5db5792cd2e5bb36fa82fe23c (patch) | |
tree | aec09f0c058a6750904b947733a6cc7033359447 /include/asm-cris | |
parent | dcf1310b72149d016970c666539d4d73bb77c086 (diff) |
[PATCH] CRIS update: updates for 2.6.12
Patches to make CRIS work with 2.6.12.
Signed-off-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-cris')
-rw-r--r-- | include/asm-cris/arch-v10/bitops.h | 2 | ||||
-rw-r--r-- | include/asm-cris/arch-v10/offset.h | 2 | ||||
-rw-r--r-- | include/asm-cris/bitops.h | 35 | ||||
-rw-r--r-- | include/asm-cris/kmap_types.h | 4 | ||||
-rw-r--r-- | include/asm-cris/page.h | 7 | ||||
-rw-r--r-- | include/asm-cris/pgalloc.h | 10 | ||||
-rw-r--r-- | include/asm-cris/pgtable.h | 42 | ||||
-rw-r--r-- | include/asm-cris/processor.h | 9 | ||||
-rw-r--r-- | include/asm-cris/thread_info.h | 2 | ||||
-rw-r--r-- | include/asm-cris/timex.h | 2 | ||||
-rw-r--r-- | include/asm-cris/types.h | 2 | ||||
-rw-r--r-- | include/asm-cris/unistd.h | 11 |
12 files changed, 42 insertions, 86 deletions
diff --git a/include/asm-cris/arch-v10/bitops.h b/include/asm-cris/arch-v10/bitops.h index 21b7ae8c9bb3..b73f5396e5a6 100644 --- a/include/asm-cris/arch-v10/bitops.h +++ b/include/asm-cris/arch-v10/bitops.h | |||
@@ -51,7 +51,7 @@ extern inline unsigned long ffz(unsigned long w) | |||
51 | * | 51 | * |
52 | * Undefined if no bit exists, so code should check against 0 first. | 52 | * Undefined if no bit exists, so code should check against 0 first. |
53 | */ | 53 | */ |
54 | extern __inline__ unsigned long __ffs(unsigned long word) | 54 | extern inline unsigned long __ffs(unsigned long word) |
55 | { | 55 | { |
56 | return cris_swapnwbrlz(~word); | 56 | return cris_swapnwbrlz(~word); |
57 | } | 57 | } |
diff --git a/include/asm-cris/arch-v10/offset.h b/include/asm-cris/arch-v10/offset.h index fcbd77eab281..675b51d85639 100644 --- a/include/asm-cris/arch-v10/offset.h +++ b/include/asm-cris/arch-v10/offset.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #define THREAD_usp 4 /* offsetof(struct thread_struct, usp) */ | 25 | #define THREAD_usp 4 /* offsetof(struct thread_struct, usp) */ |
26 | #define THREAD_dccr 8 /* offsetof(struct thread_struct, dccr) */ | 26 | #define THREAD_dccr 8 /* offsetof(struct thread_struct, dccr) */ |
27 | 27 | ||
28 | #define TASK_pid 133 /* offsetof(struct task_struct, pid) */ | 28 | #define TASK_pid 141 /* offsetof(struct task_struct, pid) */ |
29 | 29 | ||
30 | #define LCLONE_VM 256 /* CLONE_VM */ | 30 | #define LCLONE_VM 256 /* CLONE_VM */ |
31 | #define LCLONE_UNTRACED 8388608 /* CLONE_UNTRACED */ | 31 | #define LCLONE_UNTRACED 8388608 /* CLONE_UNTRACED */ |
diff --git a/include/asm-cris/bitops.h b/include/asm-cris/bitops.h index d7861115d731..e3da57f97964 100644 --- a/include/asm-cris/bitops.h +++ b/include/asm-cris/bitops.h | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <asm/arch/bitops.h> | 17 | #include <asm/arch/bitops.h> |
18 | #include <asm/system.h> | 18 | #include <asm/system.h> |
19 | #include <asm/atomic.h> | ||
19 | #include <linux/compiler.h> | 20 | #include <linux/compiler.h> |
20 | 21 | ||
21 | /* | 22 | /* |
@@ -88,7 +89,7 @@ struct __dummy { unsigned long a[100]; }; | |||
88 | * It also implies a memory barrier. | 89 | * It also implies a memory barrier. |
89 | */ | 90 | */ |
90 | 91 | ||
91 | extern inline int test_and_set_bit(int nr, void *addr) | 92 | extern inline int test_and_set_bit(int nr, volatile unsigned long *addr) |
92 | { | 93 | { |
93 | unsigned int mask, retval; | 94 | unsigned int mask, retval; |
94 | unsigned long flags; | 95 | unsigned long flags; |
@@ -96,15 +97,15 @@ extern inline int test_and_set_bit(int nr, void *addr) | |||
96 | 97 | ||
97 | adr += nr >> 5; | 98 | adr += nr >> 5; |
98 | mask = 1 << (nr & 0x1f); | 99 | mask = 1 << (nr & 0x1f); |
99 | local_save_flags(flags); | 100 | cris_atomic_save(addr, flags); |
100 | local_irq_disable(); | ||
101 | retval = (mask & *adr) != 0; | 101 | retval = (mask & *adr) != 0; |
102 | *adr |= mask; | 102 | *adr |= mask; |
103 | cris_atomic_restore(addr, flags); | ||
103 | local_irq_restore(flags); | 104 | local_irq_restore(flags); |
104 | return retval; | 105 | return retval; |
105 | } | 106 | } |
106 | 107 | ||
107 | extern inline int __test_and_set_bit(int nr, void *addr) | 108 | extern inline int __test_and_set_bit(int nr, volatile unsigned long *addr) |
108 | { | 109 | { |
109 | unsigned int mask, retval; | 110 | unsigned int mask, retval; |
110 | unsigned int *adr = (unsigned int *)addr; | 111 | unsigned int *adr = (unsigned int *)addr; |
@@ -131,7 +132,7 @@ extern inline int __test_and_set_bit(int nr, void *addr) | |||
131 | * It also implies a memory barrier. | 132 | * It also implies a memory barrier. |
132 | */ | 133 | */ |
133 | 134 | ||
134 | extern inline int test_and_clear_bit(int nr, void *addr) | 135 | extern inline int test_and_clear_bit(int nr, volatile unsigned long *addr) |
135 | { | 136 | { |
136 | unsigned int mask, retval; | 137 | unsigned int mask, retval; |
137 | unsigned long flags; | 138 | unsigned long flags; |
@@ -139,11 +140,10 @@ extern inline int test_and_clear_bit(int nr, void *addr) | |||
139 | 140 | ||
140 | adr += nr >> 5; | 141 | adr += nr >> 5; |
141 | mask = 1 << (nr & 0x1f); | 142 | mask = 1 << (nr & 0x1f); |
142 | local_save_flags(flags); | 143 | cris_atomic_save(addr, flags); |
143 | local_irq_disable(); | ||
144 | retval = (mask & *adr) != 0; | 144 | retval = (mask & *adr) != 0; |
145 | *adr &= ~mask; | 145 | *adr &= ~mask; |
146 | local_irq_restore(flags); | 146 | cris_atomic_restore(addr, flags); |
147 | return retval; | 147 | return retval; |
148 | } | 148 | } |
149 | 149 | ||
@@ -157,7 +157,7 @@ extern inline int test_and_clear_bit(int nr, void *addr) | |||
157 | * but actually fail. You must protect multiple accesses with a lock. | 157 | * but actually fail. You must protect multiple accesses with a lock. |
158 | */ | 158 | */ |
159 | 159 | ||
160 | extern inline int __test_and_clear_bit(int nr, void *addr) | 160 | extern inline int __test_and_clear_bit(int nr, volatile unsigned long *addr) |
161 | { | 161 | { |
162 | unsigned int mask, retval; | 162 | unsigned int mask, retval; |
163 | unsigned int *adr = (unsigned int *)addr; | 163 | unsigned int *adr = (unsigned int *)addr; |
@@ -177,24 +177,23 @@ extern inline int __test_and_clear_bit(int nr, void *addr) | |||
177 | * It also implies a memory barrier. | 177 | * It also implies a memory barrier. |
178 | */ | 178 | */ |
179 | 179 | ||
180 | extern inline int test_and_change_bit(int nr, void *addr) | 180 | extern inline int test_and_change_bit(int nr, volatile unsigned long *addr) |
181 | { | 181 | { |
182 | unsigned int mask, retval; | 182 | unsigned int mask, retval; |
183 | unsigned long flags; | 183 | unsigned long flags; |
184 | unsigned int *adr = (unsigned int *)addr; | 184 | unsigned int *adr = (unsigned int *)addr; |
185 | adr += nr >> 5; | 185 | adr += nr >> 5; |
186 | mask = 1 << (nr & 0x1f); | 186 | mask = 1 << (nr & 0x1f); |
187 | local_save_flags(flags); | 187 | cris_atomic_save(addr, flags); |
188 | local_irq_disable(); | ||
189 | retval = (mask & *adr) != 0; | 188 | retval = (mask & *adr) != 0; |
190 | *adr ^= mask; | 189 | *adr ^= mask; |
191 | local_irq_restore(flags); | 190 | cris_atomic_restore(addr, flags); |
192 | return retval; | 191 | return retval; |
193 | } | 192 | } |
194 | 193 | ||
195 | /* WARNING: non atomic and it can be reordered! */ | 194 | /* WARNING: non atomic and it can be reordered! */ |
196 | 195 | ||
197 | extern inline int __test_and_change_bit(int nr, void *addr) | 196 | extern inline int __test_and_change_bit(int nr, volatile unsigned long *addr) |
198 | { | 197 | { |
199 | unsigned int mask, retval; | 198 | unsigned int mask, retval; |
200 | unsigned int *adr = (unsigned int *)addr; | 199 | unsigned int *adr = (unsigned int *)addr; |
@@ -215,7 +214,7 @@ extern inline int __test_and_change_bit(int nr, void *addr) | |||
215 | * This routine doesn't need to be atomic. | 214 | * This routine doesn't need to be atomic. |
216 | */ | 215 | */ |
217 | 216 | ||
218 | extern inline int test_bit(int nr, const void *addr) | 217 | extern inline int test_bit(int nr, const volatile unsigned long *addr) |
219 | { | 218 | { |
220 | unsigned int mask; | 219 | unsigned int mask; |
221 | unsigned int *adr = (unsigned int *)addr; | 220 | unsigned int *adr = (unsigned int *)addr; |
@@ -259,7 +258,7 @@ extern inline int test_bit(int nr, const void *addr) | |||
259 | * @offset: The bitnumber to start searching at | 258 | * @offset: The bitnumber to start searching at |
260 | * @size: The maximum size to search | 259 | * @size: The maximum size to search |
261 | */ | 260 | */ |
262 | extern inline int find_next_zero_bit (void * addr, int size, int offset) | 261 | extern inline int find_next_zero_bit (const unsigned long * addr, int size, int offset) |
263 | { | 262 | { |
264 | unsigned long *p = ((unsigned long *) addr) + (offset >> 5); | 263 | unsigned long *p = ((unsigned long *) addr) + (offset >> 5); |
265 | unsigned long result = offset & ~31UL; | 264 | unsigned long result = offset & ~31UL; |
@@ -301,7 +300,7 @@ extern inline int find_next_zero_bit (void * addr, int size, int offset) | |||
301 | * @offset: The bitnumber to start searching at | 300 | * @offset: The bitnumber to start searching at |
302 | * @size: The maximum size to search | 301 | * @size: The maximum size to search |
303 | */ | 302 | */ |
304 | static __inline__ int find_next_bit(void *addr, int size, int offset) | 303 | static __inline__ int find_next_bit(const unsigned long *addr, int size, int offset) |
305 | { | 304 | { |
306 | unsigned long *p = ((unsigned long *) addr) + (offset >> 5); | 305 | unsigned long *p = ((unsigned long *) addr) + (offset >> 5); |
307 | unsigned long result = offset & ~31UL; | 306 | unsigned long result = offset & ~31UL; |
@@ -367,7 +366,7 @@ found_middle: | |||
367 | #define minix_test_bit(nr,addr) test_bit(nr,addr) | 366 | #define minix_test_bit(nr,addr) test_bit(nr,addr) |
368 | #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) | 367 | #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) |
369 | 368 | ||
370 | extern inline int sched_find_first_bit(unsigned long *b) | 369 | extern inline int sched_find_first_bit(const unsigned long *b) |
371 | { | 370 | { |
372 | if (unlikely(b[0])) | 371 | if (unlikely(b[0])) |
373 | return __ffs(b[0]); | 372 | return __ffs(b[0]); |
diff --git a/include/asm-cris/kmap_types.h b/include/asm-cris/kmap_types.h index eec0974c2417..492988cb9077 100644 --- a/include/asm-cris/kmap_types.h +++ b/include/asm-cris/kmap_types.h | |||
@@ -17,8 +17,8 @@ enum km_type { | |||
17 | KM_PTE1, | 17 | KM_PTE1, |
18 | KM_IRQ0, | 18 | KM_IRQ0, |
19 | KM_IRQ1, | 19 | KM_IRQ1, |
20 | KM_CRYPTO_USER, | 20 | KM_SOFTIRQ0, |
21 | KM_CRYPTO_SOFTIRQ, | 21 | KM_SOFTIRQ1, |
22 | KM_TYPE_NR | 22 | KM_TYPE_NR |
23 | }; | 23 | }; |
24 | 24 | ||
diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h index c767da1ef8f5..bbf17bd39385 100644 --- a/include/asm-cris/page.h +++ b/include/asm-cris/page.h | |||
@@ -29,18 +29,15 @@ | |||
29 | */ | 29 | */ |
30 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
31 | typedef struct { unsigned long pte; } pte_t; | 31 | typedef struct { unsigned long pte; } pte_t; |
32 | typedef struct { unsigned long pmd; } pmd_t; | ||
33 | typedef struct { unsigned long pgd; } pgd_t; | 32 | typedef struct { unsigned long pgd; } pgd_t; |
34 | typedef struct { unsigned long pgprot; } pgprot_t; | 33 | typedef struct { unsigned long pgprot; } pgprot_t; |
35 | #endif | 34 | #endif |
36 | 35 | ||
37 | #define pte_val(x) ((x).pte) | 36 | #define pte_val(x) ((x).pte) |
38 | #define pmd_val(x) ((x).pmd) | ||
39 | #define pgd_val(x) ((x).pgd) | 37 | #define pgd_val(x) ((x).pgd) |
40 | #define pgprot_val(x) ((x).pgprot) | 38 | #define pgprot_val(x) ((x).pgprot) |
41 | 39 | ||
42 | #define __pte(x) ((pte_t) { (x) } ) | 40 | #define __pte(x) ((pte_t) { (x) } ) |
43 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
44 | #define __pgd(x) ((pgd_t) { (x) } ) | 41 | #define __pgd(x) ((pgd_t) { (x) } ) |
45 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 42 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
46 | 43 | ||
@@ -73,10 +70,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
73 | 70 | ||
74 | #ifndef __ASSEMBLY__ | 71 | #ifndef __ASSEMBLY__ |
75 | 72 | ||
76 | #define BUG() do { \ | ||
77 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | ||
78 | } while (0) | ||
79 | |||
80 | /* Pure 2^n version of get_order */ | 73 | /* Pure 2^n version of get_order */ |
81 | static inline int get_order(unsigned long size) | 74 | static inline int get_order(unsigned long size) |
82 | { | 75 | { |
diff --git a/include/asm-cris/pgalloc.h b/include/asm-cris/pgalloc.h index b202e62ed6e0..a131776edf41 100644 --- a/include/asm-cris/pgalloc.h +++ b/include/asm-cris/pgalloc.h | |||
@@ -47,16 +47,6 @@ extern inline void pte_free(struct page *pte) | |||
47 | 47 | ||
48 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) | 48 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) |
49 | 49 | ||
50 | /* | ||
51 | * We don't have any real pmd's, and this code never triggers because | ||
52 | * the pgd will always be present.. | ||
53 | */ | ||
54 | |||
55 | #define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); }) | ||
56 | #define pmd_free(x) do { } while (0) | ||
57 | #define __pmd_free_tlb(tlb,x) do { } while (0) | ||
58 | #define pgd_populate(mm, pmd, pte) BUG() | ||
59 | |||
60 | #define check_pgt_cache() do { } while (0) | 50 | #define check_pgt_cache() do { } while (0) |
61 | 51 | ||
62 | #endif | 52 | #endif |
diff --git a/include/asm-cris/pgtable.h b/include/asm-cris/pgtable.h index f7042944b073..a9143bed99db 100644 --- a/include/asm-cris/pgtable.h +++ b/include/asm-cris/pgtable.h | |||
@@ -5,7 +5,8 @@ | |||
5 | #ifndef _CRIS_PGTABLE_H | 5 | #ifndef _CRIS_PGTABLE_H |
6 | #define _CRIS_PGTABLE_H | 6 | #define _CRIS_PGTABLE_H |
7 | 7 | ||
8 | #include <asm-generic/4level-fixup.h> | 8 | #include <asm/page.h> |
9 | #include <asm-generic/pgtable-nopmd.h> | ||
9 | 10 | ||
10 | #ifndef __ASSEMBLY__ | 11 | #ifndef __ASSEMBLY__ |
11 | #include <linux/config.h> | 12 | #include <linux/config.h> |
@@ -41,22 +42,14 @@ extern void paging_init(void); | |||
41 | * but the define is needed for a generic inline function.) | 42 | * but the define is needed for a generic inline function.) |
42 | */ | 43 | */ |
43 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) | 44 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) |
44 | #define set_pgd(pgdptr, pgdval) (*(pgdptr) = pgdval) | 45 | #define set_pgu(pudptr, pudval) (*(pudptr) = pudval) |
45 | 46 | ||
46 | /* PMD_SHIFT determines the size of the area a second-level page table can | 47 | /* PGDIR_SHIFT determines the size of the area a second-level page table can |
47 | * map. It is equal to the page size times the number of PTE's that fit in | 48 | * map. It is equal to the page size times the number of PTE's that fit in |
48 | * a PMD page. A PTE is 4-bytes in CRIS. Hence the following number. | 49 | * a PMD page. A PTE is 4-bytes in CRIS. Hence the following number. |
49 | */ | 50 | */ |
50 | 51 | ||
51 | #define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-2)) | 52 | #define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-2)) |
52 | #define PMD_SIZE (1UL << PMD_SHIFT) | ||
53 | #define PMD_MASK (~(PMD_SIZE-1)) | ||
54 | |||
55 | /* PGDIR_SHIFT determines what a third-level page table entry can map. | ||
56 | * Since we fold into a two-level structure, this is the same as PMD_SHIFT. | ||
57 | */ | ||
58 | |||
59 | #define PGDIR_SHIFT PMD_SHIFT | ||
60 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | 53 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) |
61 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 54 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
62 | 55 | ||
@@ -67,7 +60,6 @@ extern void paging_init(void); | |||
67 | * divide it by 4 (shift by 2). | 60 | * divide it by 4 (shift by 2). |
68 | */ | 61 | */ |
69 | #define PTRS_PER_PTE (1UL << (PAGE_SHIFT-2)) | 62 | #define PTRS_PER_PTE (1UL << (PAGE_SHIFT-2)) |
70 | #define PTRS_PER_PMD 1 | ||
71 | #define PTRS_PER_PGD (1UL << (PAGE_SHIFT-2)) | 63 | #define PTRS_PER_PGD (1UL << (PAGE_SHIFT-2)) |
72 | 64 | ||
73 | /* calculate how many PGD entries a user-level program can use | 65 | /* calculate how many PGD entries a user-level program can use |
@@ -105,7 +97,7 @@ extern unsigned long empty_zero_page; | |||
105 | #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) | 97 | #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) |
106 | #define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) | 98 | #define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) |
107 | 99 | ||
108 | #define pmd_none(x) (!pmd_val(x)) | 100 | #define pmd_none(x) (!pmd_val(x)) |
109 | /* by removing the _PAGE_KERNEL bit from the comparision, the same pmd_bad | 101 | /* by removing the _PAGE_KERNEL bit from the comparision, the same pmd_bad |
110 | * works for both _PAGE_TABLE and _KERNPG_TABLE pmd entries. | 102 | * works for both _PAGE_TABLE and _KERNPG_TABLE pmd entries. |
111 | */ | 103 | */ |
@@ -116,16 +108,6 @@ extern unsigned long empty_zero_page; | |||
116 | #ifndef __ASSEMBLY__ | 108 | #ifndef __ASSEMBLY__ |
117 | 109 | ||
118 | /* | 110 | /* |
119 | * The "pgd_xxx()" functions here are trivial for a folded two-level | ||
120 | * setup: the pgd is never bad, and a pmd always exists (as it's folded | ||
121 | * into the pgd entry) | ||
122 | */ | ||
123 | extern inline int pgd_none(pgd_t pgd) { return 0; } | ||
124 | extern inline int pgd_bad(pgd_t pgd) { return 0; } | ||
125 | extern inline int pgd_present(pgd_t pgd) { return 1; } | ||
126 | extern inline void pgd_clear(pgd_t * pgdp) { } | ||
127 | |||
128 | /* | ||
129 | * The following only work if pte_present() is true. | 111 | * The following only work if pte_present() is true. |
130 | * Undefined behaviour if not.. | 112 | * Undefined behaviour if not.. |
131 | */ | 113 | */ |
@@ -275,7 +257,7 @@ extern inline void pmd_set(pmd_t * pmdp, pte_t * ptep) | |||
275 | #define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | 257 | #define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) |
276 | 258 | ||
277 | /* to find an entry in a page-table-directory. */ | 259 | /* to find an entry in a page-table-directory. */ |
278 | #define pgd_index(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) | 260 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) |
279 | 261 | ||
280 | /* to find an entry in a page-table-directory */ | 262 | /* to find an entry in a page-table-directory */ |
281 | extern inline pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address) | 263 | extern inline pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address) |
@@ -286,12 +268,6 @@ extern inline pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address) | |||
286 | /* to find an entry in a kernel page-table-directory */ | 268 | /* to find an entry in a kernel page-table-directory */ |
287 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) | 269 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) |
288 | 270 | ||
289 | /* Find an entry in the second-level page table.. */ | ||
290 | extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) | ||
291 | { | ||
292 | return (pmd_t *) dir; | ||
293 | } | ||
294 | |||
295 | /* Find an entry in the third-level page table.. */ | 271 | /* Find an entry in the third-level page table.. */ |
296 | #define __pte_offset(address) \ | 272 | #define __pte_offset(address) \ |
297 | (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | 273 | (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) |
@@ -308,8 +284,6 @@ extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) | |||
308 | 284 | ||
309 | #define pte_ERROR(e) \ | 285 | #define pte_ERROR(e) \ |
310 | printk("%s:%d: bad pte %p(%08lx).\n", __FILE__, __LINE__, &(e), pte_val(e)) | 286 | printk("%s:%d: bad pte %p(%08lx).\n", __FILE__, __LINE__, &(e), pte_val(e)) |
311 | #define pmd_ERROR(e) \ | ||
312 | printk("%s:%d: bad pmd %p(%08lx).\n", __FILE__, __LINE__, &(e), pmd_val(e)) | ||
313 | #define pgd_ERROR(e) \ | 287 | #define pgd_ERROR(e) \ |
314 | printk("%s:%d: bad pgd %p(%08lx).\n", __FILE__, __LINE__, &(e), pgd_val(e)) | 288 | printk("%s:%d: bad pgd %p(%08lx).\n", __FILE__, __LINE__, &(e), pgd_val(e)) |
315 | 289 | ||
@@ -348,5 +322,7 @@ extern inline void update_mmu_cache(struct vm_area_struct * vma, | |||
348 | #define pte_to_pgoff(x) (pte_val(x) >> 6) | 322 | #define pte_to_pgoff(x) (pte_val(x) >> 6) |
349 | #define pgoff_to_pte(x) __pte(((x) << 6) | _PAGE_FILE) | 323 | #define pgoff_to_pte(x) __pte(((x) << 6) | _PAGE_FILE) |
350 | 324 | ||
325 | typedef pte_t *pte_addr_t; | ||
326 | |||
351 | #endif /* __ASSEMBLY__ */ | 327 | #endif /* __ASSEMBLY__ */ |
352 | #endif /* _CRIS_PGTABLE_H */ | 328 | #endif /* _CRIS_PGTABLE_H */ |
diff --git a/include/asm-cris/processor.h b/include/asm-cris/processor.h index 623bdf06d911..0dc218117bd8 100644 --- a/include/asm-cris/processor.h +++ b/include/asm-cris/processor.h | |||
@@ -55,15 +55,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
55 | 55 | ||
56 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) | 56 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) |
57 | 57 | ||
58 | /* | ||
59 | * Free current thread data structures etc.. | ||
60 | */ | ||
61 | |||
62 | extern inline void exit_thread(void) | ||
63 | { | ||
64 | /* Nothing needs to be done. */ | ||
65 | } | ||
66 | |||
67 | extern unsigned long thread_saved_pc(struct task_struct *tsk); | 58 | extern unsigned long thread_saved_pc(struct task_struct *tsk); |
68 | 59 | ||
69 | /* Free all resources held by a thread. */ | 60 | /* Free all resources held by a thread. */ |
diff --git a/include/asm-cris/thread_info.h b/include/asm-cris/thread_info.h index 5ba4b7865cc5..cef0140fc104 100644 --- a/include/asm-cris/thread_info.h +++ b/include/asm-cris/thread_info.h | |||
@@ -43,7 +43,7 @@ struct thread_info { | |||
43 | 43 | ||
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #define PREEMPT_ACTIVE 0x4000000 | 46 | #define PREEMPT_ACTIVE 0x10000000 |
47 | 47 | ||
48 | /* | 48 | /* |
49 | * macros/functions for gaining access to the thread information structure | 49 | * macros/functions for gaining access to the thread information structure |
diff --git a/include/asm-cris/timex.h b/include/asm-cris/timex.h index 375c41af47de..3fb069a37717 100644 --- a/include/asm-cris/timex.h +++ b/include/asm-cris/timex.h | |||
@@ -14,7 +14,7 @@ | |||
14 | * used so it does not matter. | 14 | * used so it does not matter. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | typedef unsigned int cycles_t; | 17 | typedef unsigned long long cycles_t; |
18 | 18 | ||
19 | extern inline cycles_t get_cycles(void) | 19 | extern inline cycles_t get_cycles(void) |
20 | { | 20 | { |
diff --git a/include/asm-cris/types.h b/include/asm-cris/types.h index 41a0d450ba1d..8fa6d6c7afce 100644 --- a/include/asm-cris/types.h +++ b/include/asm-cris/types.h | |||
@@ -52,7 +52,7 @@ typedef unsigned long long u64; | |||
52 | typedef u32 dma_addr_t; | 52 | typedef u32 dma_addr_t; |
53 | typedef u32 dma64_addr_t; | 53 | typedef u32 dma64_addr_t; |
54 | 54 | ||
55 | typedef unsigned int kmem_bufctl_t; | 55 | typedef unsigned short kmem_bufctl_t; |
56 | 56 | ||
57 | #endif /* __ASSEMBLY__ */ | 57 | #endif /* __ASSEMBLY__ */ |
58 | 58 | ||
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h index e80bf276b101..28232ad2ff34 100644 --- a/include/asm-cris/unistd.h +++ b/include/asm-cris/unistd.h | |||
@@ -288,8 +288,15 @@ | |||
288 | #define __NR_mq_timedreceive (__NR_mq_open+3) | 288 | #define __NR_mq_timedreceive (__NR_mq_open+3) |
289 | #define __NR_mq_notify (__NR_mq_open+4) | 289 | #define __NR_mq_notify (__NR_mq_open+4) |
290 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 290 | #define __NR_mq_getsetattr (__NR_mq_open+5) |
291 | 291 | #define __NR_sys_kexec_load 283 | |
292 | #define NR_syscalls 283 | 292 | #define __NR_waitid 284 |
293 | /* #define __NR_sys_setaltroot 285 */ | ||
294 | #define __NR_add_key 286 | ||
295 | #define __NR_request_key 287 | ||
296 | #define __NR_keyctl 288 | ||
297 | |||
298 | #define NR_syscalls 289 | ||
299 | |||
293 | 300 | ||
294 | 301 | ||
295 | #ifdef __KERNEL__ | 302 | #ifdef __KERNEL__ |