From: Peter Zijlstra <peterz@infradead.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Boqun Feng <boqun.feng@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Waiman Long <longman@redhat.com>, Will Deacon <will@kernel.org>
Subject: Re: [PATCH] locking: Detect includes rwlock.h outside of spinlock.h
Date: Thu, 8 Sep 2022 10:47:55 +0200 [thread overview]
Message-ID: <YxmsO8q2/eR0MPJk@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <YweemHxJx7O8rjBx@linutronix.de>
On Thu, Aug 25, 2022 at 06:08:56PM +0200, Sebastian Andrzej Siewior wrote:
> From: Michael S. Tsirkin <mst@redhat.com>
>
> The check for __LINUX_SPINLOCK_H within rwlock.h (and other files)
> detects the direct include of the header file if it is at the very
> beginning of the include section.
> If it is listed later then chances are high that spinlock.h was already
> included (including rwlock.h) and the additional listing of rwlock.h
> will not cause any failure.
>
> On PREEMPT_RT this additional rwlock.h will lead to compile failures
> since it uses a different rwlock implementation.
>
> Add __LINUX_INSIDE_SPINLOCK_H to spinlock.h and check for this instead
> of __LINUX_SPINLOCK_H to detect wrong includes. This will help detect
> direct includes of rwlock.h with without PREEMPT_RT enabled.
>
> [ bigeasy: add remaining __LINUX_SPINLOCK_H user and rewrite
> commit description. ]
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Thanks!
next prev parent reply other threads:[~2022-09-08 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 16:08 Sebastian Andrzej Siewior
2022-09-08 6:37 ` Sebastian Andrzej Siewior
2022-09-08 6:54 ` Michael S. Tsirkin
2022-09-08 6:57 ` Sebastian Andrzej Siewior
2022-09-08 8:47 ` Peter Zijlstra [this message]
2022-09-15 14:23 ` [tip: locking/core] " tip-bot2 for Sebastian Andrzej Siewior
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=YxmsO8q2/eR0MPJk@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bigeasy@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=mst@redhat.com \
--cc=tglx@linutronix.de \
--cc=will@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®