From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Boqun Feng <boqun.feng@gmail.com>, Ingo Molnar <mingo@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Waiman Long <longman@redhat.com>, Will Deacon <will@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] locking: Detect includes rwlock.h outside of spinlock.h
Date: Thu, 8 Sep 2022 08:37:38 +0200 [thread overview]
Message-ID: <YxmNsnCPSPt1SJcz@linutronix.de> (raw)
In-Reply-To: <YweemHxJx7O8rjBx@linutronix.de>
On 2022-08-25 18:08:59 [+0200], To linux-kernel@vger.kernel.org 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>
> ---
>
> This is to avoid patches like
> https://lkml.kernel.org/r/20220816074816.173227-1-bigeasy@linutronix.de
>
> in the future which is not the first I sent…
polite *ping*
Sebastian
next prev parent reply other threads:[~2022-09-08 6:37 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 [this message]
2022-09-08 6:54 ` Michael S. Tsirkin
2022-09-08 6:57 ` Sebastian Andrzej Siewior
2022-09-08 8:47 ` Peter Zijlstra
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=YxmNsnCPSPt1SJcz@linutronix.de \
--to=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=peterz@infradead.org \
--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®