diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0066-MIPS-Properly-align-the-.data.init_task-section.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0066-MIPS-Properly-align-the-.data.init_task-section.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0066-MIPS-Properly-align-the-.data.init_task-section.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0066-MIPS-Properly-align-the-.data.init_task-section.patch new file mode 100644 index 00000000..c9ab6f8e --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0066-MIPS-Properly-align-the-.data.init_task-section.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 892d35f24ea2801daef7e48e41d8ec4e9bac34e8 Mon Sep 17 00:00:00 2001 | ||
2 | From: David Daney <david.daney@cavium.com> | ||
3 | Date: Thu, 19 Jul 2012 09:11:14 +0200 | ||
4 | Subject: [PATCH 066/109] MIPS: Properly align the .data..init_task section. | ||
5 | |||
6 | commit 7b1c0d26a8e272787f0f9fcc5f3e8531df3b3409 upstream. | ||
7 | |||
8 | Improper alignment can lead to unbootable systems and/or random | ||
9 | crashes. | ||
10 | |||
11 | [ralf@linux-mips.org: This is a lond standing bug since | ||
12 | 6eb10bc9e2deab06630261cd05c4cb1e9a60e980 (kernel.org) rsp. | ||
13 | c422a10917f75fd19fa7fe070aaaa23e384dae6f (lmo) [MIPS: Clean up linker script | ||
14 | using new linker script macros.] so dates back to 2.6.32.] | ||
15 | |||
16 | Signed-off-by: David Daney <david.daney@cavium.com> | ||
17 | Cc: linux-mips@linux-mips.org | ||
18 | Patchwork: https://patchwork.linux-mips.org/patch/3881/ | ||
19 | Signed-off-by: Ralf Baechle <ralf@linux-mips.org> | ||
20 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
21 | --- | ||
22 | arch/mips/include/asm/thread_info.h | 4 ++-- | ||
23 | arch/mips/kernel/vmlinux.lds.S | 3 ++- | ||
24 | 2 files changed, 4 insertions(+), 3 deletions(-) | ||
25 | |||
26 | diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h | ||
27 | index 97f8bf6..adda036 100644 | ||
28 | --- a/arch/mips/include/asm/thread_info.h | ||
29 | +++ b/arch/mips/include/asm/thread_info.h | ||
30 | @@ -60,6 +60,8 @@ struct thread_info { | ||
31 | register struct thread_info *__current_thread_info __asm__("$28"); | ||
32 | #define current_thread_info() __current_thread_info | ||
33 | |||
34 | +#endif /* !__ASSEMBLY__ */ | ||
35 | + | ||
36 | /* thread information allocation */ | ||
37 | #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_32BIT) | ||
38 | #define THREAD_SIZE_ORDER (1) | ||
39 | @@ -97,8 +99,6 @@ register struct thread_info *__current_thread_info __asm__("$28"); | ||
40 | |||
41 | #define free_thread_info(info) kfree(info) | ||
42 | |||
43 | -#endif /* !__ASSEMBLY__ */ | ||
44 | - | ||
45 | #define PREEMPT_ACTIVE 0x10000000 | ||
46 | |||
47 | /* | ||
48 | diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S | ||
49 | index a81176f..be281c6 100644 | ||
50 | --- a/arch/mips/kernel/vmlinux.lds.S | ||
51 | +++ b/arch/mips/kernel/vmlinux.lds.S | ||
52 | @@ -1,5 +1,6 @@ | ||
53 | #include <asm/asm-offsets.h> | ||
54 | #include <asm/page.h> | ||
55 | +#include <asm/thread_info.h> | ||
56 | #include <asm-generic/vmlinux.lds.h> | ||
57 | |||
58 | #undef mips | ||
59 | @@ -73,7 +74,7 @@ SECTIONS | ||
60 | .data : { /* Data */ | ||
61 | . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ | ||
62 | |||
63 | - INIT_TASK_DATA(PAGE_SIZE) | ||
64 | + INIT_TASK_DATA(THREAD_SIZE) | ||
65 | NOSAVE_DATA | ||
66 | CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) | ||
67 | READ_MOSTLY_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) | ||
68 | -- | ||
69 | 1.7.7.6 | ||
70 | |||