From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Ellerman <mpe@ellerman.id.au>, Thomas Huth <thuth@redhat.com>
Cc: linuxppc dev list <linuxppc-dev@lists.ozlabs.org>
Subject: [PATCH] powerpc: Fix IBM_ARCH_VEC_NRCORES_OFFSET value
Date: Wed, 08 Jun 2016 08:51:01 +1000 [thread overview]
Message-ID: <1465339861.3263.24.camel@kernel.crashing.org> (raw)
Commit 7cc851039d643a2ee7df4d18177150f2c3a484f5
"powerpc/pseries: Add POWER8NVL support to ibm,client-architecture-support call"
introduced a regression by adding fields to the beginning of the
ibm_architecture_vec structure without updating IBM_ARCH_VEC_NRCORES_OFFSET.
This causes the kernel to print a warning at boot and to fail to adjust
the number of cores based on the number of threads before doing the CAS
call to firmware.
This is quite a fragile piece of code sadly, we should try to find a way
to avoid that hard coded offset at some point, but for now this fixes it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index ccd2037..6ee4b72 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -719,7 +719,7 @@ unsigned char ibm_architecture_vec[] = {
* must match by the macro below. Update the definition if
* the structure layout changes.
*/
-#define IBM_ARCH_VEC_NRCORES_OFFSET 125
+#define IBM_ARCH_VEC_NRCORES_OFFSET 133
W(NR_CPUS), /* number of cores supported */
0,
0,
next reply other threads:[~2016-06-07 22:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 22:51 Benjamin Herrenschmidt [this message]
2016-06-08 11:03 ` [PATCH] powerpc: Fix IBM_ARCH_VEC_NRCORES_OFFSET value Thomas Huth
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=1465339861.3263.24.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=thuth@redhat.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).