On arm64 compat uses a 16k legacy alignment for shmat rather than the page size. Only set it when in compat32.
Signed-off-by: Teo Couprie Diaz teo.coupriediaz@arm.com --- arch/arm64/include/asm/shmparam.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/arm64/include/asm/shmparam.h b/arch/arm64/include/asm/shmparam.h index f920e22ec677..804de90c7931 100644 --- a/arch/arm64/include/asm/shmparam.h +++ b/arch/arm64/include/asm/shmparam.h @@ -10,7 +10,9 @@ * alignment value. Since we don't have aliasing D-caches, the rest of * the time we can safely use PAGE_SIZE. */ +#ifdef CONFIG_COMPAT32 #define COMPAT_SHMLBA (4 * PAGE_SIZE) +#endif
#include <asm-generic/shmparam.h>
On 27/09/2022 12:54, Teo Couprie Diaz wrote:
On arm64 compat uses
That's rather confusing because we precisely have two "compats" now, maybe simply say it's specific to AArch32?
a 16k legacy alignment for shmat rather than the page size. Only set it when in compat32.
Signed-off-by: Teo Couprie Diaz teo.coupriediaz@arm.com
arch/arm64/include/asm/shmparam.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/arm64/include/asm/shmparam.h b/arch/arm64/include/asm/shmparam.h index f920e22ec677..804de90c7931 100644 --- a/arch/arm64/include/asm/shmparam.h +++ b/arch/arm64/include/asm/shmparam.h @@ -10,7 +10,9 @@
- alignment value. Since we don't have aliasing D-caches, the rest of
- the time we can safely use PAGE_SIZE.
*/ +#ifdef CONFIG_COMPAT32
Let's move the comment inside the #ifdef too, to make it clear it's only relevant in compat32.
Kevin
#define COMPAT_SHMLBA (4 * PAGE_SIZE) +#endif #include <asm-generic/shmparam.h>
On 9/28/22 09:59, Kevin Brodsky wrote:
On 27/09/2022 12:54, Teo Couprie Diaz wrote:
On arm64 compat uses
That's rather confusing because we precisely have two "compats" now, maybe simply say it's specific to AArch32?
You're right, it would be much clearer to explain that it's specific to AArch32.
a 16k legacy alignment for shmat rather than the page size. Only set it when in compat32.
Signed-off-by: Teo Couprie Diaz teo.coupriediaz@arm.com
arch/arm64/include/asm/shmparam.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/arm64/include/asm/shmparam.h b/arch/arm64/include/asm/shmparam.h index f920e22ec677..804de90c7931 100644 --- a/arch/arm64/include/asm/shmparam.h +++ b/arch/arm64/include/asm/shmparam.h @@ -10,7 +10,9 @@ * alignment value. Since we don't have aliasing D-caches, the rest of * the time we can safely use PAGE_SIZE. */ +#ifdef CONFIG_COMPAT32
Let's move the comment inside the #ifdef too, to make it clear it's only relevant in compat32.
Sure, that does make sense.
Kevin
#define COMPAT_SHMLBA (4 * PAGE_SIZE) +#endif #include <asm-generic/shmparam.h>
Thanks Kevin ! Téo
linux-morello@op-lists.linaro.org