From: Ralf Baechle <ralf@linux-mips.org>
To: Viller Hsiao <villerhsiao@gmail.com>
Cc: linux-mips@linux-mips.org, rostedt@goodmis.org,
fweisbec@gmail.com, mingo@redhat.com, Qais.Yousef@imgtec.com
Subject: Re: [PATCH v2 1/2] MIPS: ftrace: Tweak safe_load()/safe_store() macros
Date: Mon, 17 Mar 2014 15:56:41 +0100 [thread overview]
Message-ID: <20140317145641.GN19285@linux-mips.org> (raw)
In-Reply-To: <1393055209-28251-2-git-send-email-villerhsiao@gmail.com>
On Sat, Feb 22, 2014 at 03:46:48PM +0800, Viller Hsiao wrote:
> Due to name collision in ftrace safe_load and safe_store macros,
> these macros cannot take expressions as operands.
>
> For example, compiler will complain for a macro call like the following:
> safe_store_code(new_code2, ip + 4, faulted);
>
> arch/mips/include/asm/ftrace.h:61:6: note: in definition of macro 'safe_store'
> : [dst] "r" (dst), [src] "r" (src)\
> ^
> arch/mips/kernel/ftrace.c:118:2: note: in expansion of macro 'safe_store_code'
> safe_store_code(new_code2, ip + 4, faulted);
> ^
> arch/mips/kernel/ftrace.c:118:32: error: undefined named operand 'ip + 4'
> safe_store_code(new_code2, ip + 4, faulted);
> ^
> arch/mips/include/asm/ftrace.h:61:6: note: in definition of macro 'safe_store'
> : [dst] "r" (dst), [src] "r" (src)\
> ^
> arch/mips/kernel/ftrace.c:118:2: note: in expansion of macro 'safe_store_code'
> safe_store_code(new_code2, ip + 4, faulted);
> ^
>
> This patch tweaks variable naming in those macros to allow flexible
> operands.
Interesting catch - and while I think your patch indeed is an improvment
nobody seems to have observed this in a kernel tree, so I'm going to treat
this as a non-urgent improvment and queue it for 3.15.
If this can be triggered in any -stable or v3.14-rc7 tree, please let me
know.
Thanks,
Ralf
next prev parent reply other threads:[~2014-03-17 14:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-22 7:46 [PATCH v2 0/2] MIPS: ftrace: Fix icache flush issue Viller Hsiao
2014-02-22 7:46 ` [PATCH v2 1/2] MIPS: ftrace: Tweak safe_load()/safe_store() macros Viller Hsiao
2014-03-17 14:56 ` Ralf Baechle [this message]
2014-03-18 0:04 ` Viller Hsiao
2014-03-18 7:53 ` Viller Hsiao
2014-03-18 12:04 ` Ralf Baechle
2014-03-19 9:50 ` Tony Wu
2014-03-19 18:42 ` Geert Uytterhoeven
2014-02-22 7:46 ` [PATCH v2 2/2] MIPS: ftrace: Fix icache flush range error Viller Hsiao
2014-02-24 9:27 ` [PATCH v2 0/2] MIPS: ftrace: Fix icache flush issue Qais Yousef
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=20140317145641.GN19285@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=Qais.Yousef@imgtec.com \
--cc=fweisbec@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=villerhsiao@gmail.com \
/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