From: Ard Biesheuvel <ardb@kernel.org>
To: linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk
Cc: Ard Biesheuvel <ardb@kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Guenter Roeck <linux@roeck-us.net>,
Peter Zijlstra <peterz@infradead.org>,
Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH v2 0/3] ARM: vfp: Switch to C API to en/disable softirqs
Date: Tue, 14 Mar 2023 20:27:53 +0100 [thread overview]
Message-ID: <20230314192756.217966-1-ardb@kernel.org> (raw)
As it turns out, enabling or disabling softirqs from asm code is more
tricky than it looks. Simply bumping the associated bit in preempt_count
does the trick for uninstrumented kernels, but with lockdep or preempt
debug enabled, we really need to call the C versions, as replicating
their behavior in asm fully is intractible.
So let's rework the existing code a little bit so we can interpose a
little C helper 'vfp_entry()' that disables softirqs before calling the
existing vfpstate handling code in asm. Re-enabling softirqs from asm
code is more straight-forward, as we can simply perform a tail call via
a C routine that is guaranteed to be callable as a function.
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/all/ZBBYCSZUJOWBg1s8@localhost.localdomain/
Ard Biesheuvel (3):
ARM: vfp: Pass thread_info pointer to vfp_support_entry
ARM: vfp: Pass successful return address via register R3
ARM: vfp: Fix broken softirq handling with instrumentation enabled
arch/arm/include/asm/assembler.h | 13 ---------
arch/arm/vfp/entry.S | 17 ++---------
arch/arm/vfp/vfphw.S | 30 +++++++++++---------
arch/arm/vfp/vfpmodule.c | 27 ++++++++++++++----
4 files changed, 42 insertions(+), 45 deletions(-)
--
2.39.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2023-03-14 19:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 19:27 Ard Biesheuvel [this message]
2023-03-14 19:27 ` [PATCH v2 1/3] ARM: vfp: Pass thread_info pointer to vfp_support_entry Ard Biesheuvel
2023-03-14 20:22 ` Linus Walleij
2023-03-14 19:27 ` [PATCH v2 2/3] ARM: vfp: Pass successful return address via register R3 Ard Biesheuvel
2023-03-14 20:25 ` Linus Walleij
2023-03-14 19:27 ` [PATCH v2 3/3] ARM: vfp: Fix broken softirq handling with instrumentation enabled Ard Biesheuvel
2023-03-14 20:46 ` Linus Walleij
2023-03-14 21:45 ` Peter Zijlstra
2023-03-14 22:25 ` Ard Biesheuvel
2023-03-16 8:02 ` Ard Biesheuvel
2023-03-14 22:34 ` [PATCH v2 0/3] ARM: vfp: Switch to C API to en/disable softirqs Guenter Roeck
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=20230314192756.217966-1-ardb@kernel.org \
--to=ardb@kernel.org \
--cc=frederic@kernel.org \
--cc=linus.walleij@linaro.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;
as well as URLs for NNTP newsgroup(s).