From: Frederic Weisbecker <frederic@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk,
Guenter Roeck <linux@roeck-us.net>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [RFT PATCH] ARM: vfp: Fix broken softirq handling with instrumentation enabled
Date: Tue, 14 Mar 2023 14:12:54 +0100 [thread overview]
Message-ID: <ZBBy1iBtUMpk5u7E@localhost.localdomain> (raw)
In-Reply-To: <20230314125743.4165575-1-ardb@kernel.org>
Le Tue, Mar 14, 2023 at 01:57:43PM +0100, Ard Biesheuvel a écrit :
> diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
> index 9a89264cdcc0b46e..9555c0a1c46fd47b 100644
> --- a/arch/arm/vfp/entry.S
> +++ b/arch/arm/vfp/entry.S
> @@ -22,7 +22,23 @@
> @ IRQs enabled.
> @
> ENTRY(do_vfp)
> - local_bh_disable r10, r4
> +#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_TRACE_IRQFLAGS)
> + mov r4, r0 @ stash r0, r2, lr
> + mov r5, r2
> + mov r6, lr
> +
> + adr r0, .
> + mov r1, #SOFTIRQ_DISABLE_OFFSET
> + bl __local_bh_disable_ip
> +
> + mov r0, r4 @ restore r0, r2, lr
> + mov r2, r5
> + mov lr, r6
> +#else
> + ldr r4, [r10, #TI_PREEMPT]
> + add r4, r4, #SOFTIRQ_DISABLE_OFFSET
> + str r4, [r10, #TI_PREEMPT]
> +#endi
I suggest you avoid taking any risk and unconditionally call
__local_bh_disable_ip(). You never know what will be added to softirq
APIs in the future.
For example you're missing the CONFIG_DEBUG_PREEMPT part.
Thanks.
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-03-14 13:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 12:57 [RFT PATCH] ARM: vfp: Fix broken softirq handling with instrumentation enabled Ard Biesheuvel
2023-03-14 13:12 ` Frederic Weisbecker [this message]
2023-03-14 13:58 ` Ard Biesheuvel
2023-03-14 16:21 ` Guenter Roeck
2023-03-14 17:36 ` Ard Biesheuvel
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=ZBBy1iBtUMpk5u7E@localhost.localdomain \
--to=frederic@kernel.org \
--cc=ardb@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=linux@roeck-us.net \
--cc=peterz@infradead.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