From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: "paulmck@kernel.org" <paulmck@kernel.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Andrew Morton <akpm@linux-foundation.org>,
"maple-tree@lists.infradead.org" <maple-tree@lists.infradead.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
Shanker Donthineni <sdonthineni@nvidia.com>
Subject: Re: [PATCH v2 1/2] maple_tree: Disable mas_wr_append() when other readers are possible
Date: Tue, 12 Sep 2023 15:06:27 +0000 [thread overview]
Message-ID: <2a0657bf-2585-4b98-bbdb-dd38502c8555@csgroup.eu> (raw)
In-Reply-To: <3e75add4-4d51-eab9-7029-25660e02b082@csgroup.eu>
Le 12/09/2023 à 16:37, Christophe Leroy a écrit :
>
>
>>
>> Maybe something like this in __setup_irq(), right before the
>> mutex_lock()?
>>
>> WARN_ON_ONCE(irqs_disabled());
>>
>> This will dump the stack trace showing how __setup_irq() is being invoked
>> in early boot on ppc32.
>>
>> Again, given that __setup_irq() invokes mutex_lock(), invoking this
>> function in its current form before interrupts have been enabled is a
>> bad idea.
>>
>
> No trigger of that WARN_ON() I added in __setup_irq() as instructed
> above, still getting (pmac32_defconfig on MAC99 QEMU)
>
> ------------[ cut here ]------------
> Interrupts were enabled early
> WARNING: CPU: 0 PID: 0 at init/main.c:992 start_kernel+0x4d8/0x5c0
> Modules linked in:
> CPU: 0 PID: 0 Comm: swapper Not tainted 6.6.0-rc1-dirty #481
> Hardware name: PowerMac3,1 7400 0xc0209 PowerMac
> NIP: c0a6052c LR: c0a6052c CTR: 00000000
> REGS: c0c4dee0 TRAP: 0700 Not tainted (6.6.0-rc1-dirty)
> MSR: 00029032 <EE,ME,IR,DR,RI> CR: 24000282 XER: 20000000
>
> GPR00: c0a6052c c0c4dfa0 c0b92580 0000001d c0b9d128 00000001 c0b9d148
> 3ffffdff
> GPR08: c0ba80f0 00000000 00000000 3ffffe00 44000282 00000000 00000000
> 0199abfc
> GPR16: 0199b0a4 7fde7fa4 7fc5ac0c 000000bb 41000000 01c690c8 c0b92014
> c09b4bdc
> GPR24: c0c55220 c0ac0000 00000000 efff9109 efff9100 0000000a c0c6d000
> c0b920a0
> NIP [c0a6052c] start_kernel+0x4d8/0x5c0
> LR [c0a6052c] start_kernel+0x4d8/0x5c0
> Call Trace:
> [c0c4dfa0] [c0a6052c] start_kernel+0x4d8/0x5c0 (unreliable)
> [c0c4dff0] [00003540] 0x3540
> Code: 480037b1 48023c05 4bab88ed 90620260 480139e9 4b657ced 7d2000a6
> 71298000 41a20014 3c60c09a 3863b78c 4b5e9ccd <0fe00000> 39200000
> 99380008 7d2000a6
> ---[ end trace 0000000000000000 ]---
>
For what it's worth, the interrupts seems to be enabled by the call to
init_IRQ().
Diging into it that's enabled by the call to __vmalloc_node() in
alloc_vm_stack()
static void *__init alloc_vm_stack(void)
{
return __vmalloc_node(THREAD_SIZE, THREAD_ALIGN, THREADINFO_GFP,
NUMA_NO_NODE, (void *)_RET_IP_);
}
static void __init vmap_irqstack_init(void)
{
int i;
for_each_possible_cpu(i) {
softirq_ctx[i] = alloc_vm_stack();
hardirq_ctx[i] = alloc_vm_stack();
}
}
void __init init_IRQ(void)
{
if (IS_ENABLED(CONFIG_VMAP_STACK))
vmap_irqstack_init();
if (ppc_md.init_IRQ)
ppc_md.init_IRQ();
if (!WARN_ON(!ppc_md.get_irq))
static_call_update(ppc_get_irq, ppc_md.get_irq);
}
Christophe
next prev parent reply other threads:[~2023-09-12 15:06 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-19 0:43 [PATCH v2 0/2] maple_tree: mas_wr_append() fix ups Liam R. Howlett
2023-08-19 0:43 ` [PATCH v2 1/2] maple_tree: Disable mas_wr_append() when other readers are possible Liam R. Howlett
2023-08-29 16:42 ` Geert Uytterhoeven
2023-08-31 5:39 ` Michael Ellerman
2023-08-31 8:25 ` Geert Uytterhoeven
2023-08-31 8:45 ` Peng Zhang
2023-08-31 9:43 ` Geert Uytterhoeven
2023-09-06 15:23 ` Liam R. Howlett
2023-09-06 17:23 ` Paul E. McKenney
2023-09-06 17:29 ` Liam R. Howlett
2023-09-06 18:02 ` Paul E. McKenney
2023-09-11 23:54 ` Liam R. Howlett
2023-09-12 8:14 ` Paul E. McKenney
2023-09-12 8:23 ` Geert Uytterhoeven
2023-09-12 8:30 ` Paul E. McKenney
2023-09-12 8:34 ` Geert Uytterhoeven
2023-09-12 10:00 ` Paul E. McKenney
2023-09-12 13:56 ` Liam R. Howlett
2023-09-12 14:29 ` Liam R. Howlett
2023-09-12 15:08 ` Paul E. McKenney
2023-09-12 15:27 ` Christophe Leroy
2023-09-12 15:49 ` Liam R. Howlett
2023-09-12 15:07 ` Paul E. McKenney
2023-09-12 15:44 ` Liam R. Howlett
2023-09-12 16:49 ` Paul E. McKenney
2023-09-12 17:02 ` Christophe Leroy
2023-09-13 6:33 ` Christophe Leroy
2023-09-12 17:09 ` Christophe Leroy
2023-09-12 17:38 ` Liam R. Howlett
2023-09-13 13:14 ` Geert Uytterhoeven
2023-09-13 13:24 ` Liam R. Howlett
2023-09-13 13:26 ` Geert Uytterhoeven
2023-09-12 14:37 ` Christophe Leroy
2023-09-12 15:06 ` Christophe Leroy [this message]
2023-09-12 14:10 ` Matthew Wilcox
2023-09-12 14:17 ` Liam R. Howlett
2023-09-06 19:06 ` Geert Uytterhoeven
2023-09-11 12:27 ` Linux regression tracking #adding (Thorsten Leemhuis)
2023-10-16 8:29 ` Linux regression tracking #update (Thorsten Leemhuis)
2023-08-30 19:49 ` Andreas Schwab
2023-08-31 5:37 ` Michael Ellerman
2023-08-31 19:01 ` Andreas Schwab
2023-09-12 18:15 ` Andreas Schwab
2023-09-12 19:09 ` Liam R. Howlett
2023-09-12 20:01 ` Andreas Schwab
2023-08-19 0:43 ` [PATCH v2 2/2] maple_tree: Clean up mas_wr_append() Liam R. Howlett
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=2a0657bf-2585-4b98-bbdb-dd38502c8555@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=maple-tree@lists.infradead.org \
--cc=paulmck@kernel.org \
--cc=sdonthineni@nvidia.com \
--cc=stable@vger.kernel.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
all inboxes | Powered by JetHome®