summaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/asm-offsets.c
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2022-01-07 14:05:11 +0100
committerHelge Deller <deller@gmx.de>2022-01-11 11:57:37 +0100
commitd6ab9fc74513ae6501afcdae2547334a03b9a5c9 (patch)
treef0132160962fd195b75515e5ba0a5ef266085b6c /arch/parisc/kernel/asm-offsets.c
parent6968e707d371ef80511448c6771daf445b4a5cf5 (diff)
downloadlinux-d6ab9fc74513ae6501afcdae2547334a03b9a5c9.tar.bz2
parisc: Enable TOC (transfer of contents) feature unconditionally
Before this patch, the TOC code used a pre-allocated stack of 16kb for each possible CPU. That space overhead was the reason why the TOC feature wasn't enabled by default for 32-bit kernels. This patch rewrites the TOC code to use a per-cpu stack. That way we use much less memory now and as such we enable the TOC feature by default on all kernels. Additionally the dump of the registers and the stacktrace wasn't serialized, which led to multiple CPUs printing the stack backtrace at once which rendered the output unreadable. Now the backtraces are nicely serialized by a lock. Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/asm-offsets.c')
-rw-r--r--arch/parisc/kernel/asm-offsets.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c
index 396aa3b47712..2a83ef36d216 100644
--- a/arch/parisc/kernel/asm-offsets.c
+++ b/arch/parisc/kernel/asm-offsets.c
@@ -36,6 +36,9 @@
int main(void)
{
DEFINE(TASK_TI_FLAGS, offsetof(struct task_struct, thread_info.flags));
+#ifdef CONFIG_SMP
+ DEFINE(TASK_TI_CPU, offsetof(struct task_struct, thread_info.cpu));
+#endif
DEFINE(TASK_STACK, offsetof(struct task_struct, stack));
DEFINE(TASK_PAGEFAULT_DISABLED, offsetof(struct task_struct, pagefault_disabled));
BLANK();