MIPS: Properly align the .data..init_task section.
PATCH 1/1 MIPS: Properly align the .data..init_task section.
From: David Daney <[email protected]>
Improper alignment can lead to unbootable systems and/or random crashes.
Signed-off-by David Daney <[email protected]>
Cc <[email protected]>
--- arch/mips/include/asm/thread_info.h | 4 ++-- arch/mips/kernel/vmlinux.lds.S | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
arch/mips/include/asm/thread_info.h +2 -2
@@ -60,6 +60,8 @@ struct thread_info { registerstruct thread_info *__current_thread_info __asm__("$28" );#define current_thread_info () __current_thread_info +#endif /* !__ASSEMBLY__ */ +/* thread information allocation */ #if defined(CONFIG_PAGE_SIZE_4KB ) && defined(CONFIG_32BIT )#define THREAD_SIZE_ORDER (1)
@@ -85,8 +87,6 @@ register struct thread_info *__current_thread_info __asm__("$28");#define STACK_WARN (THREAD_SIZE / 8) -#endif /* !__ASSEMBLY__ */ -#define PREEMPT_ACTIVE 0x10000000/*
arch/mips/kernel/vmlinux.lds.S +2 -1
@@ -1,5 +1,6 @@ #include <asm/asm-offsets.h> #include <asm/page.h> +#include <asm/thread_info.h> #include <asm-generic/vmlinux.lds.h> #undef mips
@@ -72,7 +73,7 @@ SECTIONS .data : { /* Data */ . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ - INIT_TASK_DATA(PAGE_SIZE) + INIT_TASK_DATA(THREAD_SIZE) NOSAVE_DATA CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) READ_MOSTLY_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
Signature · 1 line
1.7.2.3