From: Valentin Schneider <valentin.schneider@arm.com>
To: Ard Biesheuvel <ardb@kernel.org>, linux-kernel@vger.kernel.org
Cc: maz@kernel.org, Ard Biesheuvel <ardb@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] irqchip: gic-v3-its: fix build for !SMP
Date: Mon, 24 Jan 2022 12:39:03 +0000 [thread overview]
Message-ID: <87bl0148bc.mognet@arm.com> (raw)
In-Reply-To: <20220122151614.133766-1-ardb@kernel.org>
On 22/01/22 16:16, Ard Biesheuvel wrote:
> Commit 835f442fdbce ("irqchip/gic-v3-its: Limit memreserve cpuhp state
> lifetime") added a reference to cpus_booted_once_mask, which does not
> exist on !SMP builds, breaking the build for such configurations.
>
> Given the intent of the check, short circuit it to always pass.
>
> Cc: Valentin Schneider <valentin.schneider@arm.com>
> Fixes: 835f442fdbce ("irqchip/gic-v3-its: Limit memreserve cpuhp state lifetime")
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Sorry about that, and thanks for the fix.
This looks fine to me, though one alternative to prevent future
IS_ENABLED() proliferations would be to make cpus_booted_once_mask exist
for !SMP - the online, active, present and possible masks exist for !SMP
already after all.
---
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 407a2568f35e..7487b7061f2c 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -84,9 +84,7 @@ static DEFINE_PER_CPU(struct cpuhp_cpu_state, cpuhp_state) = {
.fail = CPUHP_INVALID,
};
-#ifdef CONFIG_SMP
cpumask_t cpus_booted_once_mask;
-#endif
#if defined(CONFIG_LOCKDEP) && defined(CONFIG_SMP)
static struct lockdep_map cpuhp_state_up_map =
@@ -2662,9 +2660,7 @@ void __init boot_cpu_init(void)
*/
void __init boot_cpu_hotplug_init(void)
{
-#ifdef CONFIG_SMP
cpumask_set_cpu(smp_processor_id(), &cpus_booted_once_mask);
-#endif
this_cpu_write(cpuhp_state.state, CPUHP_ONLINE);
}
prev parent reply other threads:[~2022-01-24 12:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-22 15:16 [PATCH] irqchip: gic-v3-its: fix build for !SMP Ard Biesheuvel
2022-01-22 15:47 ` [irqchip: irq/irqchip-fixes] irqchip/gic-v3-its: Fix " irqchip-bot for Ard Biesheuvel
2022-01-24 12:39 ` Valentin Schneider [this message]
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=87bl0148bc.mognet@arm.com \
--to=valentin.schneider@arm.com \
--cc=ardb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
/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).