From: Jan Kiszka <jan.kiszka@siemens.com>
To: Philippe Gerum <rpm@xenomai.org>, Xenomai <xenomai@lists.linux.dev>
Subject: dovetail: lock guards break raw->hard spinlock alternatives
Date: Fri, 8 Dec 2023 16:06:17 +0100 [thread overview]
Message-ID: <b58c34bc-57ff-4651-9976-8b25559b3f47@siemens.com> (raw)
Hi Philippe,
as can be seen in our CI [1], there is a nasty problem coming with a
broader usage of the new cleanup infrastructure for spinlocks.
Statements like
guard(raw_spinlock_irqsave)(&some_lock);
will break because guard will select the raw_spinlock_irqsave version of
DEFINE_LOCK_GUARD_1, even if we provided there a hard_spinlock one a
well and some_lock is of hard_spinlock_t. I don't see a non-intrusive
way towards such guard usage except for also converting all those calls to
guard(hard_spinlock_irqsave)(&some_lock);
The problem is that guard() is not processing that appended
"(&some_lock)" argument directly, thus cannot be extended to take the
type alternatives of the lock into account.
Jan
[1] https://source.denx.de/Xenomai/xenomai/-/jobs/747854#L1309
--
Siemens AG, Technology
Linux Expert Center
reply other threads:[~2023-12-08 15:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=b58c34bc-57ff-4651-9976-8b25559b3f47@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=rpm@xenomai.org \
--cc=xenomai@lists.linux.dev \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).