diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-02-01 21:33:45 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-02-01 21:33:45 -0500 |
commit | 9d3f1881abeae0494a27716b08fcf2d3264bb0fa (patch) | |
tree | f457dd2d35af29bc831b93865efa47229d0b9bee /arch/sparc/include | |
parent | b6c58b1d987a5795086c5c2babd8c7367d2fdb8c (diff) | |
parent | bc10e875d4aeaa93a0d418d8b4346b72f5067ea0 (diff) |
Merge branch 'sh/stable-updates'
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/elf_64.h | 13 | ||||
-rw-r--r-- | arch/sparc/include/asm/io_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/page_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/param.h | 19 | ||||
-rw-r--r-- | arch/sparc/include/asm/thread_info_64.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/timex_32.h | 1 | ||||
-rw-r--r-- | arch/sparc/include/asm/topology_64.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/uaccess_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/uaccess_64.h | 2 |
9 files changed, 14 insertions, 35 deletions
diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h index ff66bb88537b..e67880381b84 100644 --- a/arch/sparc/include/asm/elf_64.h +++ b/arch/sparc/include/asm/elf_64.h | |||
@@ -195,17 +195,10 @@ static inline unsigned int sparc64_elf_hwcap(void) | |||
195 | #define ELF_PLATFORM (NULL) | 195 | #define ELF_PLATFORM (NULL) |
196 | 196 | ||
197 | #define SET_PERSONALITY(ex) \ | 197 | #define SET_PERSONALITY(ex) \ |
198 | do { unsigned long new_flags = current_thread_info()->flags; \ | 198 | do { if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ |
199 | new_flags &= _TIF_32BIT; \ | 199 | set_thread_flag(TIF_32BIT); \ |
200 | if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ | ||
201 | new_flags |= _TIF_32BIT; \ | ||
202 | else \ | 200 | else \ |
203 | new_flags &= ~_TIF_32BIT; \ | 201 | clear_thread_flag(TIF_32BIT); \ |
204 | if ((current_thread_info()->flags & _TIF_32BIT) \ | ||
205 | != new_flags) \ | ||
206 | set_thread_flag(TIF_ABI_PENDING); \ | ||
207 | else \ | ||
208 | clear_thread_flag(TIF_ABI_PENDING); \ | ||
209 | /* flush_thread will update pgd cache */ \ | 202 | /* flush_thread will update pgd cache */ \ |
210 | if (personality(current->personality) != PER_LINUX32) \ | 203 | if (personality(current->personality) != PER_LINUX32) \ |
211 | set_personality(PER_LINUX | \ | 204 | set_personality(PER_LINUX | \ |
diff --git a/arch/sparc/include/asm/io_32.h b/arch/sparc/include/asm/io_32.h index 93fe21e02c86..679c7504625a 100644 --- a/arch/sparc/include/asm/io_32.h +++ b/arch/sparc/include/asm/io_32.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <asm/page.h> /* IO address mapping routines need this */ | 8 | #include <asm/page.h> /* IO address mapping routines need this */ |
9 | #include <asm/system.h> | 9 | #include <asm/system.h> |
10 | 10 | ||
11 | #define page_to_phys(page) (((page) - mem_map) << PAGE_SHIFT) | 11 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
12 | 12 | ||
13 | static inline u32 flip_dword (u32 l) | 13 | static inline u32 flip_dword (u32 l) |
14 | { | 14 | { |
diff --git a/arch/sparc/include/asm/page_32.h b/arch/sparc/include/asm/page_32.h index f72080bdda94..156707b0f18d 100644 --- a/arch/sparc/include/asm/page_32.h +++ b/arch/sparc/include/asm/page_32.h | |||
@@ -143,7 +143,7 @@ extern unsigned long pfn_base; | |||
143 | #define phys_to_virt __va | 143 | #define phys_to_virt __va |
144 | 144 | ||
145 | #define ARCH_PFN_OFFSET (pfn_base) | 145 | #define ARCH_PFN_OFFSET (pfn_base) |
146 | #define virt_to_page(kaddr) (mem_map + ((((unsigned long)(kaddr)-PAGE_OFFSET)>>PAGE_SHIFT))) | 146 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
147 | 147 | ||
148 | #define pfn_valid(pfn) (((pfn) >= (pfn_base)) && (((pfn)-(pfn_base)) < max_mapnr)) | 148 | #define pfn_valid(pfn) (((pfn) >= (pfn_base)) && (((pfn)-(pfn_base)) < max_mapnr)) |
149 | #define virt_addr_valid(kaddr) ((((unsigned long)(kaddr)-PAGE_OFFSET)>>PAGE_SHIFT) < max_mapnr) | 149 | #define virt_addr_valid(kaddr) ((((unsigned long)(kaddr)-PAGE_OFFSET)>>PAGE_SHIFT) < max_mapnr) |
diff --git a/arch/sparc/include/asm/param.h b/arch/sparc/include/asm/param.h index 9836d9a3cb9a..0bc356bf8c50 100644 --- a/arch/sparc/include/asm/param.h +++ b/arch/sparc/include/asm/param.h | |||
@@ -1,22 +1,7 @@ | |||
1 | #ifndef _ASMSPARC_PARAM_H | 1 | #ifndef _ASMSPARC_PARAM_H |
2 | #define _ASMSPARC_PARAM_H | 2 | #define _ASMSPARC_PARAM_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | ||
5 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ | ||
6 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ | ||
7 | # define CLOCKS_PER_SEC (USER_HZ) | ||
8 | #endif | ||
9 | |||
10 | #ifndef HZ | ||
11 | #define HZ 100 | ||
12 | #endif | ||
13 | |||
14 | #define EXEC_PAGESIZE 8192 /* Thanks for sun4's we carry baggage... */ | 4 | #define EXEC_PAGESIZE 8192 /* Thanks for sun4's we carry baggage... */ |
5 | #include <asm-generic/param.h> | ||
15 | 6 | ||
16 | #ifndef NOGROUP | 7 | #endif /* _ASMSPARC_PARAM_H */ |
17 | #define NOGROUP (-1) | ||
18 | #endif | ||
19 | |||
20 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
21 | |||
22 | #endif | ||
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index 7257ebb8f394..39be9f256e5a 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h | |||
@@ -228,12 +228,11 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
228 | #define TIF_SECCOMP 9 /* secure computing */ | 228 | #define TIF_SECCOMP 9 /* secure computing */ |
229 | #define TIF_SYSCALL_AUDIT 10 /* syscall auditing active */ | 229 | #define TIF_SYSCALL_AUDIT 10 /* syscall auditing active */ |
230 | #define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */ | 230 | #define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */ |
231 | /* flag bit 11 is available */ | ||
232 | /* NOTE: Thread flags >= 12 should be ones we have no interest | 231 | /* NOTE: Thread flags >= 12 should be ones we have no interest |
233 | * in using in assembly, else we can't use the mask as | 232 | * in using in assembly, else we can't use the mask as |
234 | * an immediate value in instructions such as andcc. | 233 | * an immediate value in instructions such as andcc. |
235 | */ | 234 | */ |
236 | #define TIF_ABI_PENDING 12 | 235 | /* flag bit 12 is available */ |
237 | #define TIF_MEMDIE 13 | 236 | #define TIF_MEMDIE 13 |
238 | #define TIF_POLLING_NRFLAG 14 | 237 | #define TIF_POLLING_NRFLAG 14 |
239 | #define TIF_FREEZE 15 /* is freezing for suspend */ | 238 | #define TIF_FREEZE 15 /* is freezing for suspend */ |
@@ -248,7 +247,6 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
248 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 247 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
249 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 248 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
250 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) | 249 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) |
251 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | ||
252 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 250 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
253 | #define _TIF_FREEZE (1<<TIF_FREEZE) | 251 | #define _TIF_FREEZE (1<<TIF_FREEZE) |
254 | 252 | ||
diff --git a/arch/sparc/include/asm/timex_32.h b/arch/sparc/include/asm/timex_32.h index b6ccdb0d6f7d..a254750e4c03 100644 --- a/arch/sparc/include/asm/timex_32.h +++ b/arch/sparc/include/asm/timex_32.h | |||
@@ -12,4 +12,5 @@ | |||
12 | typedef unsigned long cycles_t; | 12 | typedef unsigned long cycles_t; |
13 | #define get_cycles() (0) | 13 | #define get_cycles() (0) |
14 | 14 | ||
15 | extern u32 (*do_arch_gettimeoffset)(void); | ||
15 | #endif | 16 | #endif |
diff --git a/arch/sparc/include/asm/topology_64.h b/arch/sparc/include/asm/topology_64.h index 600a79035fa1..1c79f32734a0 100644 --- a/arch/sparc/include/asm/topology_64.h +++ b/arch/sparc/include/asm/topology_64.h | |||
@@ -12,7 +12,9 @@ static inline int cpu_to_node(int cpu) | |||
12 | 12 | ||
13 | #define parent_node(node) (node) | 13 | #define parent_node(node) (node) |
14 | 14 | ||
15 | #define cpumask_of_node(node) (&numa_cpumask_lookup_table[node]) | 15 | #define cpumask_of_node(node) ((node) == -1 ? \ |
16 | cpu_all_mask : \ | ||
17 | &numa_cpumask_lookup_table[node]) | ||
16 | 18 | ||
17 | struct pci_bus; | 19 | struct pci_bus; |
18 | #ifdef CONFIG_PCI | 20 | #ifdef CONFIG_PCI |
diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h index 489d2ba92bcb..25f1d10155e8 100644 --- a/arch/sparc/include/asm/uaccess_32.h +++ b/arch/sparc/include/asm/uaccess_32.h | |||
@@ -274,7 +274,7 @@ static inline unsigned long copy_from_user(void *to, const void __user *from, un | |||
274 | 274 | ||
275 | if (unlikely(sz != -1 && sz < n)) { | 275 | if (unlikely(sz != -1 && sz < n)) { |
276 | copy_from_user_overflow(); | 276 | copy_from_user_overflow(); |
277 | return -EFAULT; | 277 | return n; |
278 | } | 278 | } |
279 | 279 | ||
280 | if (n && __access_ok((unsigned long) from, n)) | 280 | if (n && __access_ok((unsigned long) from, n)) |
diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h index dbc141660994..2406788bfe5f 100644 --- a/arch/sparc/include/asm/uaccess_64.h +++ b/arch/sparc/include/asm/uaccess_64.h | |||
@@ -221,8 +221,8 @@ extern unsigned long copy_from_user_fixup(void *to, const void __user *from, | |||
221 | static inline unsigned long __must_check | 221 | static inline unsigned long __must_check |
222 | copy_from_user(void *to, const void __user *from, unsigned long size) | 222 | copy_from_user(void *to, const void __user *from, unsigned long size) |
223 | { | 223 | { |
224 | unsigned long ret = (unsigned long) -EFAULT; | ||
225 | int sz = __compiletime_object_size(to); | 224 | int sz = __compiletime_object_size(to); |
225 | unsigned long ret = size; | ||
226 | 226 | ||
227 | if (likely(sz == -1 || sz >= size)) { | 227 | if (likely(sz == -1 || sz >= size)) { |
228 | ret = ___copy_from_user(to, from, size); | 228 | ret = ___copy_from_user(to, from, size); |