Add support kernel v4.19 74/206774/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.010013 accepted/tizen/5.5/unified/mobile/hotfix/20201027.063157 accepted/tizen/5.5/unified/wearable/hotfix/20201027.103039 accepted/tizen/unified/20190602.221907 submit/tizen/20190528.103211 submit/tizen_5.5/20191031.000006 submit/tizen_5.5_mobile_hotfix/20201026.185106 submit/tizen_5.5_wearable_hotfix/20201026.184306 tizen_5.5.m2_release
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 22 May 2019 08:12:40 +0000 (17:12 +0900)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 24 May 2019 15:51:20 +0000 (18:51 +0300)
Change-Id: Id838ca74209cc3236db0768155aaabbd1e7e4e7e
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
modules/arch/arm/probes/compat_arm64.h
modules/master/wait.h
modules/parser/usm_msg.c
modules/uprobe/arch/arm64/swap-asm/swap_uprobes.c

index e85766e58e69536e0a22c9a3a5978847ca75bb71..bf4d7b9957fcde9a086d937f350f872e29054135 100644 (file)
 
 #ifdef CONFIG_ARM64
 
+# include <linux/version.h>
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
+#  define COMPAT_PSR_MODE_MASK PSR_AA32_MODE_MASK
+#  define COMPAT_PSR_MODE_USR  PSR_AA32_MODE_USR
+#  define COMPAT_PSR_T_BIT     PSR_AA32_T_BIT
+# endif /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) */
+
 # define PSR_T_BIT             COMPAT_PSR_T_BIT
 
 # define ARM_r0                        compat_usr(0)
index e003027c364dbf7ecf806ebcad5d3ff556a831a9..a23f59cf56bdae1bfdd379463c2143b1f5f3caf6 100644 (file)
@@ -32,6 +32,20 @@ int wait_on_atomic_t(atomic_t *val, int (*action)(atomic_t *), unsigned mode)
 # include <linux/wait.h>
 #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) */
 # include <linux/wait_bit.h>
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
+# include <linux/sched.h>
+static inline void wake_up_atomic_t(atomic_t *val)
+{
+       wake_up_var(val);
+}
+
+static inline int wait_on_atomic_t(atomic_t *val, int (*action)(atomic_t *),
+                                  unsigned mode)
+{
+       wait_var_event(val, !atomic_read(val));
+       return 0;
+}
+# endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0) */
 #endif /* LINUX_VERSION_CODE */
 
 #endif /* _SWAP_WAIT_H */
index 673fad70789ad4ce6333fbb07680879ac643ff77..cd96aea40600738fac416b057b7df5a6568d8976 100644 (file)
@@ -69,9 +69,12 @@ static void kmem_info_fill_common(struct kmem_info *info, struct task_struct *ta
 static void kmem_info_fill(struct kmem_info *info, struct task_struct *task)
 {
 #if defined(CONFIG_ARM)
+# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+#  define VECTORS_BASE CONFIG_VECTORS_BASE
+# endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) */
        info->name = "[vectors]";
-       info->start = CONFIG_VECTORS_BASE;
-       info->end = CONFIG_VECTORS_BASE + PAGE_SIZE;
+       info->start = VECTORS_BASE;
+       info->end = VECTORS_BASE + PAGE_SIZE;
 #elif defined(CONFIG_ARM64)
        if (test_ti_thread_flag(task_thread_info(task), TIF_32BIT)) {
                info->name = "[vectors]";
@@ -547,6 +550,16 @@ static int is_file_mode(umode_t mode)
        return S_ISREG(mode);
 }
 
+static int do_kernel_getsockname(struct socket *sock, struct sockaddr *addr)
+{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
+       return kernel_getsockname(sock, addr);
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0) */
+       int addrlen;
+       return kernel_getsockname(sock, addr, &addrlen);
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0) */
+}
+
 static int pack_osock(void *data, size_t size, int fd, struct file *file,
                      loff_t fsize)
 {
@@ -556,7 +569,6 @@ static int pack_osock(void *data, size_t size, int fd, struct file *file,
        struct sockaddr *saddr = (struct sockaddr *)&addr;
        struct sockaddr_in *sin = (struct sockaddr_in *)&addr;
        int ret_size = sizeof(*pack_sock);
-       int addrlen;
        int err;
 
        if (size < sizeof(*pack_sock))
@@ -570,7 +582,7 @@ static int pack_osock(void *data, size_t size, int fd, struct file *file,
        if (!sock)
                return 0;
 
-       kernel_getsockname(sock, saddr, &addrlen);
+       do_kernel_getsockname(sock, saddr);
 
        pack_sock = (struct osock *)data;
        pack_sock->fd = (u32)fd;
index d5e26271430c1127b41d77da9b620fec0d9ff910..09ee042e10e9e5d14a9869a23aa811da28d21e42 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <linux/kconfig.h>
 #include <linux/types.h>
+#include <linux/sched.h>       /* needed for asm/traps.h */
 #include <asm/traps.h>
 #include <arch/arm/uprobe/swap_uprobe.h>
 #include <uprobe/swap_uprobes.h>