aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-03-02 10:58:56 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-03-02 10:58:56 -0500
commite23b62256a361611cbd45cd1456638f1a5106b5c (patch)
tree472968c961432a1d9d0c3634ca20433f1d9cd29b /include/asm-generic
parentaebb2afd5420c860b7fbc3882a323ef1247fbf16 (diff)
parent8ccfe6675fa974bd06d64f74d0fdee6a5267d2aa (diff)
Merge tag 'arc-v3.9-rc1-late' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull new ARC architecture from Vineet Gupta: "Initial ARC Linux port with some fixes on top for 3.9-rc1: I would like to introduce the Linux port to ARC Processors (from Synopsys) for 3.9-rc1. The patch-set has been discussed on the public lists since Nov and has received a fair bit of review, specially from Arnd, tglx, Al and other subsystem maintainers for DeviceTree, kgdb... The arch bits are in arch/arc, some asm-generic changes (acked by Arnd), a minor change to PARISC (acked by Helge). The series is a touch bigger for a new port for 2 main reasons: 1. It enables a basic kernel in first sub-series and adds ptrace/kgdb/.. later 2. Some of the fallout of review (DeviceTree support, multi-platform- image support) were added on top of orig series, primarily to record the revision history. This updated pull request additionally contains - fixes due to our GNU tools catching up with the new syscall/ptrace ABI - some (minor) cross-arch Kconfig updates." * tag 'arc-v3.9-rc1-late' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: (82 commits) ARC: split elf.h into uapi and export it for userspace ARC: Fixup the current ABI version ARC: gdbserver using regset interface possibly broken ARC: Kconfig cleanup tracking cross-arch Kconfig pruning in merge window ARC: make a copy of flat DT ARC: [plat-arcfpga] DT arc-uart bindings change: "baud" => "current-speed" ARC: Ensure CONFIG_VIRT_TO_BUS is not enabled ARC: Fix pt_orig_r8 access ARC: [3.9] Fallout of hlist iterator update ARC: 64bit RTSC timestamp hardware issue ARC: Don't fiddle with non-existent caches ARC: Add self to MAINTAINERS ARC: Provide a default serial.h for uart drivers needing BASE_BAUD ARC: [plat-arcfpga] defconfig for fully loaded ARC Linux ARC: [Review] Multi-platform image #8: platform registers SMP callbacks ARC: [Review] Multi-platform image #7: SMP common code to use callbacks ARC: [Review] Multi-platform image #6: cpu-to-dma-addr optional ARC: [Review] Multi-platform image #5: NR_IRQS defined by ARC core ARC: [Review] Multi-platform image #4: Isolate platform headers ARC: [Review] Multi-platform image #3: switch to board callback ...
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/checksum.h4
-rw-r--r--include/asm-generic/uaccess.h14
2 files changed, 17 insertions, 1 deletions
diff --git a/include/asm-generic/checksum.h b/include/asm-generic/checksum.h
index c084767c88bc..59811df58c5b 100644
--- a/include/asm-generic/checksum.h
+++ b/include/asm-generic/checksum.h
@@ -38,12 +38,15 @@ extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst,
38 csum_partial_copy((src), (dst), (len), (sum)) 38 csum_partial_copy((src), (dst), (len), (sum))
39#endif 39#endif
40 40
41#ifndef ip_fast_csum
41/* 42/*
42 * This is a version of ip_compute_csum() optimized for IP headers, 43 * This is a version of ip_compute_csum() optimized for IP headers,
43 * which always checksum on 4 octet boundaries. 44 * which always checksum on 4 octet boundaries.
44 */ 45 */
45extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl); 46extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl);
47#endif
46 48
49#ifndef csum_fold
47/* 50/*
48 * Fold a partial checksum 51 * Fold a partial checksum
49 */ 52 */
@@ -54,6 +57,7 @@ static inline __sum16 csum_fold(__wsum csum)
54 sum = (sum & 0xffff) + (sum >> 16); 57 sum = (sum & 0xffff) + (sum >> 16);
55 return (__force __sum16)~sum; 58 return (__force __sum16)~sum;
56} 59}
60#endif
57 61
58#ifndef csum_tcpudp_nofold 62#ifndef csum_tcpudp_nofold
59/* 63/*
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h
index 9788568f7978..c184aa8ec8cd 100644
--- a/include/asm-generic/uaccess.h
+++ b/include/asm-generic/uaccess.h
@@ -7,7 +7,6 @@
7 * address space, e.g. all NOMMU machines. 7 * address space, e.g. all NOMMU machines.
8 */ 8 */
9#include <linux/sched.h> 9#include <linux/sched.h>
10#include <linux/mm.h>
11#include <linux/string.h> 10#include <linux/string.h>
12 11
13#include <asm/segment.h> 12#include <asm/segment.h>
@@ -32,7 +31,9 @@ static inline void set_fs(mm_segment_t fs)
32} 31}
33#endif 32#endif
34 33
34#ifndef segment_eq
35#define segment_eq(a, b) ((a).seg == (b).seg) 35#define segment_eq(a, b) ((a).seg == (b).seg)
36#endif
36 37
37#define VERIFY_READ 0 38#define VERIFY_READ 0
38#define VERIFY_WRITE 1 39#define VERIFY_WRITE 1
@@ -168,12 +169,18 @@ static inline __must_check long __copy_to_user(void __user *to,
168 -EFAULT; \ 169 -EFAULT; \
169}) 170})
170 171
172#ifndef __put_user_fn
173
171static inline int __put_user_fn(size_t size, void __user *ptr, void *x) 174static inline int __put_user_fn(size_t size, void __user *ptr, void *x)
172{ 175{
173 size = __copy_to_user(ptr, x, size); 176 size = __copy_to_user(ptr, x, size);
174 return size ? -EFAULT : size; 177 return size ? -EFAULT : size;
175} 178}
176 179
180#define __put_user_fn(sz, u, k) __put_user_fn(sz, u, k)
181
182#endif
183
177extern int __put_user_bad(void) __attribute__((noreturn)); 184extern int __put_user_bad(void) __attribute__((noreturn));
178 185
179#define __get_user(x, ptr) \ 186#define __get_user(x, ptr) \
@@ -224,12 +231,17 @@ extern int __put_user_bad(void) __attribute__((noreturn));
224 -EFAULT; \ 231 -EFAULT; \
225}) 232})
226 233
234#ifndef __get_user_fn
227static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) 235static inline int __get_user_fn(size_t size, const void __user *ptr, void *x)
228{ 236{
229 size = __copy_from_user(x, ptr, size); 237 size = __copy_from_user(x, ptr, size);
230 return size ? -EFAULT : size; 238 return size ? -EFAULT : size;
231} 239}
232 240
241#define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
242
243#endif
244
233extern int __get_user_bad(void) __attribute__((noreturn)); 245extern int __get_user_bad(void) __attribute__((noreturn));
234 246
235#ifndef __copy_from_user_inatomic 247#ifndef __copy_from_user_inatomic