diff mbox series

[3/8] parisc: Specify alignments for .PARISC.unwind and .data..lock_aligned

Message ID 20231124144158.158993-7-deller@kernel.org (mailing list archive)
State Accepted, archived
Headers show
Series parisc patch queue | expand

Commit Message

Helge Deller Nov. 24, 2023, 2:41 p.m. UTC
From: Helge Deller <deller@gmx.de>

Make sure the unwind section will be 32-bit aligned.

Explicitely mark the .data..lock_aligned explicitely 16-byte aligned
in vmlinux.lds.S although the previous ALIGN(16) statement already
does it right.

Add __aligned(16) to __lock_aligned define to ensure that such
variables will have an alignment of 16 in the sections of the object
files.

Signed-off-by: Helge Deller <deller@gmx.de>
---
 arch/parisc/include/asm/ldcw.h   | 2 +-
 arch/parisc/kernel/vmlinux.lds.S | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/arch/parisc/include/asm/ldcw.h b/arch/parisc/include/asm/ldcw.h
index ee9e071859b2..47ebc4c91eaf 100644
--- a/arch/parisc/include/asm/ldcw.h
+++ b/arch/parisc/include/asm/ldcw.h
@@ -55,7 +55,7 @@ 
 })
 
 #ifdef CONFIG_SMP
-# define __lock_aligned __section(".data..lock_aligned")
+# define __lock_aligned __section(".data..lock_aligned") __aligned(16)
 #endif
 
 #endif /* __PARISC_LDCW_H */
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index 58694d1989c2..190e623e3ade 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -130,7 +130,7 @@  SECTIONS
 	RO_DATA(8)
 
 	/* unwind info */
-	.PARISC.unwind : {
+	.PARISC.unwind ALIGN(4) : {
 		__start___unwind = .;
 		*(.PARISC.unwind)
 		__stop___unwind = .;
@@ -149,7 +149,7 @@  SECTIONS
 
 	/* PA-RISC locks requires 16-byte alignment */
 	. = ALIGN(16);
-	.data..lock_aligned : {
+	.data..lock_aligned ALIGN(16) : {
 		*(.data..lock_aligned)
 	}