linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Cc: "npiggin@gmail.com" <npiggin@gmail.com>
Subject: Re: [PATCH 1/2] powerpc/vmlinux.lds: Ensure STRICT_ALIGN_SIZE is at least page aligned
Date: Sat, 17 Sep 2022 16:40:41 +1000	[thread overview]
Message-ID: <87pmfuld06.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <5d88f02c-1d3e-4a5b-9aaf-87eb420df6e2@csgroup.eu>

Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 16/09/2022 à 15:14, Michael Ellerman a écrit :
>> Add a check that STRICT_ALIGN_SIZE is aligned to at least PAGE_SIZE.
>
> This cannot happen, the definitions in arch/powerpc/Kconfig don't allow 
> that.

It can't happen yet :)

There's enough combinations of DATA_SHIFT and PAGE_SIZE that it would be
easy to add a new value for either and miss the implications. So I'd
rather have a check.

>> diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
>> index fe22d940412f..4e56fc0ee42a 100644
>> --- a/arch/powerpc/kernel/vmlinux.lds.S
>> +++ b/arch/powerpc/kernel/vmlinux.lds.S
>> @@ -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_SIZE"
>
> s/PAGE_SIZE/PAGE_SHIFT

Thanks.

cheers

  reply	other threads:[~2022-09-17  6:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 13:14 [PATCH 1/2] powerpc/vmlinux.lds: Ensure STRICT_ALIGN_SIZE is at least page aligned Michael Ellerman
2022-09-16 13:14 ` [PATCH 2/2] powerpc/vmlinux.lds: Add an explicit symbol for the SRWX boundary Michael Ellerman
2022-09-16 13:32 ` [PATCH 1/2] powerpc/vmlinux.lds: Ensure STRICT_ALIGN_SIZE is at least page aligned Christophe Leroy
2022-09-17  6:40   ` Michael Ellerman [this message]
2022-10-04 13:24 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmfuld06.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).