Merge branches 'uaccess.alpha', 'uaccess.arc', 'uaccess.arm', 'uaccess.arm64', 'uaccess.avr32', 'uaccess.bfin', 'uaccess.c6x', 'uaccess.cris', 'uaccess.frv', 'uaccess.h8300', 'uaccess.hexagon', 'uaccess.ia64', 'uaccess.m32r', 'uaccess.m68k', 'uaccess.metag', 'uaccess.microblaze', 'uaccess.mips', 'uaccess.mn10300', 'uaccess.nios2', 'uaccess.openrisc', 'uaccess.parisc', 'uaccess.powerpc', 'uaccess.s390', 'uaccess.score', 'uaccess.sh', 'uaccess.sparc', 'uaccess.tile', 'uaccess.um', 'uaccess.unicore32', 'uaccess.x86' and 'uaccess.xtensa' into work.uaccess
This commit is contained in:

parent
bf7af0cea8
ec022681a4
e13909a4ac
4de5b63e76
92430dab36
e5c1540030
50e9ab915a
86944ee158
0c7e9a870e
48f666c986
33ab2da801
ac4691fac8
b3622d3217
9a677341cd
29be02eb6f
840db3f938
d491afb865
2260ea86c0
19dbf70c5a
de51d6cc2c
ab89866be3
f64fd180ec
3448890c32
37096003c8
dc14253523
f98f48ee7c
31af2f36d5
23504bae7f
a668ce3a00
2ef59f2856
beba3a20bf
7d4914db8f
commit
eea86b637a
@@ -13,6 +13,7 @@ generic-y += dma.h
|
||||
generic-y += emergency-restart.h
|
||||
generic-y += errno.h
|
||||
generic-y += exec.h
|
||||
generic-y += extable.h
|
||||
generic-y += fb.h
|
||||
generic-y += fcntl.h
|
||||
generic-y += ftrace.h
|
||||
@@ -68,7 +69,6 @@ generic-y += tlbflush.h
|
||||
generic-y += trace_clock.h
|
||||
generic-y += topology.h
|
||||
generic-y += types.h
|
||||
generic-y += uaccess.h
|
||||
generic-y += ucontext.h
|
||||
generic-y += unaligned.h
|
||||
generic-y += vga.h
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#ifndef _H8300_PGTABLE_H
|
||||
#define _H8300_PGTABLE_H
|
||||
#define __ARCH_USE_5LEVEL_HACK
|
||||
#include <asm-generic/pgtable-nopud.h>
|
||||
#include <asm-generic/pgtable.h>
|
||||
#define pgtable_cache_init() do { } while (0)
|
||||
|
54
arch/h8300/include/asm/uaccess.h
Normal file
54
arch/h8300/include/asm/uaccess.h
Normal file
@@ -0,0 +1,54 @@
|
||||
#ifndef _ASM_UACCESS_H
|
||||
#define _ASM_UACCESS_H
|
||||
|
||||
#include <linux/string.h>
|
||||
|
||||
static inline __must_check unsigned long
|
||||
raw_copy_from_user(void *to, const void __user * from, unsigned long n)
|
||||
{
|
||||
if (__builtin_constant_p(n)) {
|
||||
switch(n) {
|
||||
case 1:
|
||||
*(u8 *)to = *(u8 __force *)from;
|
||||
return 0;
|
||||
case 2:
|
||||
*(u16 *)to = *(u16 __force *)from;
|
||||
return 0;
|
||||
case 4:
|
||||
*(u32 *)to = *(u32 __force *)from;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(to, (const void __force *)from, n);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline __must_check unsigned long
|
||||
raw_copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||
{
|
||||
if (__builtin_constant_p(n)) {
|
||||
switch(n) {
|
||||
case 1:
|
||||
*(u8 __force *)to = *(u8 *)from;
|
||||
return 0;
|
||||
case 2:
|
||||
*(u16 __force *)to = *(u16 *)from;
|
||||
return 0;
|
||||
case 4:
|
||||
*(u32 __force *)to = *(u32 *)from;
|
||||
return 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy((void __force *)to, from, n);
|
||||
return 0;
|
||||
}
|
||||
#define INLINE_COPY_FROM_USER
|
||||
#define INLINE_COPY_TO_USER
|
||||
|
||||
#include <asm-generic/uaccess.h>
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user