summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/ptrace.h
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-05-06 16:30:51 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2021-05-17 08:27:16 +0300
commitb09049c516af90d4b6643b5d0d2549cd01539086 (patch)
tree1cc1b07a0f51c1fca6fdf9fea5c3704736eaffc7 /arch/powerpc/include/asm/ptrace.h
parent8af8d72dc58e90dc945ca627b24968400e0f21b6 (diff)
downloadlinux-b09049c516af90d4b6643b5d0d2549cd01539086.tar.xz
powerpc: Only pad struct pt_regs when needed
If neither KUAP nor PPC64 is selected, there is nothing in the second union of struct pt_regs, so the alignment padding is waste of memory. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/d536bbc46094f66b24d3017343be25164f232933.1620307840.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/include/asm/ptrace.h')
-rw-r--r--arch/powerpc/include/asm/ptrace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
index 9c9ab2746168..4fd3a3bd5272 100644
--- a/arch/powerpc/include/asm/ptrace.h
+++ b/arch/powerpc/include/asm/ptrace.h
@@ -47,7 +47,7 @@ struct pt_regs
unsigned long result;
};
};
-
+#if defined(CONFIG_PPC64) || defined(CONFIG_PPC_KUAP)
union {
struct {
#ifdef CONFIG_PPC64
@@ -67,6 +67,7 @@ struct pt_regs
};
unsigned long __pad[4]; /* Maintain 16 byte interrupt stack alignment */
};
+#endif
};
#endif