linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yury Norov <yury.norov@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the bitmap tree
Date: Tue, 20 Sep 2022 07:49:21 -0700	[thread overview]
Message-ID: <YynS8Z7BLy0/Vu1j@yury-laptop> (raw)
In-Reply-To: <20220920180839.79870ef4@canb.auug.org.au>

On Tue, Sep 20, 2022 at 06:08:39PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the bitmap tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> ld: arch/powerpc/kernel/head_64.o: in function `generic_secondary_common_init':
> (.text+0x545e): undefined reference to `nr_cpu_ids'
> 
> Caused by commit
> 
>   c90c5bd9f2d6 ("lib/cpumask: add FORCE_NR_CPUS config option")
> 
> This build has CONFIG_FORCE_NR_CPUS set but the (assembler) code expects
> nr_cpu_ids to be a variable ...
> 
> I have reverted that commit for today.

Thanks for report, Stephen.

I did PPC build for bitmap-for-next, and it was OK on top of
v6-rc4. On today's -next I can reproduce the failure. It's weird
because the code in trouble was added at 2011 in 768d18ad6d5e6
("powerpc: Don't search for paca in freed memory").

Anyways, the fix is straightforward. I updated the bitmap-for-next
with it, and will send it for review shortly.
--

diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index cf2c08902c05..7cb97881635e 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -400,7 +400,11 @@ generic_secondary_common_init:
 #else
        LOAD_REG_ADDR(r8, paca_ptrs)    /* Load paca_ptrs pointe         */
        ld      r8,0(r8)                /* Get base vaddr of array       */
+#if (NR_CPUS == 1) || defined(CONFIG_FORCE_NR_CPUS)
+       LOAD_REG_IMMEDIATE(r7, NR_CPUS)
+#else
        LOAD_REG_ADDR(r7, nr_cpu_ids)   /* Load nr_cpu_ids address       */
+#endif
        lwz     r7,0(r7)                /* also the max paca allocated   */
        li      r5,0                    /* logical cpu id                */
 1:


  reply	other threads:[~2022-09-20 14:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20  8:08 linux-next: build failure after merge of the bitmap tree Stephen Rothwell
2022-09-20 14:49 ` Yury Norov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-08  6:27 Stephen Rothwell
2024-05-08 13:24 ` Kuan-Wei Chiu
2024-05-08 22:18   ` Yury Norov
2023-10-20  4:49 Stephen Rothwell
2023-10-19  6:01 Stephen Rothwell
2023-10-19 15:58 ` Yury Norov
2023-10-20  4:24   ` Yury Norov
2023-10-20  4:51     ` Stephen Rothwell
2023-10-20 12:33       ` Yury Norov
2023-11-02 11:41         ` Alexander Lobakin
2022-09-26 23:53 broonie
2022-09-27  0:37 ` Yury Norov
2022-09-27 18:56   ` Mark Brown
2022-07-27 10:29 Stephen Rothwell
2022-07-22  9:16 Stephen Rothwell
2022-07-22 19:29 ` Yury Norov
2022-07-15 10:29 Stephen Rothwell
2022-07-08  7:47 Stephen Rothwell
2022-05-02  8:15 Stephen Rothwell
2022-04-19  4:29 Stephen Rothwell

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=YynS8Z7BLy0/Vu1j@yury-laptop \
    --to=yury.norov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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).