* [PATCH] xtensa: ptrace: Remove zero-length alignment array
@ 2025-02-19 11:48 Thorsten Blum
2025-02-19 17:10 ` Max Filippov
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-02-19 11:48 UTC (permalink / raw)
To: Oleg Nesterov, Chris Zankel, Max Filippov; +Cc: Thorsten Blum, linux-kernel
Use a compiler attribute to align the areg field to 16 bytes instead of
using a zero-length alignment array.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/xtensa/include/asm/ptrace.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/xtensa/include/asm/ptrace.h b/arch/xtensa/include/asm/ptrace.h
index 86c70117371b..4871e5a4d6fb 100644
--- a/arch/xtensa/include/asm/ptrace.h
+++ b/arch/xtensa/include/asm/ptrace.h
@@ -72,13 +72,10 @@ struct pt_regs {
/* Additional configurable registers that are used by the compiler. */
xtregs_opt_t xtregs_opt;
- /* Make sure the areg field is 16 bytes aligned. */
- int align[0] __attribute__ ((aligned(16)));
-
/* current register frame.
* Note: The ESF for kernel exceptions ends after 16 registers!
*/
- unsigned long areg[XCHAL_NUM_AREGS];
+ unsigned long areg[XCHAL_NUM_AREGS] __aligned(16);
};
# define arch_has_single_step() (1)
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-19 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19 11:48 [PATCH] xtensa: ptrace: Remove zero-length alignment array Thorsten Blum
2025-02-19 17:10 ` Max Filippov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox