projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8af8d72
)
powerpc: Only pad struct pt_regs when needed
author
Christophe Leroy
<christophe.leroy@csgroup.eu>
Thu, 6 May 2021 13:30:51 +0000
(13:30 +0000)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Mon, 17 May 2021 05:27:16 +0000
(15:27 +1000)
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
arch/powerpc/include/asm/ptrace.h
patch
|
blob
|
history
diff --git
a/arch/powerpc/include/asm/ptrace.h
b/arch/powerpc/include/asm/ptrace.h
index 9c9ab27461683bbfa904fbabc06d775a56078df0..4fd3a3bd52721b4db1df36d04b1d52e057a3b919 100644
(file)
--- 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