From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org, Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [PATCH v3 11/11] powerpc/64: use interrupt restart table to speed up return from interrupt
Date: Wed, 16 Jun 2021 11:20:46 +1000 [thread overview]
Message-ID: <1623806397.npajv1psxa.astroid@bobo.none> (raw)
In-Reply-To: <87bl87tf86.fsf@mpe.ellerman.id.au>
Excerpts from Michael Ellerman's message of June 15, 2021 11:44 pm:
> Nicholas Piggin <npiggin@gmail.com> writes:
>> diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
>> index fe26f2fa0f3f..fbe94e2d5011 100644
>> --- a/arch/powerpc/lib/feature-fixups.c
>> +++ b/arch/powerpc/lib/feature-fixups.c
>> @@ -412,12 +430,19 @@ void do_entry_flush_fixups(enum l1d_flush_type types)
>> stop_machine(__do_entry_flush_fixups, &types, NULL);
>> }
>>
>> -void do_rfi_flush_fixups(enum l1d_flush_type types)
>> +static int __do_rfi_flush_fixups(void *data)
>> {
>> + enum l1d_flush_type types = *(enum l1d_flush_type *)data;
>> unsigned int instrs[3], *dest;
>> long *start, *end;
>> int i;
>>
>> + if (types & L1D_FLUSH_FALLBACK)
>> + rfi_exit_not_reentrant = true;
>> + else
>> + rfi_exit_not_reentrant = false;
>> + update_interrupt_exit();
>
> This is not happy:
Ah, needs a static_key_enable_cpuslocked. I'll fix.
Thanks,
Nick
>
> [ 0.000000][ T0] ============================================
> [ 0.000000][ T0] WARNING: possible recursive locking detected
> [ 0.000000][ T0] 5.13.0-rc2-00118-gca433a3a44e3 #1 Not tainted
> [ 0.000000][ T0] --------------------------------------------
> [ 0.000000][ T0] swapper/0 is trying to acquire lock:
> [ 0.000000][ T0] c00000000252fa10 (cpu_hotplug_lock){....}-{0:0}, at: static_key_enable+0x24/0x50
> [ 0.000000][ T0]
> [ 0.000000][ T0] but task is already holding lock:
> [ 0.000000][ T0] c00000000252fa10 (cpu_hotplug_lock){....}-{0:0}, at: stop_machine+0x2c/0x60
> [ 0.000000][ T0]
> [ 0.000000][ T0] other info that might help us debug this:
> [ 0.000000][ T0] Possible unsafe locking scenario:
> [ 0.000000][ T0]
> [ 0.000000][ T0] CPU0
> [ 0.000000][ T0] ----
> [ 0.000000][ T0] lock(cpu_hotplug_lock);
> [ 0.000000][ T0] lock(cpu_hotplug_lock);
> [ 0.000000][ T0]
> [ 0.000000][ T0] *** DEADLOCK ***
> [ 0.000000][ T0]
> [ 0.000000][ T0] May be due to missing lock nesting notation
> [ 0.000000][ T0]
> [ 0.000000][ T0] 1 lock held by swapper/0:
> [ 0.000000][ T0] #0: c00000000252fa10 (cpu_hotplug_lock){....}-{0:0}, at: stop_machine+0x2c/0x60
> [ 0.000000][ T0]
> [ 0.000000][ T0] stack backtrace:
> [ 0.000000][ T0] CPU: 0 PID: 0 Comm: swapper Not tainted 5.13.0-rc2-00118-gca433a3a44e3 #1
> [ 0.000000][ T0] Call Trace:
> [ 0.000000][ T0] [c0000000027db8f0] [c00000000093dd28] dump_stack+0xec/0x144 (unreliable)
> [ 0.000000][ T0] [c0000000027db940] [c0000000001ed5b4] __lock_acquire+0x1744/0x28b0
> [ 0.000000][ T0] [c0000000027dba70] [c0000000001ef338] lock_acquire+0x128/0x600
> [ 0.000000][ T0] [c0000000027dbb70] [c00000000015035c] cpus_read_lock+0x4c/0x170
> [ 0.000000][ T0] [c0000000027dbba0] [c0000000003c2594] static_key_enable+0x24/0x50
> [ 0.000000][ T0] [c0000000027dbbd0] [c0000000000ae87c] __do_rfi_flush_fixups+0x7c/0x300
> [ 0.000000][ T0] [c0000000027dbc80] [c0000000002ab7e4] stop_machine_cpuslocked+0xe4/0x200
> [ 0.000000][ T0] [c0000000027dbcf0] [c0000000002ab940] stop_machine+0x40/0x60
> [ 0.000000][ T0] [c0000000027dbd30] [c0000000000aef30] do_rfi_flush_fixups+0x30/0x50
> [ 0.000000][ T0] [c0000000027dbd60] [c000000000040890] setup_rfi_flush+0xa0/0x140
> [ 0.000000][ T0] [c0000000027dbdd0] [c00000000201c6c4] pnv_setup_arch+0x304/0x4ac
> [ 0.000000][ T0] [c0000000027dbe60] [c00000000200a31c] setup_arch+0x374/0x3c4
> [ 0.000000][ T0] [c0000000027dbee0] [c000000002003d08] start_kernel+0xb0/0x790
> [ 0.000000][ T0] [c0000000027dbf90] [c00000000000d79c] start_here_common+0x1c/0x600
> [ 0.000000][ T0] rfi-flush: patched 12 locations (fallback displacement flush)
>
>
> cheers
>
next prev parent reply other threads:[~2021-06-16 1:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 13:09 [PATCH v3 00/11] powerpc/64: fast interrupt exits Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 01/11] powerpc: remove interrupt exit helpers unused argument Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 02/11] powerpc/64s: introduce different functions to return from SRR vs HSRR interrupts Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 03/11] powerpc/64s: avoid reloading (H)SRR registers if they are still valid Nicholas Piggin
2021-06-15 13:39 ` Michael Ellerman
2021-06-10 13:09 ` [PATCH v3 04/11] powerpc/64: handle MSR EE and RI in interrupt entry wrapper Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 05/11] powerpc/64: move interrupt return asm to interrupt_64.S Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 06/11] powerpc/64s: system call avoid setting MSR[RI] until we set MSR[EE] Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 07/11] powerpc/64s: save one more register in the masked interrupt handler Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 08/11] powerpc/64: allow alternate return locations for soft-masked interrupts Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 09/11] powerpc/64: interrupt soft-enable race fix Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 10/11] powerpc/64: treat low kernel text as irqs soft-masked Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 11/11] powerpc/64: use interrupt restart table to speed up return from interrupt Nicholas Piggin
2021-06-15 13:44 ` Michael Ellerman
2021-06-16 1:20 ` Nicholas Piggin [this message]
2021-06-15 14:07 ` [PATCH v3 00/11] powerpc/64: fast interrupt exits Michael Ellerman
2021-06-16 1:25 ` Nicholas Piggin
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=1623806397.npajv1psxa.astroid@bobo.none \
--to=npiggin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.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).