summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0066-MIPS-Properly-align-the-.data.init_task-section.patch
diff options
context:
space:
mode:
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.patch70
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 @@
1From 892d35f24ea2801daef7e48e41d8ec4e9bac34e8 Mon Sep 17 00:00:00 2001
2From: David Daney <david.daney@cavium.com>
3Date: Thu, 19 Jul 2012 09:11:14 +0200
4Subject: [PATCH 066/109] MIPS: Properly align the .data..init_task section.
5
6commit 7b1c0d26a8e272787f0f9fcc5f3e8531df3b3409 upstream.
7
8Improper alignment can lead to unbootable systems and/or random
9crashes.
10
11[ralf@linux-mips.org: This is a lond standing bug since
126eb10bc9e2deab06630261cd05c4cb1e9a60e980 (kernel.org) rsp.
13c422a10917f75fd19fa7fe070aaaa23e384dae6f (lmo) [MIPS: Clean up linker script
14using new linker script macros.] so dates back to 2.6.32.]
15
16Signed-off-by: David Daney <david.daney@cavium.com>
17Cc: linux-mips@linux-mips.org
18Patchwork: https://patchwork.linux-mips.org/patch/3881/
19Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
20Signed-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
26diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h
27index 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 /*
48diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
49index 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--
691.7.7.6
70