From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: [PATCH 1/4] powerpc/64s: Fix stress_hpt memblock alloc alignment
Date: Fri, 16 Dec 2022 21:59:27 +1000 [thread overview]
Message-ID: <20221216115930.2667772-2-npiggin@gmail.com> (raw)
In-Reply-To: <20221216115930.2667772-1-npiggin@gmail.com>
The stress_hpt memblock allocation did not pass in an alignment,
which causes a stack dump in early boot (that I missed, oops).
Fixes: 6b34a099faa1 ("powerpc/64s/hash: add stress_hpt kernel boot option to increase hash faults")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/mm/book3s64/hash_utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/book3s64/hash_utils.c b/arch/powerpc/mm/book3s64/hash_utils.c
index 80a148c57de8..fa1c148e1f50 100644
--- a/arch/powerpc/mm/book3s64/hash_utils.c
+++ b/arch/powerpc/mm/book3s64/hash_utils.c
@@ -1051,7 +1051,8 @@ static void __init htab_initialize(void)
static_branch_enable(&stress_hpt_key);
// Too early to use nr_cpu_ids, so use NR_CPUS
tmp = memblock_phys_alloc_range(sizeof(struct stress_hpt_struct) * NR_CPUS,
- 0, 0, MEMBLOCK_ALLOC_ANYWHERE);
+ __alignof__(struct stress_hpt_struct),
+ 0, MEMBLOCK_ALLOC_ANYWHERE);
memset((void *)tmp, 0xff, sizeof(struct stress_hpt_struct) * NR_CPUS);
stress_hpt_struct = __va(tmp);
--
2.37.2
next prev parent reply other threads:[~2022-12-16 12:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 11:59 [PATCH 0/4] powerpc: Misc early boot fixes Nicholas Piggin
2022-12-16 11:59 ` Nicholas Piggin [this message]
2022-12-16 11:59 ` [PATCH 2/4] powerpc/64: Fix task_cpu in early boot when booting non-zero cpuid Nicholas Piggin
2022-12-16 11:59 ` [PATCH 3/4] powerpc/64: Move paca allocation to early_setup() Nicholas Piggin
2022-12-17 5:10 ` kernel test robot
2022-12-16 11:59 ` [PATCH 4/4] powerpc: Skip stack validation checking alternate stacks if they are not allocated Nicholas Piggin
2023-02-15 12:40 ` [PATCH 0/4] powerpc: Misc early boot fixes 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=20221216115930.2667772-2-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/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).