lkml.org 
[lkml]   [2007]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: kprobes remove fix_riprel #ifdef
Hello Ingo,

Ingo Molnar wrote:
> * Masami Hiramatsu <mhiramat@redhat.com> wrote:
>
>> Hello Harvey,
>>
>> A similar idea was already nack-ed by Ananth.
>> http://sources.redhat.com/ml/systemtap/2007-q4/msg00468.html
>> And I agree his thought.
>>
>> Especially, "riprel" does not exist on x86_32, so fix_riprel()
>> is meaningless on it.
>> Thus, I think it would better be ifdef'd in call-site.
>
> but we regularly do this in generic code: we add calls that are NOPs on
> some architectures. For example flush_cache_page() makes no sense on the
> x86 architecture.

Indeed.
By the way, flush_cache_page() is defined as a do-while(0) on x86.
Would it better to define fix_riprel() as a do-while(0) on x86-32?
I think this obviously indicates that function has no effect.

> So i'm inclined to apply Harvey's cleanup - less
> #ifdef complexity in higher-level code is very much favored, even
> if "riprel" is a NOP concept on 32-bit.

OK, I agree about that fix_riprel() which is ifdef'd twice is too much ifdef'd.
Reducing ifdef is good to me.

Thanks,
>
> Ingo

--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com, masami.hiramatsu.pt@hitachi.com



\
 
 \ /
  Last update: 2007-12-30 15:55    [W:2.100 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site