From 1572a97f4b245385f3eb059eec10d620dec51bc3 Mon Sep 17 00:00:00 2001 From: Dmitry Kovalenko Date: Mon, 3 Oct 2016 17:27:23 +0300 Subject: [PATCH 01/16] packaging: devel package name unification All kernels provides unified kernel-devel-tizen package and located at /boot/kernel/devel/tizen-devel (solved using symlink). Change-Id: Ie0fd3d6572d78d3eeaa3df0bca83cafa5700caa2 Signed-off-by: Dmitry Kovalenko [Update commit-msg and just add Provided name for devel package instead of replacing] Signed-off-by: Seung-Woo Kim --- packaging/linux-3.10-sc7730.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packaging/linux-3.10-sc7730.spec b/packaging/linux-3.10-sc7730.spec index 6a5497c..0900b54 100644 --- a/packaging/linux-3.10-sc7730.spec +++ b/packaging/linux-3.10-sc7730.spec @@ -82,6 +82,7 @@ License: GPL-2.0 Summary: Linux support kernel map and etc for other package Group: System/Kernel Provides: kernel-devel-tizen-dev +Provides: kernel-devel-tizen %description -n kernel-devel-3.10-sc7730 This package provides kernel map and etc information. @@ -169,6 +170,9 @@ for i in %{BOARDS}; do mv %_builddir/kernel-devel-$target %{buildroot}/boot/kernel/devel/kernel-devel-$i done +# Assumed that actually there is one board +ln -s kernel-devel-$i %{buildroot}/boot/kernel/devel/tizen-devel + find %{buildroot}/boot/kernel/ -name "*.h" -exec chmod 644 {} \; find %{buildroot}/boot/kernel/ -name 'System.map' -not -path "%{buildroot}/boot/kernel/devel/*" > develfiles.pre # for secure storage -- 2.7.4 From ee59be35abfd69893c7ab1efb022622c5e9cc073 Mon Sep 17 00:00:00 2001 From: Joonyoung Shim Date: Mon, 10 Oct 2016 10:31:24 +0900 Subject: [PATCH 02/16] staging/ion: enable debugfs for pool Define DEBUG_HEAP_SHRINKER to enable debugfs to shrink pool and read pool size. Change-Id: Ic3d5ef7a68eb8b3a08d4d6e98872f895aa7f7de4 Signed-off-by: Joonyoung Shim --- drivers/staging/android/ion/ion.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 4bbc600..c06101c 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -44,6 +44,10 @@ #include "ion_priv.h" #include "compat_ion.h" +#ifdef CONFIG_ION_SPRD +#define DEBUG_HEAP_SHRINKER +#endif + /** * struct ion_device - the metadata of the ion device node * @dev: the actual misc device -- 2.7.4 From f14b98485ac21a90ff0aff32e460785d04c3df9d Mon Sep 17 00:00:00 2001 From: Behan Webster Date: Wed, 24 Sep 2014 01:06:46 +0100 Subject: [PATCH 03/16] ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h With compilers which follow the C99 standard (like modern versions of gcc and clang), "extern inline" does the wrong thing (emits code for an externally linkable version of the inline function). In this case using static inline and removing the NULL version of return_address in return_address.c does the right thing. Signed-off-by: Behan Webster Reviewed-by: Mark Charlebois Acked-by: Steven Rostedt Signed-off-by: Russell King [Backport from mainline to fix build error with gcc 5.x or later] Reported-by: Sung-jae Park Signed-off-by: Seung-Woo Kim Change-Id: I8a1cbff2ce69a9d9d021b434ae062fdf0bbc67c0 --- arch/arm/include/asm/ftrace.h | 2 +- arch/arm/kernel/return_address.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h index 39eb16b..bfe2a2f 100644 --- a/arch/arm/include/asm/ftrace.h +++ b/arch/arm/include/asm/ftrace.h @@ -45,7 +45,7 @@ void *return_address(unsigned int); #else -extern inline void *return_address(unsigned int level) +static inline void *return_address(unsigned int level) { return NULL; } diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c index fafedd8..f6aa84d 100644 --- a/arch/arm/kernel/return_address.c +++ b/arch/arm/kernel/return_address.c @@ -63,11 +63,6 @@ void *return_address(unsigned int level) #warning "TODO: return_address should use unwind tables" #endif -void *return_address(unsigned int level) -{ - return NULL; -} - #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */ EXPORT_SYMBOL_GPL(return_address); -- 2.7.4 From 626d7661dc035a42335e3478ad32b396470d5fc1 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Thu, 27 Oct 2016 14:26:15 +0900 Subject: [PATCH 04/16] cpufreq: sprd: move unused prototypes to blocked area This patch blocks unused prototypes which causes following build error on specific toolchains. In file included from include/asm-generic/percpu.h:6:0, from /home/sw0312.kim/linux-3.10-sc7730/arch/arm/include/asm/percpu.h:50, from include/linux/percpu.h:10, from include/linux/kernel_stat.h:6, from drivers/cpufreq/cpufreq_sprdemand.c:18: drivers/cpufreq/cpufreq_sprdemand.c: At top level: drivers/cpufreq/cpufreq_sprdemand.c:101:48: error: storage size of 'uwi' isn't known static DEFINE_PER_CPU(struct unplug_work_info, uwi); ^ Change-Id: Ida47ea5e16a2f3f8883afe37adf9fcb9975c9ef1 Reported-by: Sung-jae Park Signed-off-by: Seung-Woo Kim --- drivers/cpufreq/cpufreq_sprdemand.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/cpufreq/cpufreq_sprdemand.c b/drivers/cpufreq/cpufreq_sprdemand.c index 23f9f09..35046b1 100644 --- a/drivers/cpufreq/cpufreq_sprdemand.c +++ b/drivers/cpufreq/cpufreq_sprdemand.c @@ -88,6 +88,11 @@ struct unplug_work_info { struct dbs_data *dbs_data; }; static DEFINE_PER_CPU(struct unplug_work_info, uwi); + +static DEFINE_SPINLOCK(g_lock); +static unsigned int percpu_total_load[CONFIG_NR_CPUS] = {0}; +static unsigned int percpu_check_count[CONFIG_NR_CPUS] = {0}; +static int cpu_score = 0; #endif struct delayed_work plugin_work; @@ -98,13 +103,6 @@ struct work_struct unplug_all_work; static int cpu_num_limit_temp; static void sprd_thm_unplug_cpu(struct work_struct *work); -static DEFINE_PER_CPU(struct unplug_work_info, uwi); - -static DEFINE_SPINLOCK(g_lock); -static unsigned int percpu_total_load[CONFIG_NR_CPUS] = {0}; -static unsigned int percpu_check_count[CONFIG_NR_CPUS] = {0}; -static int cpu_score = 0; - /* FIXME. default touch boost is enabled */ #define CONFIG_TOUCH_BOOST -- 2.7.4 From 14f5d375928283aeac056481b207b64c6ffa23a6 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Thu, 25 Jun 2015 15:01:02 -0700 Subject: [PATCH 05/16] compiler-gcc: integrate the various compiler-gcc[345].h files MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit commit cb984d101b30eb7478d32df56a0023e4603cba7f upstream. As gcc major version numbers are going to advance rather rapidly in the future, there's no real value in separate files for each compiler version. Deduplicate some of the macros #defined in each file too. Neaten comments using normal kernel commenting style. Signed-off-by: Joe Perches Cc: Andi Kleen Cc: Michal Marek Cc: Segher Boessenkool Cc: Sasha Levin Cc: Anton Blanchard Cc: Alan Modra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [ philm: backport to 3.10-stable ] Signed-off-by: Philip Müller Signed-off-by: Willy Tarreau [Apply from linux-3.10.102 for supporting build with gcc6] Reported-by: Sung-jae Park Signed-off-by: Seung-Woo Kim Change-Id: Ideba2a089dba420a5d8fda0b56942ad949e93e71 --- include/linux/compiler-gcc.h | 114 ++++++++++++++++++++++++++++++++++++++++-- include/linux/compiler-gcc3.h | 23 --------- include/linux/compiler-gcc4.h | 88 -------------------------------- include/linux/compiler-gcc5.h | 66 ------------------------ 4 files changed, 110 insertions(+), 181 deletions(-) delete mode 100644 include/linux/compiler-gcc3.h delete mode 100644 include/linux/compiler-gcc4.h delete mode 100644 include/linux/compiler-gcc5.h diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 02ae99e..65856c3 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -100,10 +100,116 @@ #define __maybe_unused __attribute__((unused)) #define __always_unused __attribute__((unused)) -#define __gcc_header(x) #x -#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) -#define gcc_header(x) _gcc_header(x) -#include gcc_header(__GNUC__) +/* gcc version specific checks */ + +#if GCC_VERSION < 30200 +# error Sorry, your compiler is too old - please upgrade it. +#endif + +#if GCC_VERSION < 30300 +# define __used __attribute__((__unused__)) +#else +# define __used __attribute__((__used__)) +#endif + +#ifdef CONFIG_GCOV_KERNEL +# if GCC_VERSION < 30400 +# error "GCOV profiling support for gcc versions below 3.4 not included" +# endif /* __GNUC_MINOR__ */ +#endif /* CONFIG_GCOV_KERNEL */ + +#if GCC_VERSION >= 30400 +#define __must_check __attribute__((warn_unused_result)) +#endif + +#if GCC_VERSION >= 40000 + +/* GCC 4.1.[01] miscompiles __weak */ +#ifdef __KERNEL__ +# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 +# error Your version of gcc miscompiles the __weak directive +# endif +#endif + +#define __used __attribute__((__used__)) +#define __compiler_offsetof(a, b) \ + __builtin_offsetof(a, b) + +#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 +# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) +#endif + +#if GCC_VERSION >= 40300 +/* Mark functions as cold. gcc will assume any path leading to a call + * to them will be unlikely. This means a lot of manual unlikely()s + * are unnecessary now for any paths leading to the usual suspects + * like BUG(), printk(), panic() etc. [but let's keep them for now for + * older compilers] + * + * Early snapshots of gcc 4.3 don't support this and we can't detect this + * in the preprocessor, but we can live with this because they're unreleased. + * Maketime probing would be overkill here. + * + * gcc also has a __attribute__((__hot__)) to move hot functions into + * a special section, but I don't see any sense in this right now in + * the kernel context + */ +#define __cold __attribute__((__cold__)) + +#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) + +#ifndef __CHECKER__ +# define __compiletime_warning(message) __attribute__((warning(message))) +# define __compiletime_error(message) __attribute__((error(message))) +#endif /* __CHECKER__ */ +#endif /* GCC_VERSION >= 40300 */ + +#if GCC_VERSION >= 40500 +/* + * Mark a position in code as unreachable. This can be used to + * suppress control flow warnings after asm blocks that transfer + * control elsewhere. + * + * Early snapshots of gcc 4.5 don't support this and we can't detect + * this in the preprocessor, but we can live with this because they're + * unreleased. Really, we need to have autoconf for the kernel. + */ +#define unreachable() __builtin_unreachable() + +/* Mark a function definition as prohibited from being cloned. */ +#define __noclone __attribute__((__noclone__)) + +#endif /* GCC_VERSION >= 40500 */ + +#if GCC_VERSION >= 40600 +/* + * Tell the optimizer that something else uses this function or variable. + */ +#define __visible __attribute__((externally_visible)) +#endif + +/* + * GCC 'asm goto' miscompiles certain code sequences: + * + * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 + * + * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. + * + * (asm goto is automatically volatile - the naming reflects this.) + */ +#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) + +#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP +#if GCC_VERSION >= 40400 +#define __HAVE_BUILTIN_BSWAP32__ +#define __HAVE_BUILTIN_BSWAP64__ +#endif +#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) +#define __HAVE_BUILTIN_BSWAP16__ +#endif +#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ + +#endif /* gcc version >= 40000 specific checks */ #if !defined(__noclone) #define __noclone /* not needed */ diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h deleted file mode 100644 index 7d89feb..0000000 --- a/include/linux/compiler-gcc3.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __LINUX_COMPILER_H -#error "Please don't include directly, include instead." -#endif - -#if GCC_VERSION < 30200 -# error Sorry, your compiler is too old - please upgrade it. -#endif - -#if GCC_VERSION >= 30300 -# define __used __attribute__((__used__)) -#else -# define __used __attribute__((__unused__)) -#endif - -#if GCC_VERSION >= 30400 -#define __must_check __attribute__((warn_unused_result)) -#endif - -#ifdef CONFIG_GCOV_KERNEL -# if GCC_VERSION < 30400 -# error "GCOV profiling support for gcc versions below 3.4 not included" -# endif /* __GNUC_MINOR__ */ -#endif /* CONFIG_GCOV_KERNEL */ diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h deleted file mode 100644 index 2507fd2..0000000 --- a/include/linux/compiler-gcc4.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef __LINUX_COMPILER_H -#error "Please don't include directly, include instead." -#endif - -/* GCC 4.1.[01] miscompiles __weak */ -#ifdef __KERNEL__ -# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 -# error Your version of gcc miscompiles the __weak directive -# endif -#endif - -#define __used __attribute__((__used__)) -#define __must_check __attribute__((warn_unused_result)) -#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) - -#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 -# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) -#endif - -#if GCC_VERSION >= 40300 -/* Mark functions as cold. gcc will assume any path leading to a call - to them will be unlikely. This means a lot of manual unlikely()s - are unnecessary now for any paths leading to the usual suspects - like BUG(), printk(), panic() etc. [but let's keep them for now for - older compilers] - - Early snapshots of gcc 4.3 don't support this and we can't detect this - in the preprocessor, but we can live with this because they're unreleased. - Maketime probing would be overkill here. - - gcc also has a __attribute__((__hot__)) to move hot functions into - a special section, but I don't see any sense in this right now in - the kernel context */ -#define __cold __attribute__((__cold__)) - -#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) - -#ifndef __CHECKER__ -# define __compiletime_warning(message) __attribute__((warning(message))) -# define __compiletime_error(message) __attribute__((error(message))) -#endif /* __CHECKER__ */ -#endif /* GCC_VERSION >= 40300 */ - -#if GCC_VERSION >= 40500 -/* - * Mark a position in code as unreachable. This can be used to - * suppress control flow warnings after asm blocks that transfer - * control elsewhere. - * - * Early snapshots of gcc 4.5 don't support this and we can't detect - * this in the preprocessor, but we can live with this because they're - * unreleased. Really, we need to have autoconf for the kernel. - */ -#define unreachable() __builtin_unreachable() - -/* Mark a function definition as prohibited from being cloned. */ -#define __noclone __attribute__((__noclone__)) - -#endif /* GCC_VERSION >= 40500 */ - -#if GCC_VERSION >= 40600 -/* - * Tell the optimizer that something else uses this function or variable. - */ -#define __visible __attribute__((externally_visible)) -#endif - -/* - * GCC 'asm goto' miscompiles certain code sequences: - * - * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 - * - * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. - * Fixed in GCC 4.8.2 and later versions. - * - * (asm goto is automatically volatile - the naming reflects this.) - */ -#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) - -#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP -#if GCC_VERSION >= 40400 -#define __HAVE_BUILTIN_BSWAP32__ -#define __HAVE_BUILTIN_BSWAP64__ -#endif -#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) -#define __HAVE_BUILTIN_BSWAP16__ -#endif -#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h deleted file mode 100644 index cdd1cc2..0000000 --- a/include/linux/compiler-gcc5.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef __LINUX_COMPILER_H -#error "Please don't include directly, include instead." -#endif - -#define __used __attribute__((__used__)) -#define __must_check __attribute__((warn_unused_result)) -#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) - -/* Mark functions as cold. gcc will assume any path leading to a call - to them will be unlikely. This means a lot of manual unlikely()s - are unnecessary now for any paths leading to the usual suspects - like BUG(), printk(), panic() etc. [but let's keep them for now for - older compilers] - - Early snapshots of gcc 4.3 don't support this and we can't detect this - in the preprocessor, but we can live with this because they're unreleased. - Maketime probing would be overkill here. - - gcc also has a __attribute__((__hot__)) to move hot functions into - a special section, but I don't see any sense in this right now in - the kernel context */ -#define __cold __attribute__((__cold__)) - -#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) - -#ifndef __CHECKER__ -# define __compiletime_warning(message) __attribute__((warning(message))) -# define __compiletime_error(message) __attribute__((error(message))) -#endif /* __CHECKER__ */ - -/* - * Mark a position in code as unreachable. This can be used to - * suppress control flow warnings after asm blocks that transfer - * control elsewhere. - * - * Early snapshots of gcc 4.5 don't support this and we can't detect - * this in the preprocessor, but we can live with this because they're - * unreleased. Really, we need to have autoconf for the kernel. - */ -#define unreachable() __builtin_unreachable() - -/* Mark a function definition as prohibited from being cloned. */ -#define __noclone __attribute__((__noclone__)) - -/* - * Tell the optimizer that something else uses this function or variable. - */ -#define __visible __attribute__((externally_visible)) - -/* - * GCC 'asm goto' miscompiles certain code sequences: - * - * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 - * - * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. - * Fixed in GCC 4.8.2 and later versions. - * - * (asm goto is automatically volatile - the naming reflects this.) - */ -#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) - -#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP -#define __HAVE_BUILTIN_BSWAP32__ -#define __HAVE_BUILTIN_BSWAP64__ -#define __HAVE_BUILTIN_BSWAP16__ -#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ -- 2.7.4 From 97d5e3408d65a161c2cd6621de4452f3fe3ad41e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 13 Oct 2016 13:07:36 -0700 Subject: [PATCH 06/16] mm: remove gup_flags FOLL_WRITE games from __get_user_pages() commit 19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619 upstream. This is an ancient bug that was actually attempted to be fixed once (badly) by me eleven years ago in commit 4ceb5db9757a ("Fix get_user_pages() race for write access") but that was then undone due to problems on s390 by commit f33ea7f404e5 ("fix get_user_pages bug"). In the meantime, the s390 situation has long been fixed, and we can now fix it by checking the pte_dirty() bit properly (and do it better). The s390 dirty bit was implemented in abf09bed3cce ("s390/mm: implement software dirty bits") which made it into v3.9. Earlier kernels will have to look at the page state itself. Also, the VM has become more scalable, and what used a purely theoretical race back then has become easier to trigger. To fix it, we introduce a new internal FOLL_COW flag to mark the "yes, we already did a COW" rather than play racy games with FOLL_WRITE that is very fundamental, and then use the pte dirty flag to validate that the FOLL_COW flag is still valid. Reported-and-tested-by: Phil "not Paul" Oester Acked-by: Hugh Dickins Reviewed-by: Michal Hocko Cc: Andy Lutomirski Cc: Kees Cook Cc: Oleg Nesterov Cc: Willy Tarreau Cc: Nick Piggin Cc: Greg Thelen Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds [wt: s/gup.c/memory.c; s/follow_page_pte/follow_page_mask; s/faultin_page/__get_user_page] Signed-off-by: Willy Tarreau [Apply from linux-3.10.104 to fix CVE-2016-5195] Signed-off-by: Seung-Woo Kim Change-Id: I5a99df42c34af2b109a8f9e1647b606324e981e7 --- include/linux/mm.h | 1 + mm/memory.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 17139d5..fb117eb 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1723,6 +1723,7 @@ static inline struct page *follow_page(struct vm_area_struct *vma, #define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */ #define FOLL_NUMA 0x200 /* force NUMA hinting page fault */ #define FOLL_MIGRATION 0x400 /* wait for page to replace migration entry */ +#define FOLL_COW 0x4000 /* internal GUP flag */ typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, void *data); diff --git a/mm/memory.c b/mm/memory.c index f035122..c2ec754 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1469,6 +1469,16 @@ int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address, } EXPORT_SYMBOL_GPL(zap_vma_ptes); +/* + * FOLL_FORCE can write to even unwritable pte's, but only + * after we've gone through a COW cycle and they are dirty. + */ +static inline bool can_follow_write_pte(pte_t pte, unsigned int flags) +{ + return pte_write(pte) || + ((flags & FOLL_FORCE) && (flags & FOLL_COW) && pte_dirty(pte)); +} + /** * follow_page_mask - look up a page descriptor from a user-virtual address * @vma: vm_area_struct mapping @address @@ -1576,7 +1586,7 @@ split_fallthrough: } if ((flags & FOLL_NUMA) && pte_numa(pte)) goto no_page; - if ((flags & FOLL_WRITE) && !pte_write(pte)) + if ((flags & FOLL_WRITE) && !can_follow_write_pte(pte, flags)) goto unlock; page = vm_normal_page(vma, address, pte); @@ -1883,7 +1893,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, */ if ((ret & VM_FAULT_WRITE) && !(vma->vm_flags & VM_WRITE)) - foll_flags &= ~FOLL_WRITE; + foll_flags |= FOLL_COW; cond_resched(); } -- 2.7.4 From 450083ff2dc9bafdc8aa1d6cf5db8ec8e2c4d751 Mon Sep 17 00:00:00 2001 From: Slava Barinov Date: Wed, 12 Oct 2016 12:06:23 +0300 Subject: [PATCH 07/16] packaging: switch find calls from -exec to xargs The -delete and xargs approach is faster than -exec and in Tizen 3.0 cross-builds it grants huge build acceleration due to tool acceleration system peculiarities. Change-Id: Ibbbb82962235cd098cd6952c288e9f120bb63ed3 Signed-off-by: Slava Barinov --- packaging/linux-3.10-sc7730.spec | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packaging/linux-3.10-sc7730.spec b/packaging/linux-3.10-sc7730.spec index 0900b54..6b1ac30 100644 --- a/packaging/linux-3.10-sc7730.spec +++ b/packaging/linux-3.10-sc7730.spec @@ -116,18 +116,18 @@ for i in %{BOARDS}; do make modules_install INSTALL_MOD_PATH=%_builddir/mod_$target # prepare for devel package - find %{_builddir}/%{name}-%{version} -name ".tmp_vmlinux*" -exec rm -f {} \; - find %{_builddir}/%{name}-%{version} -name "\.*dtb*tmp" -exec rm -f {} \; - find %{_builddir}/%{name}-%{version} -name "*\.*tmp" -exec rm -f {} \; - find %{_builddir}/%{name}-%{version} -name "vmlinux" -exec rm -f {} \; - find %{_builddir}/%{name}-%{version} -name "bzImage" -exec rm -f {} \; - find %{_builddir}/%{name}-%{version} -name "zImage" -exec rm -f {} \; - find %{_builddir}/%{name}-%{version} -name "dzImage" -exec rm -f {} \; - find %{_builddir}/%{name}-%{version} -name "*.cmd" -exec rm -f {} \; - find %{_builddir}/%{name}-%{version} -name "*\.ko" -exec rm -f {} \; - find %{_builddir}/%{name}-%{version} -name "*\.o" -exec rm -f {} \; - find %{_builddir}/%{name}-%{version} -name "*\.S" -exec rm -f {} \; - find %{_builddir}/%{name}-%{version} -name "*\.c" -not -path "%{_builddir}/%{name}-%{version}/scripts/*" -exec rm -f {} \; + find %{_builddir}/%{name}-%{version} -name ".tmp_vmlinux*" -delete + find %{_builddir}/%{name}-%{version} -name "\.*dtb*tmp" -delete + find %{_builddir}/%{name}-%{version} -name "*\.*tmp" -delete + find %{_builddir}/%{name}-%{version} -name "vmlinux" -delete + find %{_builddir}/%{name}-%{version} -name "bzImage" -delete + find %{_builddir}/%{name}-%{version} -name "zImage" -delete + find %{_builddir}/%{name}-%{version} -name "dzImage" -delete + find %{_builddir}/%{name}-%{version} -name "*.cmd" -delete + find %{_builddir}/%{name}-%{version} -name "*\.ko" -delete + find %{_builddir}/%{name}-%{version} -name "*\.o" -delete + find %{_builddir}/%{name}-%{version} -name "*\.S" -delete + find %{_builddir}/%{name}-%{version} -name "*\.c" -not -path "%{_builddir}/%{name}-%{version}/scripts/*" -delete # prepare for the next build cd %_builddir @@ -142,8 +142,8 @@ make mrproper make headers_check make headers_install INSTALL_HDR_PATH=%{buildroot}/usr -find %{buildroot}/usr/include -name ".install" | xargs rm -f -find %{buildroot}/usr/include -name "..install.cmd" | xargs rm -f +find %{buildroot}/usr/include -name ".install" -delete +find %{buildroot}/usr/include -name "..install.cmd" -delete rm -rf %{buildroot}/usr/include/scsi rm -f %{buildroot}/usr/include/asm*/atomic.h rm -f %{buildroot}/usr/include/asm*/io.h @@ -173,7 +173,7 @@ done # Assumed that actually there is one board ln -s kernel-devel-$i %{buildroot}/boot/kernel/devel/tizen-devel -find %{buildroot}/boot/kernel/ -name "*.h" -exec chmod 644 {} \; +find %{buildroot}/boot/kernel/ -name "*.h" -print0 | xargs -0 chmod 644 find %{buildroot}/boot/kernel/ -name 'System.map' -not -path "%{buildroot}/boot/kernel/devel/*" > develfiles.pre # for secure storage find %{buildroot}/boot/kernel/ -name 'vmlinux' -not -path "%{buildroot}/boot/kernel/devel/*" >> develfiles.pre # for TIMA -- 2.7.4 From 0d19b2a5dda15946f66d3b478ad754cab9100d32 Mon Sep 17 00:00:00 2001 From: Hyuk Lee Date: Mon, 21 Nov 2016 09:49:40 +0900 Subject: [PATCH 08/16] Bluetooth: distinguish the interface about LE scan set state Actually, it has the function both "BR/EDR" discovery set state function and "LE" discovery set state function. So, it is better to distinguish the "LE" discovery set state function for "LE" scenario. Change-Id: I7694a58a793b7ecef5c57a85563c99ca0cefd1cf Signed-off-by: Hyuk Lee --- net/bluetooth/hci_core.c | 10 ++++++++++ net/bluetooth/mgmt.c | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index a6b0819..c599077 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1095,7 +1095,9 @@ void hci_discovery_set_state(struct hci_dev *hdev, int state) switch (state) { case DISCOVERY_STOPPED: +#ifndef CONFIG_TIZEN_WIP hci_update_background_scan(hdev); +#endif if (old_state != DISCOVERY_STARTING) mgmt_discovering(hdev, 0); @@ -2903,7 +2905,11 @@ static void le_scan_disable_work_complete(struct hci_dev *hdev, u8 status, switch (hdev->discovery.type) { case DISCOV_TYPE_LE: hci_dev_lock(hdev); +#ifdef CONFIG_TIZEN_WIP + hci_le_discovery_set_state(hdev, DISCOVERY_STOPPED); +#else hci_discovery_set_state(hdev, DISCOVERY_STOPPED); +#endif hci_dev_unlock(hdev); break; @@ -2922,7 +2928,11 @@ static void le_scan_disable_work_complete(struct hci_dev *hdev, u8 status, err = hci_req_run(&req, inquiry_complete); if (err) { BT_ERR("Inquiry request failed: err %d", err); +#ifdef CONFIG_TIZEN_WIP + hci_le_discovery_set_state(hdev, DISCOVERY_STOPPED); +#else hci_discovery_set_state(hdev, DISCOVERY_STOPPED); +#endif } hci_dev_unlock(hdev); diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index ff281a7..e2ae0fd 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1443,6 +1443,11 @@ static int clean_up_hci_state(struct hci_dev *hdev) if (!err && discov_stopped) hci_discovery_set_state(hdev, DISCOVERY_STOPPING); +#ifdef CONFIG_TIZEN_WIP + if (!err && discov_stopped) + hci_le_discovery_set_state(hdev, DISCOVERY_STOPPING); +#endif + return err; } -- 2.7.4 From 448e5100e0e021df3ec2698b6516ef25d94c79dc Mon Sep 17 00:00:00 2001 From: "h.sandeep" Date: Tue, 15 Nov 2016 14:34:01 +0530 Subject: [PATCH 09/16] Bluetooth: add to support LE privacy 1.2 & MGMT to load device RPA resolution RPA resolution support of peer device to be checked before starting directed advertising. This patch load the resolution support info of device and check before starting directed advertising. Change-Id: I9c982e72e83024bcb493488e29c33aba7ffbf485 Signed-off-by: h.sandeep [Fix coding style and adjust commit-msg] Signed-off-by: Seung-Woo Kim --- include/net/bluetooth/hci_core.h | 5 +++++ include/net/bluetooth/mgmt_tizen.h | 7 +++++++ net/bluetooth/hci_conn.c | 28 ++++++++++++++++++++++++++ net/bluetooth/hci_core.c | 14 +++++++++++++ net/bluetooth/mgmt.c | 41 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 95 insertions(+) diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 185214e..0edf790 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -130,6 +130,9 @@ struct smp_irk { bdaddr_t bdaddr; u8 addr_type; u8 val[16]; +#ifdef CONFIG_TIZEN_WIP + u8 rpa_res_support; +#endif }; struct link_key { @@ -1053,6 +1056,8 @@ int hci_get_dev_list(void __user *arg); int hci_get_dev_info(void __user *arg); int hci_get_conn_list(void __user *arg); #ifdef CONFIG_TIZEN_WIP +int hci_set_rpa_res_support(struct hci_dev *hdev, bdaddr_t *bdaddr, + u8 addr_type, u8 enabled); u32 get_link_mode(struct hci_conn *conn); #endif int hci_get_conn_info(struct hci_dev *hdev, void __user *arg); diff --git a/include/net/bluetooth/mgmt_tizen.h b/include/net/bluetooth/mgmt_tizen.h index baf2de4..4afb984 100644 --- a/include/net/bluetooth/mgmt_tizen.h +++ b/include/net/bluetooth/mgmt_tizen.h @@ -220,6 +220,13 @@ struct mgmt_rp_le_set_data_length { } __packed; #define MGMT_LE_SET_DATA_LENGTH_RSP_SIZE 3 +#define MGMT_OP_SET_DEV_RPA_RES_SUPPORT (TIZEN_OP_CODE_BASE + 0x19) +struct mgmt_cp_set_dev_rpa_res_support { + struct mgmt_addr_info addr; + __u8 res_support; +} __packed; +#define MGMT_OP_SET_DEV_RPA_RES_SUPPORT_SIZE 8 + /* BEGIN TIZEN_Bluetooth :: name update changes */ #define MGMT_EV_DEVICE_NAME_UPDATE (TIZEN_EV_BASE + 0x01) struct mgmt_ev_device_name_update { diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index b133366..598cb67 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -720,13 +720,22 @@ static void hci_req_add_le_create_conn(struct hci_request *req, conn->state = BT_CONNECT; } +#ifdef CONFIG_TIZEN_WIP +static void hci_req_directed_advertising(struct hci_request *req, + struct hci_conn *conn, + u8 rpa_res_support) +#else static void hci_req_directed_advertising(struct hci_request *req, struct hci_conn *conn) +#endif { struct hci_dev *hdev = req->hdev; struct hci_cp_le_set_adv_param cp; u8 own_addr_type; u8 enable; +#ifdef CONFIG_TIZEN_WIP + bool require_privacy; +#endif /* Clear the HCI_LE_ADV bit temporarily so that the * hci_update_random_address knows that it's safe to go ahead @@ -735,11 +744,26 @@ static void hci_req_directed_advertising(struct hci_request *req, */ clear_bit(HCI_LE_ADV, &hdev->dev_flags); +#ifdef CONFIG_TIZEN_WIP + /* Set require_privacy to true if remote device is able to + * resolve RPA (As per BT spec 4.2 & Enhanced privacy feature) + * otherwise, set require_privacy to false so that the remote + * device has a chance of identifying us. + */ + if (rpa_res_support) + require_privacy = true; + else + require_privacy = false; + + if (hci_update_random_address(req, require_privacy, &own_addr_type) < 0) + return; +#else /* Set require_privacy to false so that the remote device has a * chance of identifying us. */ if (hci_update_random_address(req, false, &own_addr_type) < 0) return; +#endif memset(&cp, 0, sizeof(cp)); cp.type = LE_ADV_DIRECT_IND; @@ -842,7 +866,11 @@ struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst, return ERR_PTR(-EBUSY); } +#ifdef CONFIG_TIZEN_WIP + hci_req_directed_advertising(&req, conn, irk->rpa_res_support); +#else hci_req_directed_advertising(&req, conn); +#endif goto create_conn; } diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index c599077..be8bb5c 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -2567,6 +2567,20 @@ void hci_remove_irk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type) } #ifdef CONFIG_TIZEN_WIP +int hci_set_rpa_res_support(struct hci_dev *hdev, bdaddr_t *bdaddr, + u8 addr_type, u8 enabled) +{ + struct smp_irk *irk; + + irk = hci_find_irk_by_addr(hdev, bdaddr, addr_type); + if (!irk) + return -ENOENT; + + irk->rpa_res_support = enabled; + + return 0; +} + /* Timeout Error Event is being handled */ static void hci_tx_timeout_error_evt(struct hci_dev *hdev) { diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index e2ae0fd..e6c8ff3 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -5226,6 +5226,46 @@ done: hci_dev_unlock(hdev); return err; } + +static int set_dev_rpa_res_support(struct sock *sk, struct hci_dev *hdev, + void *data, u16 len) +{ + struct mgmt_cp_set_dev_rpa_res_support *cp = data; + int err; + + BT_DBG("Set resolve RPA as %u for %s", cp->res_support, hdev->name); + + hci_dev_lock(hdev); + + if (!lmp_le_capable(hdev)) { + err = cmd_status(sk, hdev->id, + MGMT_OP_SET_DEV_RPA_RES_SUPPORT, + MGMT_STATUS_NOT_SUPPORTED); + goto unlocked; + } + + if (!hdev_is_powered(hdev)) { + err = cmd_status(sk, hdev->id, + MGMT_OP_SET_DEV_RPA_RES_SUPPORT, + MGMT_STATUS_REJECTED); + goto unlocked; + } + + if (hci_set_rpa_res_support(hdev, &cp->addr.bdaddr, cp->addr.type, + cp->res_support)) { + err = cmd_complete(sk, hdev->id, + MGMT_OP_SET_DEV_RPA_RES_SUPPORT, + MGMT_STATUS_NOT_PAIRED, NULL, 0); + goto unlocked; + } + + err = cmd_complete(sk, hdev->id, MGMT_OP_SET_DEV_RPA_RES_SUPPORT, + MGMT_STATUS_SUCCESS, NULL, 0); + +unlocked: + hci_dev_unlock(hdev); + return err; +} /* END TIZEN_Bluetooth */ #endif @@ -8437,6 +8477,7 @@ static const struct mgmt_handler tizen_mgmt_handlers[] = { MGMT_LE_READ_HOST_SUGGESTED_DATA_LENGTH_SIZE }, { set_le_data_length_params, false, MGMT_LE_SET_DATA_LENGTH_SIZE }, + { set_dev_rpa_res_support, false, MGMT_OP_SET_DEV_RPA_RES_SUPPORT_SIZE }, }; #endif -- 2.7.4 From 4d7bf53b8dea440ab5c395e83e71a3e69cae9e7d Mon Sep 17 00:00:00 2001 From: "h.sandeep" Date: Tue, 15 Nov 2016 14:42:18 +0530 Subject: [PATCH 10/16] Bluetooth: Add MGMT interface for setting IRK It is required to set IRK from BlueZ if privacy feature is disabled, so this patch adds setting IRK interface to MGMT. Change-Id: I2343ce34c894ad24557218ed41b61151caa8a1a5 Signed-off-by: h.sandeep Signed-off-by: Seung-Woo Kim --- include/net/bluetooth/mgmt_tizen.h | 6 ++++++ net/bluetooth/mgmt.c | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/include/net/bluetooth/mgmt_tizen.h b/include/net/bluetooth/mgmt_tizen.h index 4afb984..322c2a7 100644 --- a/include/net/bluetooth/mgmt_tizen.h +++ b/include/net/bluetooth/mgmt_tizen.h @@ -227,6 +227,12 @@ struct mgmt_cp_set_dev_rpa_res_support { } __packed; #define MGMT_OP_SET_DEV_RPA_RES_SUPPORT_SIZE 8 +#define MGMT_OP_SET_IRK (TIZEN_OP_CODE_BASE + 0x1A) +struct mgmt_cp_set_irk { + uint8_t irk[16]; +} __packed; +#define MGMT_SET_IRK_SIZE 16 + /* BEGIN TIZEN_Bluetooth :: name update changes */ #define MGMT_EV_DEVICE_NAME_UPDATE (TIZEN_EV_BASE + 0x01) struct mgmt_ev_device_name_update { diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index e6c8ff3..f4f556a 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -5266,6 +5266,31 @@ unlocked: hci_dev_unlock(hdev); return err; } + +static int set_irk(struct sock *sk, struct hci_dev *hdev, void *cp_data, + u16 len) +{ + struct mgmt_cp_set_irk *cp = cp_data; + int err; + + BT_DBG("request for %s", hdev->name); + + hci_dev_lock(hdev); + + if (!lmp_le_capable(hdev)) { + err = cmd_status(sk, hdev->id, MGMT_OP_SET_IRK, + MGMT_STATUS_NOT_SUPPORTED); + goto unlocked; + } + + memcpy(hdev->irk, cp->irk, sizeof(hdev->irk)); + + err = cmd_complete(sk, hdev->id, MGMT_OP_SET_IRK, 0, NULL, 0); + +unlocked: + hci_dev_unlock(hdev); + return err; +} /* END TIZEN_Bluetooth */ #endif @@ -8478,6 +8503,7 @@ static const struct mgmt_handler tizen_mgmt_handlers[] = { { set_le_data_length_params, false, MGMT_LE_SET_DATA_LENGTH_SIZE }, { set_dev_rpa_res_support, false, MGMT_OP_SET_DEV_RPA_RES_SUPPORT_SIZE }, + { set_irk, false, MGMT_SET_IRK_SIZE }, }; #endif -- 2.7.4 From 5ce9a064d53f4567aad1977818ec5388c05684f7 Mon Sep 17 00:00:00 2001 From: "h.sandeep" Date: Mon, 21 Nov 2016 15:53:26 +0530 Subject: [PATCH 11/16] Bluetooth: Fix IRK dstribution issue when Privacy is disabled The devices, like Android 6.x, which don't support privacy 1.2 couldn't make BLE connection to the device which doesn't distribute IRK when pairing because they use use wrong address type. For compatibility, it needs to distribute IRK even though Privacy feature is disabled. So setting IRK interface is added and BlueZ will set IRK if privacy feature is disabled. And when BLE pairing, IRK will be always distributed. Change-Id: I196b6e726bff3a396ba040201c760f74ddfba946 Signed-off-by: h.sandeep --- net/bluetooth/smp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 08ac8d9..57244f4 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -59,6 +59,11 @@ /* Maximum message length that can be passed to aes_cmac */ #define CMAC_MSG_MAX 80 +#ifdef CONFIG_TIZEN_WIP +#define ZERO_KEY "\x00\x00\x00\x00\x00\x00\x00\x00" \ + "\x00\x00\x00\x00\x00\x00\x00\x00" +#endif + enum { SMP_FLAG_TK_VALID, SMP_FLAG_CFM_PENDING, @@ -604,8 +609,13 @@ static void build_pairing_cmd(struct l2cap_conn *conn, if (test_bit(HCI_RPA_RESOLVING, &hdev->dev_flags)) remote_dist |= SMP_DIST_ID_KEY; +#ifdef CONFIG_TIZEN_WIP + if (memcmp(hdev->irk, ZERO_KEY, 16)) + local_dist |= SMP_DIST_ID_KEY; +#else if (test_bit(HCI_PRIVACY, &hdev->dev_flags)) local_dist |= SMP_DIST_ID_KEY; +#endif if (test_bit(HCI_SC_ENABLED, &hdev->dev_flags) && (authreq & SMP_AUTH_SC)) { -- 2.7.4 From c9fc83776bd984b65a1b3b24207c47bf44a69326 Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Fri, 25 Nov 2016 14:41:49 +0900 Subject: [PATCH 12/16] misc: add Tizen global lock module This module is enhanced version - including some refactoring and bug fixups - of SGL module which resolves rendering order issue of Utgard DDK. Change-Id: I94a59232e31fb7bba1be22c463b8c9c469667a8b Signed-off-by: Inki Dae --- drivers/misc/tizen_global_lock.c | 35 +++++++++++++++++++++++++++++++---- drivers/misc/tizen_global_lock.h | 21 +++++++++++++++++---- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/drivers/misc/tizen_global_lock.c b/drivers/misc/tizen_global_lock.c index cc5fb89..6fdd900 100644 --- a/drivers/misc/tizen_global_lock.c +++ b/drivers/misc/tizen_global_lock.c @@ -27,6 +27,9 @@ #define TGL_DEV_NAME "tgl" +#define TGL_VERSION_MAJOR 1 +#define TGL_VERSION_MINOR 1 + #define TGL_HASH_BITS 4 #define TGL_HASH_BUCKETS (1 << TGL_HASH_BITS) @@ -35,12 +38,15 @@ /** * struct tgl_device - tgl device structure * @dev: (misc )device pointer + * @version: version data * @heads: hash heads for global node data * @lock: lock for hash heads */ static struct tgl_device { struct device *dev; + struct tgl_ver_data version; + struct hlist_head heads[TGL_HASH_BUCKETS]; struct mutex lock; } tgl; @@ -406,6 +412,18 @@ static struct tgl_node *tgl_find_node(struct hlist_head *heads, return found; } +static int tgl_get_version(struct tgl_session *session, void __user *arg) +{ + struct tgl_ver_data ver_data; + + memcpy(&ver_data, &tgl.version, sizeof(ver_data)); + + if (copy_to_user(arg, &ver_data, sizeof(ver_data))) + return -EFAULT; + + return 0; +} + static int tgl_register(struct tgl_session *session, void __user *arg) { struct tgl_reg_data reg_data; @@ -596,7 +614,6 @@ static int tgl_lock(struct tgl_session *session, void __user *arg) } /* add to waiter */ - INIT_LIST_HEAD(&wait_node.node); mutex_lock(&data->lock); list_add_tail(&wait_node.node, &data->list); mutex_unlock(&data->lock); @@ -673,7 +690,7 @@ static int tgl_unlock(struct tgl_session *session, void __user *arg) node = tgl_find_node(session->heads, lock_data.key); if (node) { /* check waiter */ - tgl_remove_wait_node(data, session); + tgl_remove_wait_node(node->data, session); mutex_unlock(&session->lock); return 0; } @@ -766,6 +783,12 @@ static long tgl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) int ret; switch (cmd) { + case TGL_IOCTL_GET_VERSION: + ret = tgl_get_version(session, (void __user *)arg); + if (ret) + dev_err(tgl.dev, + "%s: failed to get version[%d]\n", + __func__, ret); case TGL_IOCTL_REGISTER: ret = tgl_register(session, (void __user *)arg); if (ret) @@ -807,8 +830,8 @@ static long tgl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) break; default: dev_err(tgl.dev, - "%s: failed to call ioctl: tgid[%d]\n", - __func__, task_tgid_nr(current)); + "%s: failed to call ioctl: tgid[%d]:0x%x\n", + __func__, task_tgid_nr(current), cmd); ret = -ENOTTY; break; } @@ -834,8 +857,12 @@ static struct miscdevice tgl_misc_device = { static int __init tgl_init(void) { + struct tgl_ver_data *version = &tgl.version; int ret, i; + version->major = TGL_VERSION_MAJOR; + version->minor = TGL_VERSION_MINOR; + ret = misc_register(&tgl_misc_device); if (ret) { pr_err("%s: failed to register misc device[%d]\n", diff --git a/drivers/misc/tizen_global_lock.h b/drivers/misc/tizen_global_lock.h index 1f3c6b4..6203812 100644 --- a/drivers/misc/tizen_global_lock.h +++ b/drivers/misc/tizen_global_lock.h @@ -10,8 +10,8 @@ * by the Free Software Foundation. */ -#ifndef __TGL__ -#define __TGL__ +#ifndef __TIZEN_GLOBAL_LOOK_H__ +#define __TIZEN_GLOBAL_LOOK_H__ #define TGL_IOCTL_BASE 0x32 #define TGL_IO(nr) _IO(TGL_IOCTL_BASE, nr) @@ -20,6 +20,16 @@ #define TGL_IOWR(nr, type) _IOWR(TGL_IOCTL_BASE, nr, type) /** + * struct tgl_ver_data - tgl version data structure + * @major: major version + * @minor: minor version + */ +struct tgl_ver_data { + unsigned int major; + unsigned int minor; +}; + +/** * struct tgl_reg_data - tgl register data structure * @key: lookup key * @timeout_ms: timeout value for waiting event @@ -65,7 +75,8 @@ struct tgl_usr_data { }; enum { - _TGL_REGISTER = 1, + _TGL_GET_VERSION, + _TGL_REGISTER, _TGL_UNREGISTER, _TGL_LOCK, _TGL_UNLOCK, @@ -73,6 +84,8 @@ enum { _TGL_GET_DATA, }; +/* get version information */ +#define TGL_IOCTL_GET_VERSION TGL_IOR(_TGL_GET_VERSION, struct tgl_ver_data) /* register key */ #define TGL_IOCTL_REGISTER TGL_IOW(_TGL_REGISTER, struct tgl_reg_data) /* unregister key */ @@ -86,4 +99,4 @@ enum { /* get user data with key */ #define TGL_IOCTL_GET_DATA TGL_IOR(_TGL_GET_DATA, struct tgl_usr_data) -#endif /* __TGL__ */ +#endif /* __TIZEN_GLOBAL_LOOK_H__ */ -- 2.7.4 From ddfb8a5b09ee2de177bd279569a3218e2c920f3e Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Fri, 25 Nov 2016 14:45:16 +0900 Subject: [PATCH 13/16] arm: config: tizen_tm1_defconfig: enable Tizen global lock This patch enables Tizen global lock instead of SGL module. Change-Id: Ida728764728980b6484e6e2b178aefc7590b460c Signed-off-by: Inki Dae --- arch/arm/configs/tizen_tm1_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/tizen_tm1_defconfig b/arch/arm/configs/tizen_tm1_defconfig index d54a70c..ab57fa5 100755 --- a/arch/arm/configs/tizen_tm1_defconfig +++ b/arch/arm/configs/tizen_tm1_defconfig @@ -1228,7 +1228,8 @@ CONFIG_SPRD_WCN=y CONFIG_SPRD_DOWNLOAD_IMG=y CONFIG_SPRD_DOWNLOAD_POWER_CTL=y # CONFIG_SPRD_HWCONFIG_CHECK is not set -CONFIG_SLP_GLOBAL_LOCK=y +# CONFIG_SLP_GLOBAL_LOCK is not set +CONFIG_TIZEN_GLOBAL_LOCK=y # # SCSI device support -- 2.7.4 From 7aa75605a0207d3b470f667397c26b6952685a1e Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Fri, 25 Nov 2016 14:46:35 +0900 Subject: [PATCH 14/16] misc: remove SLP Global lock module This patch removes SLP Global lock module which is unnecessary anymore. Change-Id: I200c6bfb701b124c531e5da0fa793c434808d122 Signed-off-by: Inki Dae --- drivers/misc/Kconfig | 6 - drivers/misc/Makefile | 1 - drivers/misc/slp_global_lock.c | 872 ----------------------------------------- drivers/misc/slp_global_lock.h | 49 --- 4 files changed, 928 deletions(-) delete mode 100644 drivers/misc/slp_global_lock.c delete mode 100644 drivers/misc/slp_global_lock.h diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 92021d7..b053b1a 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -614,12 +614,6 @@ config SPRD_SRT_KO depends on SPRD_SRT default m -config SLP_GLOBAL_LOCK - bool "Enable Global Lock" - default n - ---help--- - This supports global lock feature for SLP. - config TIZEN_GLOBAL_LOCK bool "Enable Tizen Global Lock" help diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index ec8157e..d3c493f 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -72,7 +72,6 @@ obj-$(CONFIG_SPRD_CODA7L) += sprd_coda7l/ obj-$(CONFIG_BENCHMARK) += benchmark/ obj-$(CONFIG_BOOT_PERF) += bootperf/ obj-$(CONFIG_SPRD_BOARD_TYPE) += sprd_board_type.o -obj-$(CONFIG_SLP_GLOBAL_LOCK) += slp_global_lock.o obj-$(CONFIG_TIZEN_GLOBAL_LOCK) += tizen_global_lock.o obj-$(CONFIG_SPRD_TKS_DRIVER) += sprd_tks.o obj-$(CONFIG_SDIODEV) += sdiodev/ diff --git a/drivers/misc/slp_global_lock.c b/drivers/misc/slp_global_lock.c deleted file mode 100644 index 7ce5e4a..0000000 --- a/drivers/misc/slp_global_lock.c +++ /dev/null @@ -1,872 +0,0 @@ -/* - * Copyright (c) 2012 Samsung Electronics Co., Ltd. - * - * This program is free software and is provided to you under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence. - * - * A copy of the licence is included with the program, and can also be obtained from Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "slp_global_lock.h" - -#define SGL_WARN(x, y...) printk(KERN_INFO "[SGL_WARN(%d,%d)](%s):%d " x " \n" , current->tgid, current->pid, __FUNCTION__, __LINE__, ##y) -#define SGL_INFO(x, y...) printk(KERN_INFO "[SGL_INFO] " x , ##y) - -#if 0 /* LOG */ - -#define SGL_LOG(x, y...) printk(KERN_INFO "[SGL_LOG(%d,%d)](%s):%d " x " \n" , current->tgid, current->pid, __FUNCTION__, __LINE__, ##y); -#define SGL_DEBUG(x, y...) printk(KERN_INFO "[SGL_DEBUG(%d,%d)](%s):%d " x " \n" , current->tgid, current->pid, __FUNCTION__, __LINE__, ##y); - -#else - -#define SGL_LOG(x, y...) -#define SGL_DEBUG(x, y...) - -#endif - -static struct sgl_global { - int major; - struct class *class; - struct device *device; - void *locks; /* global lock table */ - int refcnt; /* ref count of sgl_global */ - struct mutex mutex; -} sgl_global; - -struct sgl_session_data { - void *inited_locks; /* per session initialized locks */ - void *locked_locks; /* per session locked locks */ -}; - -struct sgl_lock { - unsigned int key; /* key of this lock */ - unsigned int timeout_ms; /* timeout in ms */ - unsigned int refcnt; /* ref count of initialization */ - wait_queue_head_t waiting_queue; /* waiting queue */ - struct list_head waiting_list; /* waiting list */ - struct mutex waiting_list_mutex; - unsigned int locked; /* flag if this lock is locked */ - unsigned int owner; /* session data */ - - struct mutex data_mutex; - unsigned int user_data1; - unsigned int user_data2; - - pid_t owner_pid; - pid_t owner_tid; -}; - -/**************** hash code start ***************/ -#define SGL_HASH_BITS 4 -#define SGL_HASH_ENTRIES (1 << SGL_HASH_BITS) - -struct sgl_hash_head { - struct hlist_head head; /* hash_head */ - struct mutex mutex; -}; - -struct sgl_hash_node { - unsigned int key; /* key for lock. must be same as lock->key */ - struct sgl_lock *lock; /* lock object */ - struct hlist_node node; /* hash node */ -}; - -static const char sgl_dev_name[] = "slp_global_lock"; - -/* find the sgl_lock object with key in the hash table */ -static struct sgl_hash_node *sgl_hash_get_node(struct sgl_hash_head *hash, unsigned int key) -{ - struct sgl_hash_head *hash_head = &hash[hash_32(key, SGL_HASH_BITS)]; - struct sgl_hash_node *hash_node = NULL; - struct sgl_hash_node *found = NULL; - - struct hlist_head *head = &hash_head->head; - - SGL_LOG("key %d", key); - - mutex_lock(&hash_head->mutex); - hlist_for_each_entry(hash_node, head, node) { - if (hash_node->key == key) { - found = hash_node; - break; - } - } - mutex_unlock(&hash_head->mutex); - - SGL_LOG("hash_node: %p", hash_node); - - return found; -} - -/* insert the hash entry */ -static struct sgl_hash_node *sgl_hash_insert_node(struct sgl_hash_head *hash, unsigned int key) -{ - struct sgl_hash_head *hash_head = &hash[hash_32(key, SGL_HASH_BITS)]; - struct sgl_hash_node *hash_node; - - struct hlist_head *head = &hash_head->head; - - SGL_LOG("key %d", key); - - hash_node = kzalloc(sizeof(struct sgl_hash_node), GFP_KERNEL); - if (hash_node == NULL) - return NULL; - - INIT_HLIST_NODE(&hash_node->node); - mutex_lock(&hash_head->mutex); - hlist_add_head(&hash_node->node, head); - mutex_unlock(&hash_head->mutex); - - hash_node->key = key; - - SGL_LOG(); - - return hash_node; -} - -/* remove the hash entry */ -static int sgl_hash_remove_node(struct sgl_hash_head *hash, unsigned int key) -{ - struct sgl_hash_head *hash_head = &hash[hash_32(key, SGL_HASH_BITS)]; - struct sgl_hash_node *hash_node; - - struct hlist_head *head = &hash_head->head; - - int err = -ENOENT; - - SGL_LOG("key %d", key); - - mutex_lock(&hash_head->mutex); - hlist_for_each_entry(hash_node, head, node) { - if (hash_node->key == key) { - hlist_del(&hash_node->node); - kfree(hash_node); - err = 0; - break; - } - } - mutex_unlock(&hash_head->mutex); - - SGL_LOG(); - - return err; -} - -static int sgl_hash_cleanup_nodes(struct sgl_hash_head *hash, int (*lock_cleanup_func)(struct sgl_lock *)) -{ - struct sgl_hash_node *hash_node; - - struct hlist_head *head; - - int i; - int err = 0; - - SGL_LOG(); - - for (i = 0; i < SGL_HASH_ENTRIES; i++) { - head = &hash[i].head; - mutex_lock(&hash->mutex); - while (!hlist_empty(head)) { - hash_node = hlist_entry(head->first, struct sgl_hash_node, node); - if (lock_cleanup_func(hash_node->lock) < 0) - err = -EBADRQC; - hlist_del(&hash_node->node); - kfree(hash_node); - } - mutex_unlock(&hash->mutex); - } - - SGL_LOG(); - - return err; -} - -/* allocate the hash table */ -static struct sgl_hash_head *sgl_hash_create_table(void) -{ - struct sgl_hash_head *hash; - - int i; - - SGL_LOG(); - - hash = kzalloc(sizeof(struct sgl_hash_head) * SGL_HASH_ENTRIES, GFP_KERNEL); - if (hash == NULL) - return NULL; - - for (i = 0; i < SGL_HASH_ENTRIES; i++) { - INIT_HLIST_HEAD(&hash[i].head); - mutex_init(&hash[i].mutex); - } - - SGL_LOG(); - - return hash; -} - -/* release the hash table */ -static void sgl_hash_destroy_table(struct sgl_hash_head *hash) -{ - SGL_LOG(); - - kfree(hash); - - SGL_LOG(); - - return; -} - -/**************** hash code end ***************/ - -static struct sgl_lock *sgl_get_lock(void *locks, unsigned int key) -{ - struct sgl_hash_node *hash_node; - - hash_node = sgl_hash_get_node((struct sgl_hash_head *)locks, key); - if (hash_node == NULL) { - return NULL; - } - - return hash_node->lock; -} - -static int sgl_insert_lock(void *locks, struct sgl_lock *lock) -{ - struct sgl_hash_node *hash_node; - - hash_node = sgl_hash_insert_node((struct sgl_hash_head *)locks, lock->key); - if (hash_node == NULL) - return -ENOMEM; - hash_node->lock = lock; - - return 0; -} - -static int sgl_remove_lock(void *locks, unsigned int key) -{ - int err; - - err = sgl_hash_remove_node((struct sgl_hash_head *)locks, key); - - return err; -} - -static int sgl_cleanup_locks(void *locks, int (*lock_cleanup_func)(struct sgl_lock *)) -{ - int err = 0; - - err = sgl_hash_cleanup_nodes((struct sgl_hash_head *)locks, lock_cleanup_func); - - return err; -} - -static void *sgl_create_locks(void) -{ - return (void *)sgl_hash_create_table(); -} - -static void sgl_destroy_locks(void *locks) -{ - sgl_hash_destroy_table((struct sgl_hash_head *)locks); - return; -} -/********** lock - hash glue code end *********/ - - -static int sgl_lock_lock(struct sgl_session_data *session_data, unsigned int key) -{ - struct sgl_lock *lock; - - struct list_head waiting_entry; - - unsigned long jiffies; - long ret = 0; - - SGL_LOG("key: %d", key); - - mutex_lock(&sgl_global.mutex); - lock = sgl_get_lock(sgl_global.locks, key); - if (lock == NULL) { - if (sgl_get_lock(session_data->inited_locks, key)) - sgl_remove_lock(session_data->inited_locks, key); - - if (sgl_get_lock(session_data->locked_locks, key)) - sgl_remove_lock(session_data->locked_locks, key); - mutex_unlock(&sgl_global.mutex); - SGL_WARN("lock is not in the global locks"); - return -ENOENT; - } - - lock = sgl_get_lock(session_data->inited_locks, key); - if (lock == NULL) { - mutex_unlock(&sgl_global.mutex); - SGL_WARN("lock is not in the inited locks"); - return -ENOENT; - } - mutex_unlock(&sgl_global.mutex); - - INIT_LIST_HEAD(&waiting_entry); - mutex_lock(&lock->data_mutex); - lock->refcnt++; - mutex_unlock(&lock->data_mutex); - mutex_lock(&lock->waiting_list_mutex); - list_add_tail(&waiting_entry, &lock->waiting_list); - mutex_unlock(&lock->waiting_list_mutex); - - jiffies = msecs_to_jiffies(lock->timeout_ms); - - SGL_LOG(); - - ret = wait_event_timeout(lock->waiting_queue, - ((lock->locked == 0) - && lock->waiting_list.next == &waiting_entry), - jiffies); - if (ret == 0) { - SGL_WARN("timed out, key: %d, owner(%d, %d)", - key, lock->owner_pid, lock->owner_tid); - mutex_lock(&lock->data_mutex); - lock->refcnt--; - mutex_unlock(&lock->data_mutex); - mutex_lock(&lock->waiting_list_mutex); - list_del(&waiting_entry); - mutex_unlock(&lock->waiting_list_mutex); - return -ETIMEDOUT; - } - - SGL_LOG(); - - mutex_lock(&lock->data_mutex); - lock->owner = (unsigned int)session_data; - lock->locked = 1; - lock->owner_pid = current->tgid; - lock->owner_tid = current->pid; - mutex_unlock(&lock->data_mutex); - - mutex_lock(&lock->waiting_list_mutex); - list_del(&waiting_entry); - mutex_unlock(&lock->waiting_list_mutex); - - /* add to the locked lock */ - sgl_insert_lock(session_data->locked_locks, lock); - - SGL_LOG(); - - return 0; -} - -static int _sgl_unlock_lock(struct sgl_lock *lock) -{ - SGL_LOG(); - - if (lock == NULL) { - SGL_WARN("lock == NULL"); - return -EBADRQC; - } - mutex_lock(&lock->data_mutex); - - if (lock->locked == 0) { - mutex_unlock(&lock->data_mutex); - SGL_WARN("tried to unlock not-locked lock"); - return -EBADRQC; - } - - lock->owner = 0; - lock->locked = 0; - lock->owner_pid = 0; - lock->owner_tid = 0; - lock->refcnt--; - - if (waitqueue_active(&lock->waiting_queue)) { - wake_up(&lock->waiting_queue); - } - mutex_unlock(&lock->data_mutex); - - SGL_LOG(); - - return 0; -} - -static int sgl_unlock_lock(struct sgl_session_data *session_data, unsigned int key) -{ - struct sgl_lock *lock; - - int err = -ENOENT; - - SGL_LOG("key: %d", key); - - mutex_lock(&sgl_global.mutex); - lock = sgl_get_lock(sgl_global.locks, key); - if (lock == NULL) { - if (sgl_get_lock(session_data->inited_locks, key)) - sgl_remove_lock(session_data->inited_locks, key); - - if (sgl_get_lock(session_data->locked_locks, key)) - sgl_remove_lock(session_data->locked_locks, key); - mutex_unlock(&sgl_global.mutex); - SGL_WARN("lock is not in the global locks"); - return -ENOENT; - } - - lock = sgl_get_lock(session_data->inited_locks, key); - if (lock == NULL) { - mutex_unlock(&sgl_global.mutex); - SGL_WARN("lock is not in the inited locks"); - return -ENOENT; - } - mutex_unlock(&sgl_global.mutex); - - mutex_lock(&lock->data_mutex); - if (lock->owner != (unsigned int)session_data) { - mutex_unlock(&lock->data_mutex); - SGL_WARN("tried to unlock the lock not-owned by calling session"); - return -EBADRQC; - } - mutex_unlock(&lock->data_mutex); - sgl_remove_lock(session_data->locked_locks, key); - err = _sgl_unlock_lock(lock); - if (err < 0) - SGL_WARN("_sgl_unlock_lock() failed"); - - SGL_LOG(); - - return err; -} - -static int sgl_init_lock(struct sgl_session_data *session_data, struct sgl_attribute *attr) -{ - struct sgl_lock *lock; - - int err = 0; - - SGL_LOG("key: %d", attr->key); - - mutex_lock(&sgl_global.mutex); - - lock = sgl_get_lock(sgl_global.locks, attr->key); - if (lock == NULL) { - /* allocate and add to the global table if this is the first initialization */ - lock = kzalloc(sizeof(struct sgl_lock), GFP_KERNEL); - if (lock == NULL) { - err = -ENOMEM; - goto out_unlock; - } - - lock->key = attr->key; - - err = sgl_insert_lock(sgl_global.locks, lock); - if (err < 0) { - kfree(lock); - goto out_unlock; - } - - /* default timeout value is 16ms */ - lock->timeout_ms = attr->timeout_ms ? attr->timeout_ms : 16; - - init_waitqueue_head(&lock->waiting_queue); - INIT_LIST_HEAD(&lock->waiting_list); - mutex_init(&lock->waiting_list_mutex); - mutex_init(&lock->data_mutex); - } - mutex_lock(&lock->data_mutex); - lock->refcnt++; - mutex_unlock(&lock->data_mutex); - - /* add to the inited locks */ - err = sgl_insert_lock(session_data->inited_locks, lock); - -out_unlock: - - mutex_unlock(&sgl_global.mutex); - - SGL_LOG(); - - return err; -} - -static int _sgl_destroy_lock(struct sgl_lock *lock) -{ - int err = 0; - - SGL_LOG(); - - if (lock == NULL) { - SGL_WARN("lock == NULL"); - return -EBADRQC; - } - - mutex_lock(&lock->data_mutex); - lock->refcnt--; - if (lock->refcnt == 0) { - mutex_unlock(&lock->data_mutex); - err = sgl_remove_lock(sgl_global.locks, lock->key); - if (err < 0) - return err; - - kfree(lock); - } else - mutex_unlock(&lock->data_mutex); - - SGL_LOG(); - - return err; -} - -static int sgl_destroy_lock(struct sgl_session_data *session_data, unsigned int key) -{ - struct sgl_lock *lock; - - int err = 0; - - SGL_LOG(); - - mutex_lock(&sgl_global.mutex); - - lock = sgl_get_lock(sgl_global.locks, key); - if (lock == NULL) { - SGL_WARN("lock is not in the global locks"); - err = -ENOENT; - goto out_unlock; - } - if (!sgl_get_lock(session_data->inited_locks, key)) { - SGL_WARN("lock is not in the inited locks"); - err = -ENOENT; - goto out_unlock; - } - - /* check if lock is still locked */ - if (sgl_get_lock(session_data->locked_locks, key)) { - SGL_WARN("destroy failed. lock is still locked"); - err = -EBUSY; - goto out_unlock; - } - - err = _sgl_destroy_lock(lock); - if (err < 0) - goto out_unlock; - - /* remove from the inited lock */ - err = sgl_remove_lock(session_data->inited_locks, key); - if (err < 0) - goto out_unlock; - -out_unlock: - - mutex_unlock(&sgl_global.mutex); - - SGL_LOG(); - - return err; -} - -static int sgl_set_data(struct sgl_session_data *session_data, struct sgl_user_data *user_data) -{ - struct sgl_lock *lock; - int ret = 0; - unsigned int key = user_data->key; - - SGL_LOG("key: %d", key); - - mutex_lock(&sgl_global.mutex); - - lock = sgl_get_lock(sgl_global.locks, key); - if (lock == NULL) { - SGL_WARN("lock is not in the inited locks"); - mutex_unlock(&sgl_global.mutex); - return -ENOENT; - } - mutex_lock(&lock->data_mutex); - lock->user_data1 = user_data->data1; - lock->user_data2 = user_data->data2; - user_data->locked = lock->locked; - mutex_unlock(&lock->data_mutex); - mutex_unlock(&sgl_global.mutex); - - SGL_LOG(); - - return ret; -} - -static int sgl_get_data(struct sgl_session_data *session_data, struct sgl_user_data *user_data) -{ - struct sgl_lock *lock; - int ret = 0; - unsigned int key = user_data->key; - - SGL_LOG("key: %d", key); - mutex_lock(&sgl_global.mutex); - - lock = sgl_get_lock(sgl_global.locks, key); - if (lock == NULL) { - SGL_WARN("lock is not in the inited locks"); - mutex_unlock(&sgl_global.mutex); - return -ENOENT; - } - mutex_lock(&lock->data_mutex); - user_data->data1 = lock->user_data1; - user_data->data2 = lock->user_data2; - user_data->locked = lock->locked; - mutex_unlock(&lock->data_mutex); - mutex_unlock(&sgl_global.mutex); - - SGL_LOG(); - - return ret; -} - -static void sgl_dump_locks(void) -{ - int i; - SGL_INFO("SLP_GLOBAL_LOCK DUMP START\n"); - mutex_lock(&sgl_global.mutex); - for (i = 0; i < SGL_HASH_ENTRIES; i++) { - struct sgl_hash_head *shead; - struct sgl_hash_node *snode; - struct hlist_head *hhead; - - shead = &((struct sgl_hash_head *)sgl_global.locks)[i]; - if (!shead) - continue; - mutex_lock(&shead->mutex); - hhead = &shead->head; - hlist_for_each_entry(snode, hhead, node) { - struct sgl_lock *lock = snode->lock; - mutex_lock(&lock->data_mutex); - SGL_INFO("lock key: %d, refcnt: %d, owner_pid: %d, owner_tid: %d\n", - lock->key, lock->refcnt, lock->owner_pid, lock->owner_tid); - mutex_unlock(&lock->data_mutex); - } - mutex_unlock(&shead->mutex); - } - mutex_unlock(&sgl_global.mutex); - SGL_INFO("SLP_GLOBAL_LOCK DUMP END\n"); -} - -#ifdef HAVE_UNLOCKED_IOCTL -static long sgl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) -#else -static int sgl_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) -#endif -{ - struct sgl_session_data *session_data = (struct sgl_session_data *)file->private_data; - - int err = 0; - - SGL_LOG(); - - switch (cmd) { - case SGL_IOC_INIT_LOCK: - /* destroy lock with attribute */ - err = sgl_init_lock(session_data, (struct sgl_attribute *)arg); - break; - case SGL_IOC_DESTROY_LOCK: - /* destroy lock with id(=arg) */ - err = sgl_destroy_lock(session_data, (unsigned int)arg); - break; - case SGL_IOC_LOCK_LOCK: - /* lock lock with id(=arg) */ - err = sgl_lock_lock(session_data, (unsigned int)arg); - break; - case SGL_IOC_UNLOCK_LOCK: - /* unlock lock with id(=arg) */ - err = sgl_unlock_lock(session_data, (unsigned int)arg); - break; - case SGL_IOC_SET_DATA: - err = sgl_set_data(session_data, (struct sgl_user_data *)arg); - break; - case SGL_IOC_GET_DATA: - err = sgl_get_data(session_data, (struct sgl_user_data *)arg); - break; - case SGL_IOC_DUMP_LOCKS: - sgl_dump_locks(); - break; - default: - SGL_WARN("unknown type of ioctl command"); - break; - } - - SGL_LOG(); - - return err; -} - -static int sgl_open(struct inode *inode, struct file *file) -{ - struct sgl_session_data *session_data; - - SGL_LOG(); - - /* init per thread data using file->private_data*/ - session_data = kzalloc(sizeof(struct sgl_session_data), GFP_KERNEL); - if (session_data == NULL) - goto err_session_data; - - session_data->inited_locks = sgl_create_locks(); - if (session_data->inited_locks == NULL) { - goto err_inited_locks; - } - - session_data->locked_locks = sgl_create_locks(); - if (session_data->locked_locks == NULL) { - goto err_locked_locks; - } - - file->private_data = (void *)session_data; - - sgl_global.refcnt++; - - SGL_LOG(); - - return 0; - -err_locked_locks: - sgl_destroy_locks(session_data->inited_locks); -err_inited_locks: - kfree(session_data); -err_session_data: - SGL_WARN(); - return -ENOMEM; -} - -static int sgl_release(struct inode *inode, struct file *file) -{ - struct sgl_session_data *session_data = file->private_data; - - int err = 0; - - SGL_LOG(); - - mutex_lock(&sgl_global.mutex); - - /* clean up the locked locks */ - if (sgl_cleanup_locks(session_data->locked_locks, _sgl_unlock_lock)) - SGL_WARN("clean-up locked locks failed"); - - /* clean up the inited locks */ - if (sgl_cleanup_locks(session_data->inited_locks, _sgl_destroy_lock)) - SGL_WARN("clean-up inited locks failed"); - - /* clean up per thread data */ - file->private_data = NULL; - - sgl_destroy_locks(session_data->locked_locks); - sgl_destroy_locks(session_data->inited_locks); - - kfree(session_data); - - mutex_unlock(&sgl_global.mutex); - sgl_global.refcnt--; - if (sgl_global.refcnt == 0) { - /* destroy global lock table */ - sgl_destroy_locks(sgl_global.locks); - - device_destroy(sgl_global.class, MKDEV(sgl_global.major, 0)); - class_destroy(sgl_global.class); - unregister_chrdev(sgl_global.major, sgl_dev_name); - } - - SGL_LOG(); - - return err; -} - -static const struct file_operations sgl_ops = { - .owner = THIS_MODULE, - .open = sgl_open, - .release = sgl_release, -#ifdef HAVE_UNLOCKED_IOCTL - .unlocked_ioctl = sgl_ioctl, -#else - .ioctl = sgl_ioctl, -#endif -}; - -static int __init sgl_init(void) -{ - int err = 0; - - SGL_LOG(); - - memset(&sgl_global, 0, sizeof(struct sgl_global)); - - sgl_global.major = SGL_MAJOR; - err = register_chrdev(sgl_global.major, sgl_dev_name, &sgl_ops); - if (err < 0) - goto err_register_chrdev; - - sgl_global.class = class_create(THIS_MODULE, sgl_dev_name); - if (IS_ERR(sgl_global.class)) { - err = PTR_ERR(sgl_global.class); - goto err_class_create; - } - - sgl_global.device = device_create(sgl_global.class, NULL, MKDEV(sgl_global.major, 0), NULL, sgl_dev_name); - if (IS_ERR(sgl_global.device)) { - err = PTR_ERR(sgl_global.device); - goto err_device_create; - } - - /* create the global lock table */ - sgl_global.locks = sgl_create_locks(); - if (sgl_global.locks == NULL) { - err = -ENOMEM; - goto err_create_locks; - } - - mutex_init(&sgl_global.mutex); - - sgl_global.refcnt++; - - SGL_LOG(); - - return 0; - -err_create_locks: -err_device_create: - class_unregister(sgl_global.class); -err_class_create: - unregister_chrdev(sgl_global.major, sgl_dev_name); -err_register_chrdev: - SGL_WARN(); - return err; -} - -void sgl_exit(void) -{ - SGL_LOG(); - - sgl_global.refcnt--; - if (sgl_global.refcnt == 0) { - mutex_destroy(&sgl_global.mutex); - - /* destroy global lock table */ - sgl_destroy_locks(sgl_global.locks); - - device_destroy(sgl_global.class, MKDEV(sgl_global.major, 0)); - class_destroy(sgl_global.class); - unregister_chrdev(sgl_global.major, sgl_dev_name); - } - - SGL_LOG(); - - return; -} - -module_init(sgl_init); -module_exit(sgl_exit); - -MODULE_LICENSE("GPL"); diff --git a/drivers/misc/slp_global_lock.h b/drivers/misc/slp_global_lock.h deleted file mode 100644 index db4d585..0000000 --- a/drivers/misc/slp_global_lock.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2012 Samsung Electronics Co., Ltd. - * - * This program is free software and is provided to you under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence. - * - * A copy of the licence is included with the program, and can also be obtained from Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __SLP_GLOBAL_LOCK_H__ -#define __SLP_GLOBAL_LOCK_H__ - -#include - -#define SGL_IOC_BASE 0x32 -#define SGL_MAJOR 224 - -struct sgl_attribute { - unsigned int key; - unsigned int timeout_ms; -}; - -struct sgl_user_data { - unsigned int key; - unsigned int data1; - unsigned int data2; - unsigned int locked; -}; - -typedef enum { - _SGL_INIT_LOCK = 1, - _SGL_DESTROY_LOCK, - _SGL_LOCK_LOCK, - _SGL_UNLOCK_LOCK, - _SGL_SET_DATA, - _SGL_GET_DATA, - _SGL_DUMP_LOCKS, -} _sgl_ioctls; - -#define SGL_IOC_INIT_LOCK _IOW(SGL_IOC_BASE, _SGL_INIT_LOCK, struct sgl_attribute *) -#define SGL_IOC_DESTROY_LOCK _IOW(SGL_IOC_BASE, _SGL_DESTROY_LOCK, unsigned int) -#define SGL_IOC_LOCK_LOCK _IOW(SGL_IOC_BASE, _SGL_LOCK_LOCK, unsigned int) -#define SGL_IOC_UNLOCK_LOCK _IOW(SGL_IOC_BASE, _SGL_UNLOCK_LOCK, unsigned int) -#define SGL_IOC_SET_DATA _IOW(SGL_IOC_BASE, _SGL_SET_DATA, struct sgl_user_data *) -#define SGL_IOC_GET_DATA _IOW(SGL_IOC_BASE, _SGL_GET_DATA, struct sgl_user_data *) -#define SGL_IOC_DUMP_LOCKS _IOW(SGL_IOC_BASE, _SGL_DUMP_LOCKS, void *) - -#endif /* __SLP_GLOBAL_LOCK_H__ */ -- 2.7.4 From 6140b968a76407d5023a1a68bcd1958232b86bdd Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Mon, 28 Nov 2016 14:17:24 +0900 Subject: [PATCH 15/16] config: tizen_tm1_defconfig: sync defconfig file This patch makes the defconfig file to sync with menuconfig Change-Id: Ied39f624f82fb800d2fabc5bf0825065b309202c Signed-off-by: Inki Dae --- arch/arm/configs/tizen_tm1_defconfig | 157 +++++++++++++++++++++++------------ 1 file changed, 105 insertions(+), 52 deletions(-) diff --git a/arch/arm/configs/tizen_tm1_defconfig b/arch/arm/configs/tizen_tm1_defconfig index ab57fa5..9b9bac9 100755 --- a/arch/arm/configs/tizen_tm1_defconfig +++ b/arch/arm/configs/tizen_tm1_defconfig @@ -1,3 +1,7 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 3.10.65 Kernel Configuration +# CONFIG_ARM=y CONFIG_ARM_HAS_SG_CHAIN=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -42,9 +46,7 @@ CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set CONFIG_FHANDLE=y CONFIG_AUDIT=y -# CONFIG_AUDITSYSCALL=y -# CONFIG_AUDIT_WATCH=y -# CONFIG_AUDIT_TREE=y +# CONFIG_AUDITSYSCALL is not set # CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set CONFIG_HAVE_GENERIC_HARDIRQS=y @@ -109,6 +111,7 @@ CONFIG_MEMCG=y CONFIG_MEMCG_SWAP=y CONFIG_MEMCG_SWAP_ENABLED=y # CONFIG_MEMCG_KMEM is not set +# CONFIG_CGROUP_PERF is not set CONFIG_CGROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y CONFIG_CFS_BANDWIDTH=y @@ -191,6 +194,7 @@ CONFIG_GENERIC_IDLE_POLL_SETUP=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y @@ -481,6 +485,9 @@ CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_CROSS_MEMORY_ATTACH=y # CONFIG_CLEANCACHE is not set # CONFIG_FRONTSWAP is not set +CONFIG_ZSMALLOC=y +CONFIG_PGTABLE_MAPPING=y +# CONFIG_ZSMALLOC_STAT is not set CONFIG_CMA=y # CONFIG_CMA_DEBUG is not set CONFIG_SHRINK_MEMORY=y @@ -539,9 +546,7 @@ CONFIG_CPU_FREQ_GOV_INTERACTIVE=y CONFIG_CPU_FREQ_GOV_SPRDEMAND=y # CONFIG_DVFS_ONLY is not set # CONFIG_SPRD_CPUFREQ_DT_DRIVER is not set -# CONFIG_GENERIC_CPUFREQ_CPU0 is not set # CONFIG_SCX35_1300MHZ is not set -CONFIG_CLK_MON=y # # ARM CPU frequency scaling drivers @@ -549,7 +554,6 @@ CONFIG_CLK_MON=y # CONFIG_ARM_EXYNOS4210_CPUFREQ is not set # CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set # CONFIG_ARM_EXYNOS5250_CPUFREQ is not set -# CONFIG_ARM_EXYNOS5440_CPUFREQ is not set # CONFIG_ARM_KIRKWOOD_CPUFREQ is not set CONFIG_CPU_IDLE=y # CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set @@ -584,13 +588,8 @@ CONFIG_COREDUMP=y # CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y -# CONFIG_HAS_WAKELOCK=y -# CONFIG_HAS_EARLYSUSPEND=y -# CONFIG_WAKELOCK=y -# CONFIG_WAKELOCK_STAT=y +# CONFIG_WAKELOCK is not set CONFIG_USER_WAKELOCK=y -# CONFIG_EARLYSUSPEND=y -# CONFIG_FB_EARLYSUSPEND=y CONFIG_PM_SLEEP=y CONFIG_PM_SLEEP_SMP=y CONFIG_PM_AUTOSLEEP=y @@ -598,8 +597,6 @@ CONFIG_PM_RUNTIME=y CONFIG_PM=y # CONFIG_PM_DEBUG is not set # CONFIG_APM_EMULATION is not set -CONFIG_ARCH_HAS_OPP=y -CONFIG_PM_OPP=y CONFIG_PM_CLK=y # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set CONFIG_CPU_PM=y @@ -771,10 +768,10 @@ CONFIG_NETFILTER_XT_TARGET_TRACE=y # # CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set # CONFIG_NETFILTER_XT_MATCH_BPF is not set +CONFIG_NETFILTER_XT_MATCH_CGROUP=y # CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set CONFIG_NETFILTER_XT_MATCH_COMMENT=y # CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set -CONFIG_NETFILTER_XT_MATCH_CGROUP=y # CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y CONFIG_NETFILTER_XT_MATCH_CONNMARK=y @@ -970,17 +967,21 @@ CONFIG_BQL=y # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NET_DROP_MONITOR is not set # CONFIG_HAMRADIO is not set # CONFIG_CAN is not set # CONFIG_IRDA is not set CONFIG_BT=y +CONFIG_BT_BREDR=y CONFIG_BT_RFCOMM=y # CONFIG_BT_RFCOMM_TTY is not set CONFIG_BT_BNEP=y CONFIG_BT_BNEP_MC_FILTER=y CONFIG_BT_BNEP_PROTO_FILTER=y CONFIG_BT_HIDP=y +CONFIG_BT_LE=y # CONFIG_BT_SELFTEST is not set + # # Bluetooth device drivers # @@ -1068,6 +1069,7 @@ CONFIG_BATTERY_SWELLING=y # CONFIG_SAMSUNG_LPM_MODE is not set # CONFIG_SAMSUNG_BATTERY_ENG_TEST is not set # CONFIG_STBC_SAMSUNG is not set +CONFIG_SEC_BATTERY_PM_NOTIFY=y # CONFIG_FUELGAUGE_MFD is not set # CONFIG_FUELGAUGE_DUMMY is not set # CONFIG_FUELGAUGE_ADC is not set @@ -1097,7 +1099,6 @@ CONFIG_CHARGER_SM5701=y # CONFIG_CHARGER_SM5418 is not set CONFIG_FUELGAUGE_SPRD4SAMSUNG27X3=y # CONFIG_CHARGER_SPRD4SAMSUNG27X3 is not set -CONFIG_SEC_BATTERY_PM_NOTIFY=y # # Bus devices @@ -1123,6 +1124,9 @@ CONFIG_OF_NET=y CONFIG_OF_MDIO=y # CONFIG_PARPORT is not set CONFIG_BLK_DEV=y +CONFIG_ZRAM=y +CONFIG_ZRAM_LZ4_COMPRESS=y +# CONFIG_ZRAM_DEBUG is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 @@ -1186,6 +1190,7 @@ CONFIG_SPRD_CPROC=y # CONFIG_CGX is not set # CONFIG_SR2351_FM is not set # CONFIG_FM_SEEK_STEP_50KHZ is not set +CONFIG_CLK_MON=y # CONFIG_C2PORT is not set # @@ -1217,6 +1222,8 @@ CONFIG_SPRD_CPROC=y # CONFIG_SDIODEV=y # CONFIG_SDIODEV_TEST is not set +# CONFIG_MARLIN_CALI_READY_94 is not set +# CONFIG_MARLIN_CALI_READY_131 is not set # # MARLIN DEBUG modules @@ -1228,7 +1235,6 @@ CONFIG_SPRD_WCN=y CONFIG_SPRD_DOWNLOAD_IMG=y CONFIG_SPRD_DOWNLOAD_POWER_CTL=y # CONFIG_SPRD_HWCONFIG_CHECK is not set -# CONFIG_SLP_GLOBAL_LOCK is not set CONFIG_TIZEN_GLOBAL_LOCK=y # @@ -1435,11 +1441,8 @@ CONFIG_WLAN=y # CONFIG_BCM43241 is not set # CONFIG_BCM43455 is not set # CONFIG_BCM4334W is not set -# CONFIG_BCMDHD_FW_PATH="/system/etc/firmware/fw_bcmdhd.bin" -# CONFIG_BCMDHD_NVRAM_PATH="/system/etc/wifi/bcmdhd.cal" -# CONFIG_BROADCOM_WIFI_RESERVED_MEM is not set -# CONFIG_WIFI_BROADCOM_COB is not set -# CONFIG_WLAN_REGION_CODE=300 +CONFIG_BCMDHD_FW_PATH="/system/etc/firmware/fw_bcmdhd.bin" +CONFIG_BCMDHD_NVRAM_PATH="/system/etc/wifi/bcmdhd.cal" # CONFIG_BRCMFMAC is not set # CONFIG_HOSTAP is not set # CONFIG_LIBERTAS is not set @@ -1472,7 +1475,6 @@ CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_EVBUG is not set # CONFIG_INPUT_KEYRESET is not set # CONFIG_INPUT_KEYCOMBO is not set -CONFIG_INPUT_SECBRIDGE=y # # Input Device Drivers @@ -1505,6 +1507,28 @@ CONFIG_KEYBOARD_SPRD_EIC=y CONFIG_KEYBOARD_CORERIVER_TOUCHKEY=y # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_AS5011 is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +# CONFIG_JOYSTICK_XPAD is not set # CONFIG_INPUT_TABLET is not set CONFIG_INPUT_TOUCHSCREEN=y # CONFIG_TOUCHSCREEN_ADS7846 is not set @@ -1586,6 +1610,7 @@ CONFIG_INPUT_HEADSET_SPRD_SC2723=y CONFIG_FF_REGULATOR_HAPTIC=y # CONFIG_INPUT_EPL2182_I2C is not set # CONFIG_INPUT_EPL259X_I2C is not set +CONFIG_INPUT_SECBRIDGE=y # # Hardware I/O ports @@ -2023,9 +2048,13 @@ CONFIG_RADIO_ADAPTERS=y # BCM4343S FM driver (V4L2 based) # # CONFIG_RADIO_BCM4343S is not set -# CONFIG_CYPRESS_FIRMWARE is not set +# +# SC2331 FM driver (V4L2 based) +# CONFIG_RADIO_SC2331=y +# CONFIG_CYPRESS_FIRMWARE is not set + # # Media ancillary drivers (tuners, sensors, i2c, frontends) # @@ -2100,8 +2129,8 @@ CONFIG_DRM_SPRD=y # CONFIG_DRM_SPRD_DMABUF is not set CONFIG_DRM_SPRD_IPP=y CONFIG_DRM_SPRD_GSP=y -CONFIG_SPRD_IOMMU=y CONFIG_DRM_DPMS_IOCTL=y +CONFIG_SPRD_IOMMU=y # # ARM GPU Configuration @@ -2158,7 +2187,6 @@ CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_SIMPLE is not set CONFIG_FB_SCX30G=y CONFIG_SPRD_FB_SIZE=6 -CONFIG_SPRDFB_MDNIE_LITE_TUNING=y # CONFIG_FB_LCD_HX8369B_MIPI_COREPRIMELITE is not set # CONFIG_FB_LCD_SD7798D_MIPI_COREPRIMELITE is not set # CONFIG_FB_LCD_HX8369B_MIPI_SHARKLS_Z3LTE is not set @@ -2201,6 +2229,7 @@ CONFIG_FB_VSYNC_SUPPORT=y # CONFIG_FB_LOW_RES_SIMU is not set CONFIG_FB_TRIPLE_FRAMEBUFFER=y # CONFIG_FB_DEBUG_LCD_TUNING is not set +CONFIG_SPRDFB_MDNIE_LITE_TUNING=y # CONFIG_EXYNOS_VIDEO is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=y @@ -2246,6 +2275,7 @@ CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_TIMER=y CONFIG_SND_PCM=y +CONFIG_SND_RAWMIDI=y CONFIG_SND_COMPRESS_OFFLOAD=y CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set @@ -2313,9 +2343,9 @@ CONFIG_SND_SOC_SPRD_I2S=y # SPRD Codec # # CONFIG_SND_SOC_SPRD_USE_EAR_JACK_TYPE13 is not set -CONFIG_SND_SOC_SPRD_USE_INTERNAL_DETECT=y CONFIG_SND_SOC_SPRD_CODEC_V4=y CONFIG_SND_SOC_SPRD_AUDIO_USE_INTER_HP_PA_V4=y +CONFIG_SND_SOC_SPRD_USE_INTERNAL_DETECT=y # CONFIG_SND_SOC_SPRD_CODEC_EAR_WITH_IN_SPK is not set CONFIG_SND_SOC_SPRD_CODEC_NO_HP_POP=y CONFIG_SND_SOC_SPRD_HP_POP_DELAY_TIME=0 @@ -2341,6 +2371,8 @@ CONFIG_HID_A4TECH=y CONFIG_HID_ACRUX=y # CONFIG_HID_ACRUX_FF is not set CONFIG_HID_APPLE=y +# CONFIG_HID_APPLEIR is not set +# CONFIG_HID_AUREAL is not set CONFIG_HID_BELKIN=y CONFIG_HID_CHERRY=y CONFIG_HID_CHICONY=y @@ -2351,19 +2383,23 @@ CONFIG_HID_DRAGONRISE=y CONFIG_HID_EMS_FF=y CONFIG_HID_ELECOM=y CONFIG_HID_EZKEY=y +# CONFIG_HID_HOLTEK is not set CONFIG_HID_KEYTOUCH=y CONFIG_HID_KYE=y CONFIG_HID_UCLOGIC=y CONFIG_HID_WALTOP=y CONFIG_HID_GYRATION=y +# CONFIG_HID_ICADE is not set CONFIG_HID_TWINHAN=y CONFIG_HID_KENSINGTON=y CONFIG_HID_LCPOWER=y +# CONFIG_HID_LENOVO_TPKBD is not set CONFIG_HID_LOGITECH=y +# CONFIG_HID_LOGITECH_DJ is not set # CONFIG_LOGITECH_FF is not set # CONFIG_LOGIRUMBLEPAD2_FF is not set # CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWII_FF is not set +# CONFIG_LOGIWHEELS_FF is not set CONFIG_HID_MAGICMOUSE=y CONFIG_HID_MICROSOFT=y CONFIG_HID_MONTEREY=y @@ -2378,30 +2414,35 @@ CONFIG_HID_PICOLCD=y # CONFIG_HID_PICOLCD_BACKLIGHT is not set # CONFIG_HID_PICOLCD_LCD is not set # CONFIG_HID_PICOLCD_LEDS is not set -CONFIG_HID_QUANTA=y +# CONFIG_HID_PRIMAX is not set +# CONFIG_HID_PS3REMOTE is not set CONFIG_HID_ROCCAT=y -CONFIG_HID_ROCCAT_COMMON=y -CONFIG_HID_ROCCAT_ARVO=y -CONFIG_HID_ROCCAT_KONE=y -CONFIG_HID_ROCCAT_KONEPLUS=y -CONFIG_HID_ROCCAT_KOVAPLUS=y -CONFIG_HID_ROCCAT_PYRA=y +# CONFIG_HID_SAITEK is not set CONFIG_HID_SAMSUNG=y CONFIG_HID_SONY=y +# CONFIG_HID_SPEEDLINK is not set +# CONFIG_HID_STEELSERIES is not set CONFIG_HID_SUNPLUS=y CONFIG_HID_GREENASIA=y # CONFIG_GREENASIA_FF is not set CONFIG_HID_SMARTJOYPLUS=y # CONFIG_SMARTJOYPLUS_FF is not set +# CONFIG_HID_TIVO is not set CONFIG_HID_TOPSEED=y +# CONFIG_HID_THINGM is not set CONFIG_HID_THRUSTMASTER=y # CONFIG_THRUSTMASTER_FF is not set CONFIG_HID_WACOM=y -CONFIG_HID_WACOM_POWER_SUPPLY=y +# CONFIG_HID_WIIMOTE is not set CONFIG_HID_ZEROPLUS=y +# CONFIG_ZEROPLUS_FF is not set +# CONFIG_HID_ZYDACRON is not set +# CONFIG_HID_SENSOR_HUB is not set + # # USB HID support # +CONFIG_USB_HID=y # CONFIG_HID_PID is not set # CONFIG_USB_HIDDEV is not set @@ -2479,6 +2520,16 @@ CONFIG_USB_STORAGE_ENE_UB6250=y # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set + +# +# USB Notify features +# +CONFIG_USB_NOTIFY_LAYER=y +CONFIG_USB_HOST_NOTIFY=y +CONFIG_USB_NOTIFIER=y +# CONFIG_USB_DEBUG_DETAILED_LOG is not set +# CONFIG_USB_STORAGE_DETECT is not set +CONFIG_USB_EXTERNAL_DETECT=y # CONFIG_USB_DWC3 is not set # CONFIG_USB_CHIPIDEA is not set @@ -2544,10 +2595,6 @@ CONFIG_USB_U_SERIAL_SELECTOR=y # # Legacy USB Gadget Drivers # -CONFIG_USB_HOST_NOTIFY=y -CONFIG_USB_NOTIFY_LAYER=y -CONFIG_USB_NOTIFIER=y -CONFIG_USB_EXTERNAL_DETECT=y # CONFIG_USB_ZERO is not set # CONFIG_USB_AUDIO is not set # CONFIG_USB_ETH is not set @@ -2853,11 +2900,6 @@ CONFIG_STAGING=y # CONFIG_IIO_GPIO_TRIGGER is not set # CONFIG_IIO_SYSFS_TRIGGER is not set # CONFIG_IIO_SIMPLE_DUMMY is not set -CONFIG_ZSMALLOC=y -CONFIG_PGTABLE_MAPPING=y -CONFIG_ZRAM=y -CONFIG_ZRAM_LZ4_COMPRESS=y -# CONFIG_ZRAM_DEBUG=y # CONFIG_USB_ENESTORAGE is not set # CONFIG_BCM_WIMAX is not set # CONFIG_FT1000 is not set @@ -2895,6 +2937,7 @@ CONFIG_ION_SPRD=y # CONFIG_RUNTIME_COMPCACHE is not set # CONFIG_USB_WPAN_HCD is not set # CONFIG_WIMAX_GDM72XX is not set +# CONFIG_CSR_WIFI is not set # CONFIG_CED1401 is not set # CONFIG_DGRP is not set @@ -3007,7 +3050,6 @@ CONFIG_CLKSRC_MMIO=y # Rpmsg drivers # # CONFIG_PM_DEVFREQ is not set - # CONFIG_EXTCON is not set # CONFIG_MEMORY is not set CONFIG_IIO=y @@ -3116,11 +3158,11 @@ CONFIG_SIPC_STTY=y # Sensor support # CONFIG_SENSORS=y -CONFIG_SENSORS_IMS1911=y -CONFIG_SENSORS_CM36672P=y # CONFIG_SENSORS_GP2A002 is not set # CONFIG_SENSORS_GP2A_HAS_REGULATOR is not set # CONFIG_SENSORS_LEDA_EN_GPIO is not set +CONFIG_SENSORS_IMS1911=y +CONFIG_SENSORS_CM36672P=y CONFIG_SENSORS_K2HH=y # CONFIG_SENSORS_K2HH_HAS_REGULATOR is not set @@ -3129,6 +3171,7 @@ CONFIG_SENSORS_K2HH=y # CONFIG_SPRD_IQ=y # CONFIG_HAS_AUTOTST is not set +CONFIG_GATOR=m # CONFIG_NO_HOTPLUG_POLICY is not set CONFIG_SS_TOUCH_BOOST_CPU_HOTPLUG=y @@ -3144,7 +3187,6 @@ CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y # CONFIG_EXT4_DEBUG is not set # CONFIG_SDCARD_FS is not set -# CONFIG_SDCARD_FS_CI_SEARCH is not set CONFIG_JBD2=y # CONFIG_JBD2_DEBUG is not set CONFIG_FS_MBCACHE=y @@ -3210,6 +3252,7 @@ CONFIG_MISC_FILESYSTEMS=y # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set CONFIG_ECRYPT_FS=y +# CONFIG_ECRYPT_FS_MESSAGING is not set # CONFIG_HFS_FS is not set # CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set @@ -3218,8 +3261,14 @@ CONFIG_ECRYPT_FS=y # CONFIG_LOGFS is not set # CONFIG_CRAMFS is not set CONFIG_SQUASHFS=y +CONFIG_SQUASHFS_FILE_CACHE=y +# CONFIG_SQUASHFS_FILE_DIRECT is not set +CONFIG_SQUASHFS_DECOMP_SINGLE=y +# CONFIG_SQUASHFS_DECOMP_MULTI is not set +# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set CONFIG_SQUASHFS_XATTR=y CONFIG_SQUASHFS_ZLIB=y +# CONFIG_SQUASHFS_LZ4 is not set CONFIG_SQUASHFS_LZO=y # CONFIG_SQUASHFS_XZ is not set CONFIG_SQUASHFS_4K_DEVBLK_SIZE=y @@ -3440,6 +3489,7 @@ CONFIG_SECURITY_NETWORK=y # CONFIG_SECURITY_PATH is not set # CONFIG_SECURITY_SELINUX is not set CONFIG_SECURITY_SMACK=y +# CONFIG_SECURITY_SMACK_BRINGUP is not set # CONFIG_SECURITY_SMACK_NETFILTER is not set # CONFIG_SECURITY_TOMOYO is not set # CONFIG_SECURITY_APPARMOR is not set @@ -3469,7 +3519,7 @@ CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y # CONFIG_CRYPTO_USER is not set CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -# CONFIG_CRYPTO_GF128MUL is not set +CONFIG_CRYPTO_GF128MUL=y # CONFIG_CRYPTO_NULL is not set # CONFIG_CRYPTO_PCRYPT is not set CONFIG_CRYPTO_WORKQUEUE=y @@ -3559,7 +3609,7 @@ CONFIG_CRYPTO_ANSI_CPRNG=y # CONFIG_CRYPTO_USER_API_SKCIPHER is not set CONFIG_CRYPTO_HW=y # CONFIG_ASYMMETRIC_KEY_TYPE is not set -# CONFIG_BINARY_PRINTF is not set +CONFIG_BINARY_PRINTF=y # # Library routines @@ -3582,13 +3632,16 @@ CONFIG_CRC32_SLICEBY8=y # CONFIG_CRC7 is not set CONFIG_LIBCRC32C=y # CONFIG_CRC8 is not set -# CONFIG_AUDIT_GENERIC=y +CONFIG_AUDIT_GENERIC=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y +CONFIG_LZ4_COMPRESS=y +CONFIG_LZ4_DECOMPRESS=y # CONFIG_XZ_DEC is not set # CONFIG_XZ_DEC_BCJ is not set +CONFIG_DECOMPRESS_GZIP=y CONFIG_LZO_SOFT_ALGO=y # CONFIG_LZO_HW_ALGO is not set CONFIG_GENERIC_ALLOCATOR=y -- 2.7.4 From 32a7e49022af9a400bacf7121873aefdb0d1aff8 Mon Sep 17 00:00:00 2001 From: jooseong lee Date: Mon, 28 Nov 2016 14:51:26 +0900 Subject: [PATCH 16/16] Revert "ARM: tizen_tm1_defconfig: disable smack_netfilter temporarily" This reverts commit 9807397c2e1c82653b1df12f5022f138b298d6f4. Change-Id: Ie5a993dfcb58130cbb1d5bb3a278a337d01eab2e Signed-off-by: jooseong lee --- arch/arm/configs/tizen_tm1_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/configs/tizen_tm1_defconfig b/arch/arm/configs/tizen_tm1_defconfig index 9b9bac9..c4bd6dc 100755 --- a/arch/arm/configs/tizen_tm1_defconfig +++ b/arch/arm/configs/tizen_tm1_defconfig @@ -3490,7 +3490,7 @@ CONFIG_SECURITY_NETWORK=y # CONFIG_SECURITY_SELINUX is not set CONFIG_SECURITY_SMACK=y # CONFIG_SECURITY_SMACK_BRINGUP is not set -# CONFIG_SECURITY_SMACK_NETFILTER is not set +CONFIG_SECURITY_SMACK_NETFILTER=y # CONFIG_SECURITY_TOMOYO is not set # CONFIG_SECURITY_APPARMOR is not set # CONFIG_SECURITY_YAMA is not set -- 2.7.4