From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>, John Kacur <jkacur@redhat.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH RT 2/2] rtmutex: Remove duplicate rt_mutex_init()
Date: Fri, 02 May 2014 15:21:51 +0200 [thread overview]
Message-ID: <53639BEF.60008@linutronix.de> (raw)
In-Reply-To: <20140502091213.3ed4ba7b@gandalf.local.home>
On 05/02/2014 03:12 PM, Steven Rostedt wrote:
>> This does not apply cleanly on v3.14-rt
>
> That's because I sent this out before 3.14-rt was released :-)
Ach right. Sorry, my memory…
>>> --- a/include/linux/rtmutex.h
>>> +++ b/include/linux/rtmutex.h
>>> @@ -62,25 +62,19 @@ struct hrtimer_sleeper;
>>> # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \
>>> , .name = #mutexname, .file = __FILE__, .line = __LINE__
>>>
>>> -# define rt_mutex_init(mutex) \
>>> - do { \
>>> - raw_spin_lock_init(&(mutex)->wait_lock); \
>>> - __rt_mutex_init(mutex, #mutex); \
>>> - } while (0)
>>> -
>>
>> The macro is the same in CONFIG_DEBUG_RT_MUTEXES and the else path.
>> Shouldn't you remove both and define it before the ifdef?
>
> That's exactly what the patch did! Except that it defined it *after* the ifdef.
>
> Here's the patch again (as it was cut in the reply):
>
> --- a/include/linux/rtmutex.h
> +++ b/include/linux/rtmutex.h
> @@ -62,25 +62,19 @@ struct hrtimer_sleeper;
> # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \
> , .name = #mutexname, .file = __FILE__, .line = __LINE__
>
> -# define rt_mutex_init(mutex) \
> - do { \
> - raw_spin_lock_init(&(mutex)->wait_lock); \
> - __rt_mutex_init(mutex, #mutex); \
> - } while (0)
> -
> extern void rt_mutex_debug_task_free(struct task_struct *tsk);
> #else
> # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname)
>
> +# define rt_mutex_debug_task_free(t) do { } while (0)
> +#endif
> +
> # define rt_mutex_init(mutex) \
> do { \
> raw_spin_lock_init(&(mutex)->wait_lock); \
> __rt_mutex_init(mutex, #mutex); \
> } while (0)
>
> -# define rt_mutex_debug_task_free(t) do { } while (0)
> -#endif
> -
> #define __RT_MUTEX_INITIALIZER_PLAIN(mutexname) \
> .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(mutexname.wait_lock) \
> , .wait_list = PLIST_HEAD_INIT(mutexname.wait_list) \
>
> Take special note of the movement of the "#endif".
Ah. That is the trick. So lets try it again…
> -- Steve
Sebastian
prev parent reply other threads:[~2014-05-02 13:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-09 2:47 [PATCH RT 0/2] rwsem-rt: Make rwsem rt closer to mainline Steven Rostedt
2014-04-09 2:47 ` [PATCH RT 1/2] rwsem-rt: Do not allow readers to nest Steven Rostedt
2014-05-02 9:04 ` Sebastian Andrzej Siewior
2015-02-18 19:57 ` Sebastian Andrzej Siewior
2015-02-18 20:13 ` Steven Rostedt
2015-02-20 5:07 ` Jason Low
2015-02-25 12:15 ` Sebastian Andrzej Siewior
2014-04-09 2:47 ` [PATCH RT 2/2] rtmutex: Remove duplicate rt_mutex_init() Steven Rostedt
2014-05-02 9:08 ` Sebastian Andrzej Siewior
2014-05-02 13:12 ` Steven Rostedt
2014-05-02 13:21 ` Sebastian Andrzej Siewior [this message]
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=53639BEF.60008@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=C.Emde@osadl.org \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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