Skip to content

Commit

Permalink
powerpc/vmlinux.lds: Ensure STRICT_ALIGN_SIZE is at least page aligned
Browse files Browse the repository at this point in the history
[ Upstream commit 331771e ]

Add a check that STRICT_ALIGN_SIZE is aligned to at least PAGE_SIZE.

That then makes the alignment to PAGE_SIZE immediately after the
alignment to STRICT_ALIGN_SIZE redundant, so remove it.

Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Stable-dep-of: 111bcb3 ("powerpc/64s/radix: Fix RWX mapping with relocated kernel")
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
mpe authored and Sasha Levin committed Feb 23, 2023
1 parent 37a560a commit 0e77a4f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/powerpc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@

#define STRICT_ALIGN_SIZE (1 << CONFIG_DATA_SHIFT)

#if STRICT_ALIGN_SIZE < PAGE_SIZE
#error "CONFIG_DATA_SHIFT must be >= PAGE_SHIFT"
#endif

ENTRY(_stext)

PHDRS {
Expand Down Expand Up @@ -209,7 +213,6 @@ SECTIONS
*/
. = ALIGN(STRICT_ALIGN_SIZE);
__init_begin = .;
. = ALIGN(PAGE_SIZE);
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
_sinittext = .;
INIT_TEXT
Expand Down

0 comments on commit 0e77a4f

Please sign in to comment.