-
Notifications
You must be signed in to change notification settings - Fork 1
/
kernel_patch.diff
63 lines (57 loc) · 2.26 KB
/
kernel_patch.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--- arch/arm64/include/asm/uaccess.h 2016-08-16 10:31:54.000000000 +0300
+++ ../linux-4.4.18.my/arch/arm64/include/asm/uaccess.h 2021-05-14 12:14:23.295621670 +0300
@@ -247,15 +247,19 @@
-EFAULT; \
})
-extern unsigned long __must_check __copy_from_user(void *to, const void __user *from, unsigned long n);
-extern unsigned long __must_check __copy_to_user(void __user *to, const void *from, unsigned long n);
+extern unsigned long __must_check __arch_copy_from_user(void *to, const void __user *from, unsigned long n);
+extern unsigned long __must_check __arch_copy_to_user(void __user *to, const void *from, unsigned long n);
extern unsigned long __must_check __copy_in_user(void __user *to, const void __user *from, unsigned long n);
extern unsigned long __must_check __clear_user(void __user *addr, unsigned long n);
+#define __copy_to_user __arch_copy_to_user
+#define __copy_from_user __arch_copy_from_user
+
+
static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n)
{
if (access_ok(VERIFY_READ, from, n))
- n = __copy_from_user(to, from, n);
+ n = __arch_copy_from_user(to, from, n);
else /* security hole - plug it */
memset(to, 0, n);
return n;
@@ -264,7 +268,7 @@
static inline unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long n)
{
if (access_ok(VERIFY_WRITE, to, n))
- n = __copy_to_user(to, from, n);
+ n = __arch_copy_to_user(to, from, n);
return n;
}
@@ -275,8 +279,8 @@
return n;
}
-#define __copy_to_user_inatomic __copy_to_user
-#define __copy_from_user_inatomic __copy_from_user
+#define __copy_to_user_inatomic __arch_copy_to_user
+#define __copy_from_user_inatomic __arch_copy_from_user
static inline unsigned long __must_check clear_user(void __user *to, unsigned long n)
{
--- arch/arm64/Kconfig.platforms 2016-08-16 10:31:54.000000000 +0300
+++ ../linux-4.4.18.my/arch/arm64/Kconfig.platforms 2021-05-13 15:16:16.247434443 +0300
@@ -128,4 +128,15 @@
help
This enables support for Xilinx ZynqMP Family
+config ARCH_RTD129x
+ bool "Realtek RTD129x SoC Family"
+ select ARM_GIC
+ select CLKSRC_OF
+ select PINCTRL
+ select RTK_PLATFORM
+ select PM_OPP
+ select IRDA
+ help
+ This enables support for Realtek RTD129x SoC Family
+
endmenu