diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2016-07-11 17:03:04 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2016-07-11 17:04:51 +0200 |
commit | 30459ff41064318ab2931ffe24e7994884b46a6f (patch) | |
tree | ff8235c3f12f5182931b97d63ee984467d336856 | |
parent | 7bdc82287e8d3d7d20289096c459f1d380142d65 (diff) | |
download | meta-enea-bsp-ppc-30459ff41064318ab2931ffe24e7994884b46a6f.tar.gz |
linux-qoriq: Upgrade to v4.1
Drop patches that are already in mainline.
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
7 files changed, 1 insertions, 211 deletions
diff --git a/recipes-kernel/linux/files/0001-fsnotify-fix-oops-in-fsnotify_clear_marks_by_group_f.patch b/recipes-kernel/linux/files/0001-fsnotify-fix-oops-in-fsnotify_clear_marks_by_group_f.patch deleted file mode 100644 index 250c8db..0000000 --- a/recipes-kernel/linux/files/0001-fsnotify-fix-oops-in-fsnotify_clear_marks_by_group_f.patch +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | From 8f2f3eb59dff4ec538de55f2e0592fec85966aab Mon Sep 17 00:00:00 2001 | ||
2 | From: Jan Kara <jack@suse.com> | ||
3 | Date: Thu, 6 Aug 2015 15:46:42 -0700 | ||
4 | Subject: [PATCH] fsnotify: fix oops in fsnotify_clear_marks_by_group_flags() | ||
5 | |||
6 | fsnotify_clear_marks_by_group_flags() can race with | ||
7 | fsnotify_destroy_marks() so that when fsnotify_destroy_mark_locked() | ||
8 | drops mark_mutex, a mark from the list iterated by | ||
9 | fsnotify_clear_marks_by_group_flags() can be freed and thus the next | ||
10 | entry pointer we have cached may become stale and we dereference free | ||
11 | memory. | ||
12 | |||
13 | Fix the problem by first moving marks to free to a special private list | ||
14 | and then always free the first entry in the special list. This method | ||
15 | is safe even when entries from the list can disappear once we drop the | ||
16 | lock. | ||
17 | |||
18 | Upstream-Status: Backported | ||
19 | |||
20 | Signed-off-by: Jan Kara <jack@suse.com> | ||
21 | Reported-by: Ashish Sangwan <a.sangwan@samsung.com> | ||
22 | Reviewed-by: Ashish Sangwan <a.sangwan@samsung.com> | ||
23 | Cc: Lino Sanfilippo <LinoSanfilippo@gmx.de> | ||
24 | Cc: <stable@vger.kernel.org> | ||
25 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
26 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
27 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
28 | --- | ||
29 | fs/notify/mark.c | 30 +++++++++++++++++++++++++----- | ||
30 | 1 file changed, 25 insertions(+), 5 deletions(-) | ||
31 | |||
32 | diff --git a/fs/notify/mark.c b/fs/notify/mark.c | ||
33 | index 92e48c7..39ddcaf 100644 | ||
34 | --- a/fs/notify/mark.c | ||
35 | +++ b/fs/notify/mark.c | ||
36 | @@ -412,16 +412,36 @@ void fsnotify_clear_marks_by_group_flags(struct fsnotify_group *group, | ||
37 | unsigned int flags) | ||
38 | { | ||
39 | struct fsnotify_mark *lmark, *mark; | ||
40 | + LIST_HEAD(to_free); | ||
41 | |||
42 | + /* | ||
43 | + * We have to be really careful here. Anytime we drop mark_mutex, e.g. | ||
44 | + * fsnotify_clear_marks_by_inode() can come and free marks. Even in our | ||
45 | + * to_free list so we have to use mark_mutex even when accessing that | ||
46 | + * list. And freeing mark requires us to drop mark_mutex. So we can | ||
47 | + * reliably free only the first mark in the list. That's why we first | ||
48 | + * move marks to free to to_free list in one go and then free marks in | ||
49 | + * to_free list one by one. | ||
50 | + */ | ||
51 | mutex_lock_nested(&group->mark_mutex, SINGLE_DEPTH_NESTING); | ||
52 | list_for_each_entry_safe(mark, lmark, &group->marks_list, g_list) { | ||
53 | - if (mark->flags & flags) { | ||
54 | - fsnotify_get_mark(mark); | ||
55 | - fsnotify_destroy_mark_locked(mark, group); | ||
56 | - fsnotify_put_mark(mark); | ||
57 | - } | ||
58 | + if (mark->flags & flags) | ||
59 | + list_move(&mark->g_list, &to_free); | ||
60 | } | ||
61 | mutex_unlock(&group->mark_mutex); | ||
62 | + | ||
63 | + while (1) { | ||
64 | + mutex_lock_nested(&group->mark_mutex, SINGLE_DEPTH_NESTING); | ||
65 | + if (list_empty(&to_free)) { | ||
66 | + mutex_unlock(&group->mark_mutex); | ||
67 | + break; | ||
68 | + } | ||
69 | + mark = list_first_entry(&to_free, struct fsnotify_mark, g_list); | ||
70 | + fsnotify_get_mark(mark); | ||
71 | + fsnotify_destroy_mark_locked(mark, group); | ||
72 | + mutex_unlock(&group->mark_mutex); | ||
73 | + fsnotify_put_mark(mark); | ||
74 | + } | ||
75 | } | ||
76 | |||
77 | /* | ||
78 | -- | ||
79 | 1.9.1 | ||
80 | |||
diff --git a/recipes-kernel/linux/files/Trusty-SRU-ipc-fix-compat-msgrcv-with-negative-msgtyp.patch b/recipes-kernel/linux/files/Trusty-SRU-ipc-fix-compat-msgrcv-with-negative-msgtyp.patch deleted file mode 100644 index b90a114..0000000 --- a/recipes-kernel/linux/files/Trusty-SRU-ipc-fix-compat-msgrcv-with-negative-msgtyp.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | BugLink: http://bugs.launchpad.net/bugs/1393355 | ||
2 | |||
3 | Compat function takes msgtyp argument as u32 and passes it down to | ||
4 | do_msgrcv which results in casting to long, thus the sign is lost and we | ||
5 | get a big positive number instead. | ||
6 | |||
7 | Cast the argument to signed type before passing it down. | ||
8 | |||
9 | Signed-off-by: Mateusz Guzik <mguzik@redhat.com> | ||
10 | Reported-by: Gabriellla Schmidt <gsc@bruker.de> | ||
11 | |||
12 | Upstream-Status::Backport | ||
13 | Kernel 3.14 | ||
14 | |||
15 | diff --git a/ipc/compat.c b/ipc/compat.c | ||
16 | index 892f658..d3b3760 100644 | ||
17 | --- a/ipc/compat.c | ||
18 | +++ b/ipc/compat.c | ||
19 | @@ -381,7 +381,7 @@ COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second, | ||
20 | uptr = compat_ptr(ipck.msgp); | ||
21 | fifth = ipck.msgtyp; | ||
22 | } | ||
23 | - return do_msgrcv(first, uptr, second, fifth, third, | ||
24 | + return do_msgrcv(first, uptr, second, (s32)fifth, third, | ||
25 | compat_do_msg_fill); | ||
26 | } | ||
27 | case MSGGET: | ||
diff --git a/recipes-kernel/linux/files/powerpc-Fix-64-bit-builds-with-binutils-2.24.patch b/recipes-kernel/linux/files/powerpc-Fix-64-bit-builds-with-binutils-2.24.patch deleted file mode 100644 index 2fdcc9f..0000000 --- a/recipes-kernel/linux/files/powerpc-Fix-64-bit-builds-with-binutils-2.24.patch +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | From 7998eb3dc700aaf499f93f50b3d77da834ef9e1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Guenter Roeck <linux@roeck-us.net> | ||
3 | Date: Thu, 15 May 2014 09:33:42 -0700 | ||
4 | Subject: powerpc: Fix 64 bit builds with binutils 2.24 | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | With binutils 2.24, various 64 bit builds fail with relocation errors | ||
9 | such as | ||
10 | |||
11 | arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e': | ||
12 | (.text+0x165ee): relocation truncated to fit: R_PPC64_ADDR16_HI | ||
13 | against symbol `interrupt_base_book3e' defined in .text section | ||
14 | in arch/powerpc/kernel/built-in.o | ||
15 | arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e': | ||
16 | (.text+0x16602): relocation truncated to fit: R_PPC64_ADDR16_HI | ||
17 | against symbol `interrupt_end_book3e' defined in .text section | ||
18 | in arch/powerpc/kernel/built-in.o | ||
19 | |||
20 | The assembler maintainer says: | ||
21 | |||
22 | I changed the ABI, something that had to be done but unfortunately | ||
23 | happens to break the booke kernel code. When building up a 64-bit | ||
24 | value with lis, ori, shl, oris, ori or similar sequences, you now | ||
25 | should use @high and @higha in place of @h and @ha. @h and @ha | ||
26 | (and their associated relocs R_PPC64_ADDR16_HI and R_PPC64_ADDR16_HA) | ||
27 | now report overflow if the value is out of 32-bit signed range. | ||
28 | ie. @h and @ha assume you're building a 32-bit value. This is needed | ||
29 | to report out-of-range -mcmodel=medium toc pointer offsets in @toc@h | ||
30 | and @toc@ha expressions, and for consistency I did the same for all | ||
31 | other @h and @ha relocs. | ||
32 | |||
33 | Replacing @h with @high in one strategic location fixes the relocation | ||
34 | errors. This has to be done conditionally since the assembler either | ||
35 | supports @h or @high but not both. | ||
36 | |||
37 | Cc: <stable@vger.kernel.org> | ||
38 | Signed-off-by: Guenter Roeck <linux@roeck-us.net> | ||
39 | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> | ||
40 | |||
41 | diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile | ||
42 | index 4c0cedf..ce4c68a 100644 | ||
43 | --- a/arch/powerpc/Makefile | ||
44 | +++ b/arch/powerpc/Makefile | ||
45 | @@ -150,7 +150,9 @@ endif | ||
46 | |||
47 | CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell) | ||
48 | |||
49 | -KBUILD_CPPFLAGS += -Iarch/$(ARCH) | ||
50 | +asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1) | ||
51 | + | ||
52 | +KBUILD_CPPFLAGS += -Iarch/$(ARCH) $(asinstr) | ||
53 | KBUILD_AFLAGS += -Iarch/$(ARCH) | ||
54 | KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y) | ||
55 | CPP = $(CC) -E $(KBUILD_CFLAGS) | ||
56 | diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h | ||
57 | index 6586a40..cded7c1 100644 | ||
58 | --- a/arch/powerpc/include/asm/ppc_asm.h | ||
59 | +++ b/arch/powerpc/include/asm/ppc_asm.h | ||
60 | @@ -318,11 +318,16 @@ n: | ||
61 | addi reg,reg,(name - 0b)@l; | ||
62 | |||
63 | #ifdef __powerpc64__ | ||
64 | +#ifdef HAVE_AS_ATHIGH | ||
65 | +#define __AS_ATHIGH high | ||
66 | +#else | ||
67 | +#define __AS_ATHIGH h | ||
68 | +#endif | ||
69 | #define LOAD_REG_IMMEDIATE(reg,expr) \ | ||
70 | lis reg,(expr)@highest; \ | ||
71 | ori reg,reg,(expr)@higher; \ | ||
72 | rldicr reg,reg,32,31; \ | ||
73 | - oris reg,reg,(expr)@h; \ | ||
74 | + oris reg,reg,(expr)@__AS_ATHIGH; \ | ||
75 | ori reg,reg,(expr)@l; | ||
76 | |||
77 | #define LOAD_REG_ADDR(reg,name) \ | ||
78 | -- | ||
79 | cgit v0.10.1 | ||
80 | |||
diff --git a/recipes-kernel/linux/files/powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch b/recipes-kernel/linux/files/powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch deleted file mode 100644 index 5acf97a..0000000 --- a/recipes-kernel/linux/files/powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c | ||
2 | index ae3d5b7..92cb18d 100644 | ||
3 | --- a/arch/powerpc/mm/tlb_nohash.c | ||
4 | +++ b/arch/powerpc/mm/tlb_nohash.c | ||
5 | @@ -596,8 +596,13 @@ static void __early_init_mmu(int boot_cpu) | ||
6 | /* XXX This should be decided at runtime based on supported | ||
7 | * page sizes in the TLB, but for now let's assume 16M is | ||
8 | * always there and a good fit (which it probably is) | ||
9 | + * | ||
10 | + * Freescale booke only supports 4K pages in TLB0, so use that. | ||
11 | */ | ||
12 | - mmu_vmemmap_psize = MMU_PAGE_16M; | ||
13 | + if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) | ||
14 | + mmu_vmemmap_psize = MMU_PAGE_4K; | ||
15 | + else | ||
16 | + mmu_vmemmap_psize = MMU_PAGE_16M; | ||
17 | |||
18 | /* XXX This code only checks for TLB 0 capabilities and doesn't | ||
19 | * check what page size combos are supported by the HW. It | ||
diff --git a/recipes-kernel/linux/linux-qoriq-common.inc b/recipes-kernel/linux/linux-qoriq-common.inc index d6f0565..d46272e 100644 --- a/recipes-kernel/linux/linux-qoriq-common.inc +++ b/recipes-kernel/linux/linux-qoriq-common.inc | |||
@@ -4,8 +4,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | |||
4 | 4 | ||
5 | SRC_URI += "file://b4860-hard_irq_disable-bug.patch \ | 5 | SRC_URI += "file://b4860-hard_irq_disable-bug.patch \ |
6 | file://0001-sdhci-fix-Timeout-error-messages.patch \ | 6 | file://0001-sdhci-fix-Timeout-error-messages.patch \ |
7 | file://powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch \ | ||
8 | file://0001-fsnotify-fix-oops-in-fsnotify_clear_marks_by_group_f.patch \ | ||
9 | " | 7 | " |
10 | 8 | ||
11 | ENEA_KERNEL_FRAGMENTS += "\ | 9 | ENEA_KERNEL_FRAGMENTS += "\ |
diff --git a/recipes-kernel/linux/linux-qoriq_3.12.bbappend b/recipes-kernel/linux/linux-qoriq_3.12.bbappend deleted file mode 100644 index bd21278..0000000 --- a/recipes-kernel/linux/linux-qoriq_3.12.bbappend +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | require recipes-kernel/linux/linux-qoriq-common.inc | ||
2 | SRC_URI += "file://Trusty-SRU-ipc-fix-compat-msgrcv-with-negative-msgtyp.patch \ | ||
3 | " | ||
diff --git a/recipes-kernel/linux/linux-qoriq_4.1.bbappend b/recipes-kernel/linux/linux-qoriq_4.1.bbappend new file mode 100644 index 0000000..f9311e9 --- /dev/null +++ b/recipes-kernel/linux/linux-qoriq_4.1.bbappend | |||
@@ -0,0 +1 @@ | |||
require recipes-kernel/linux/linux-qoriq-common.inc | |||