mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Remy Bohmer" <linux@bohmer.net>
To: "Steven Rostedt" <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>, RT <linux-rt-users@vger.kernel.org>
Subject: Re: Compile warning rtmutex code on 2.6.24.7-rt8 (CC:LKML added)
Date: Wed, 21 May 2008 20:35:45 +0200	[thread overview]
Message-ID: <3efb10970805211135k422a0153i28613e74d42d1ed2@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0805201718530.21440@gandalf.stny.rr.com>

Hello Steven,

> Remy,
> Can you see if this helps,

Yes, this helps. Looks a little weird to add bitmasks to pointers, but
I understand why it has been done here.
BTW: I notice that you already has put it in -rt9.

And some other positive news: 2.6.24.7-rt9 compiles and boots
perfectly on ARM at91sam9261. (There are still a few other warnings,
but these are not RT related)

Now I understood your hint in some other mail, and I am going to take
a look at ftrace for ARM. Just for the fun of it...
I hope it is not too intrusive for these ARM cores (old implementation
was...), these Atmel cores are just not that fast as the common X86's.


Kind Regards,

Remy


2008/5/20 Steven Rostedt <rostedt@goodmis.org>:
>
>
> On Tue, 20 May 2008, Remy Bohmer wrote:
>
>> Hello Steven,
>>
>>  Do you recognise these warnings? I do not know (yet) if these are ARM
>>  specific...
>>
>>   CC      kernel/rtmutex.o
>>  kernel/rtmutex.c: In function 'rt_write_fastlock':
>>  kernel/rtmutex.c:1582: warning: initialization makes pointer from
>>  integer without a cast
>>  kernel/rtmutex.c: In function 'rt_write_fasttrylock':
>>  kernel/rtmutex.c:1622: warning: initialization makes pointer from
>>  integer without a cast
>>
>>  If so, do you have a fix for it?
>
> Remy,
>
> Can you see if this helps,
>
> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
>
> ---
>  kernel/rtmutex.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: linux-2.6.24.7-rt9/kernel/rtmutex.c
> ===================================================================
> --- linux-2.6.24.7-rt9.orig/kernel/rtmutex.c    2008-05-20 17:11:29.000000000 -0400
> +++ linux-2.6.24.7-rt9/kernel/rtmutex.c 2008-05-20 17:13:18.000000000 -0400
> @@ -1577,7 +1577,7 @@ rt_write_fastlock(struct rw_mutex *rwm,
>                  void fastcall (*slowfn)(struct rw_mutex *rwm, int mtx),
>                  int mtx)
>  {
> -       unsigned long val = (unsigned long)current | RT_RWLOCK_WRITER;
> +       struct task_struct *val = (void *)((unsigned long)current | RT_RWLOCK_WRITER);
>
>        if (likely(rt_rwlock_cmpxchg(rwm, NULL, val)))
>                rt_mutex_deadlock_account_lock(&rwm->mutex, current);
> @@ -1617,7 +1617,7 @@ static inline int
>  rt_write_fasttrylock(struct rw_mutex *rwm,
>                     int fastcall (*slowfn)(struct rw_mutex *rwm, int mtx), int mtx)
>  {
> -       unsigned long val = (unsigned long)current | RT_RWLOCK_WRITER;
> +       struct task_struct *val = (void *)((unsigned long)current | RT_RWLOCK_WRITER);
>
>        if (likely(rt_rwlock_cmpxchg(rwm, NULL, val))) {
>                rt_mutex_deadlock_account_lock(&rwm->mutex, current);
> @@ -1902,7 +1902,7 @@ rt_write_fastunlock(struct rw_mutex *rwm
>                                            int mtx),
>                    int mtx)
>  {
> -       unsigned long val = (unsigned long)current | RT_RWLOCK_WRITER;
> +       struct task_struct *val = (void *)((unsigned long)current | RT_RWLOCK_WRITER);
>
>        WARN_ON(rt_rwlock_owner(rwm) != current);
>        if (likely(rt_rwlock_cmpxchg(rwm, (struct task_struct *)val, NULL)))
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2008-05-21 18:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-20 20:56 Remy Bohmer
2008-05-20 21:11 ` Steven Rostedt
2008-05-20 21:20 ` Steven Rostedt
2008-05-21 18:35   ` Remy Bohmer [this message]
2008-05-21 19:14     ` Steven Rostedt

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=3efb10970805211135k422a0153i28613e74d42d1ed2@mail.gmail.com \
    --to=linux@bohmer.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.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®