aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/include/asm
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-12-01 02:16:22 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2009-12-01 02:16:22 -0500
commit838632438145ac6863377eb12d8b8eef9c55d288 (patch)
treefbb0757df837f3c75a99c518a3596c38daef162d /arch/mn10300/include/asm
parent9996508b3353063f2d6c48c1a28a84543d72d70b (diff)
parent29e553631b2a0d4eebd23db630572e1027a9967a (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/mn10300/include/asm')
-rw-r--r--arch/mn10300/include/asm/cacheflush.h4
-rw-r--r--arch/mn10300/include/asm/gdb-stub.h1
-rw-r--r--arch/mn10300/include/asm/mman.h29
-rw-r--r--arch/mn10300/include/asm/mmu_context.h12
-rw-r--r--arch/mn10300/include/asm/uaccess.h73
-rw-r--r--arch/mn10300/include/asm/unistd.h2
6 files changed, 49 insertions, 72 deletions
diff --git a/arch/mn10300/include/asm/cacheflush.h b/arch/mn10300/include/asm/cacheflush.h
index 2db746a251f8..1a55d61f0d06 100644
--- a/arch/mn10300/include/asm/cacheflush.h
+++ b/arch/mn10300/include/asm/cacheflush.h
@@ -17,7 +17,7 @@
17#include <linux/mm.h> 17#include <linux/mm.h>
18 18
19/* 19/*
20 * virtually-indexed cache managment (our cache is physically indexed) 20 * virtually-indexed cache management (our cache is physically indexed)
21 */ 21 */
22#define flush_cache_all() do {} while (0) 22#define flush_cache_all() do {} while (0)
23#define flush_cache_mm(mm) do {} while (0) 23#define flush_cache_mm(mm) do {} while (0)
@@ -31,7 +31,7 @@
31#define flush_dcache_mmap_unlock(mapping) do {} while (0) 31#define flush_dcache_mmap_unlock(mapping) do {} while (0)
32 32
33/* 33/*
34 * physically-indexed cache managment 34 * physically-indexed cache management
35 */ 35 */
36#ifndef CONFIG_MN10300_CACHE_DISABLED 36#ifndef CONFIG_MN10300_CACHE_DISABLED
37 37
diff --git a/arch/mn10300/include/asm/gdb-stub.h b/arch/mn10300/include/asm/gdb-stub.h
index e5a6368559af..556cce992548 100644
--- a/arch/mn10300/include/asm/gdb-stub.h
+++ b/arch/mn10300/include/asm/gdb-stub.h
@@ -109,7 +109,6 @@ extern asmlinkage int gdbstub_intercept(struct pt_regs *, enum exception_code);
109extern asmlinkage void gdbstub_exception(struct pt_regs *, enum exception_code); 109extern asmlinkage void gdbstub_exception(struct pt_regs *, enum exception_code);
110extern asmlinkage void __gdbstub_bug_trap(void); 110extern asmlinkage void __gdbstub_bug_trap(void);
111extern asmlinkage void __gdbstub_pause(void); 111extern asmlinkage void __gdbstub_pause(void);
112extern asmlinkage void start_kernel(void);
113 112
114#ifndef CONFIG_MN10300_CACHE_DISABLED 113#ifndef CONFIG_MN10300_CACHE_DISABLED
115extern asmlinkage void gdbstub_purge_cache(void); 114extern asmlinkage void gdbstub_purge_cache(void);
diff --git a/arch/mn10300/include/asm/mman.h b/arch/mn10300/include/asm/mman.h
index d04fac1da5aa..8eebf89f5ab1 100644
--- a/arch/mn10300/include/asm/mman.h
+++ b/arch/mn10300/include/asm/mman.h
@@ -1,28 +1 @@
1/* MN10300 Constants for mmap and co. #include <asm-generic/mman.h>
2 *
3 * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
4 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
5 * - Derived from asm-x86/mman.h
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public Licence
9 * as published by the Free Software Foundation; either version
10 * 2 of the Licence, or (at your option) any later version.
11 */
12#ifndef _ASM_MMAN_H
13#define _ASM_MMAN_H
14
15#include <asm-generic/mman-common.h>
16
17#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
18#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
19#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
20#define MAP_LOCKED 0x2000 /* pages are locked */
21#define MAP_NORESERVE 0x4000 /* don't check for reservations */
22#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
23#define MAP_NONBLOCK 0x10000 /* do not block on IO */
24
25#define MCL_CURRENT 1 /* lock all current mappings */
26#define MCL_FUTURE 2 /* lock all future mappings */
27
28#endif /* _ASM_MMAN_H */
diff --git a/arch/mn10300/include/asm/mmu_context.h b/arch/mn10300/include/asm/mmu_context.h
index a9e2e34f69b0..cb294c244de3 100644
--- a/arch/mn10300/include/asm/mmu_context.h
+++ b/arch/mn10300/include/asm/mmu_context.h
@@ -38,13 +38,13 @@ extern unsigned long mmu_context_cache[NR_CPUS];
38#define enter_lazy_tlb(mm, tsk) do {} while (0) 38#define enter_lazy_tlb(mm, tsk) do {} while (0)
39 39
40#ifdef CONFIG_SMP 40#ifdef CONFIG_SMP
41#define cpu_ran_vm(cpu, task) \ 41#define cpu_ran_vm(cpu, mm) \
42 cpu_set((cpu), (task)->cpu_vm_mask) 42 cpumask_set_cpu((cpu), mm_cpumask(mm))
43#define cpu_maybe_ran_vm(cpu, task) \ 43#define cpu_maybe_ran_vm(cpu, mm) \
44 cpu_test_and_set((cpu), (task)->cpu_vm_mask) 44 cpumask_test_and_set_cpu((cpu), mm_cpumask(mm))
45#else 45#else
46#define cpu_ran_vm(cpu, task) do {} while (0) 46#define cpu_ran_vm(cpu, mm) do {} while (0)
47#define cpu_maybe_ran_vm(cpu, task) true 47#define cpu_maybe_ran_vm(cpu, mm) true
48#endif /* CONFIG_SMP */ 48#endif /* CONFIG_SMP */
49 49
50/* 50/*
diff --git a/arch/mn10300/include/asm/uaccess.h b/arch/mn10300/include/asm/uaccess.h
index 8a3a4dd55763..167e10ff06d9 100644
--- a/arch/mn10300/include/asm/uaccess.h
+++ b/arch/mn10300/include/asm/uaccess.h
@@ -129,42 +129,47 @@ extern int fixup_exception(struct pt_regs *regs);
129struct __large_struct { unsigned long buf[100]; }; 129struct __large_struct { unsigned long buf[100]; };
130#define __m(x) (*(struct __large_struct *)(x)) 130#define __m(x) (*(struct __large_struct *)(x))
131 131
132#define __get_user_nocheck(x, ptr, size) \ 132#define __get_user_nocheck(x, ptr, size) \
133({ \ 133({ \
134 __typeof(*(ptr)) __gu_val; \ 134 unsigned long __gu_addr; \
135 unsigned long __gu_addr; \ 135 int __gu_err; \
136 int __gu_err; \ 136 __gu_addr = (unsigned long) (ptr); \
137 __gu_addr = (unsigned long) (ptr); \ 137 switch (size) { \
138 switch (size) { \ 138 case 1: { \
139 case 1: __get_user_asm("bu"); break; \ 139 unsigned char __gu_val; \
140 case 2: __get_user_asm("hu"); break; \ 140 __get_user_asm("bu"); \
141 case 4: __get_user_asm("" ); break; \ 141 (x) = *(__force __typeof__(*(ptr))*) &__gu_val; \
142 default: __get_user_unknown(); break; \ 142 break; \
143 } \ 143 } \
144 x = (__typeof__(*(ptr))) __gu_val; \ 144 case 2: { \
145 __gu_err; \ 145 unsigned short __gu_val; \
146 __get_user_asm("hu"); \
147 (x) = *(__force __typeof__(*(ptr))*) &__gu_val; \
148 break; \
149 } \
150 case 4: { \
151 unsigned int __gu_val; \
152 __get_user_asm(""); \
153 (x) = *(__force __typeof__(*(ptr))*) &__gu_val; \
154 break; \
155 } \
156 default: \
157 __get_user_unknown(); \
158 break; \
159 } \
160 __gu_err; \
146}) 161})
147 162
148#define __get_user_check(x, ptr, size) \ 163#define __get_user_check(x, ptr, size) \
149({ \ 164({ \
150 __typeof__(*(ptr)) __gu_val; \ 165 int _e; \
151 unsigned long __gu_addr; \ 166 if (likely(__access_ok((unsigned long) (ptr), (size)))) \
152 int __gu_err; \ 167 _e = __get_user_nocheck((x), (ptr), (size)); \
153 __gu_addr = (unsigned long) (ptr); \ 168 else { \
154 if (likely(__access_ok(__gu_addr,size))) { \ 169 _e = -EFAULT; \
155 switch (size) { \ 170 (x) = (__typeof__(x))0; \
156 case 1: __get_user_asm("bu"); break; \ 171 } \
157 case 2: __get_user_asm("hu"); break; \ 172 _e; \
158 case 4: __get_user_asm("" ); break; \
159 default: __get_user_unknown(); break; \
160 } \
161 } \
162 else { \
163 __gu_err = -EFAULT; \
164 __gu_val = 0; \
165 } \
166 x = (__typeof__(*(ptr))) __gu_val; \
167 __gu_err; \
168}) 173})
169 174
170#define __get_user_asm(INSN) \ 175#define __get_user_asm(INSN) \
diff --git a/arch/mn10300/include/asm/unistd.h b/arch/mn10300/include/asm/unistd.h
index fad68616af32..2a983931c11f 100644
--- a/arch/mn10300/include/asm/unistd.h
+++ b/arch/mn10300/include/asm/unistd.h
@@ -347,7 +347,7 @@
347#define __NR_preadv 334 347#define __NR_preadv 334
348#define __NR_pwritev 335 348#define __NR_pwritev 335
349#define __NR_rt_tgsigqueueinfo 336 349#define __NR_rt_tgsigqueueinfo 336
350#define __NR_perf_counter_open 337 350#define __NR_perf_event_open 337
351 351
352#ifdef __KERNEL__ 352#ifdef __KERNEL__
353 353