[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1353105926.7586.30.camel@gandalf.local.home>
Date: Fri, 16 Nov 2012 17:45:26 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Alexander Duyck <alexander.h.duyck@...el.com>, tglx@...utronix.de,
mingo@...hat.com, andi@...stfloor.org,
Frederic Weisbecker <fweisbec@...il.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 6/8] x86/ftrace: Use __pa_symbol instead of __pa on C
visible symbols
On Fri, 2012-11-16 at 14:25 -0800, H. Peter Anvin wrote:
> It is a performance improvement.
>
> >> * kernel identity mapping to modify code.
> >> */
> >> if (within(ip, (unsigned long)_text, (unsigned long)_etext))
> >> - ip = (unsigned long)__va(__pa(ip));
> >> + ip = (unsigned long)__va(__pa_symbol(ip));
> >>
> >> return probe_kernel_write((void *)ip, new_code, MCOUNT_INSN_SIZE);
> >> }
> >> @@ -279,7 +279,7 @@ static int ftrace_write(unsigned long ip, const
> >char *val, int size)
> >> * kernel identity mapping to modify code.
> >> */
> >> if (within(ip, (unsigned long)_text, (unsigned long)_etext))
> >> - ip = (unsigned long)__va(__pa(ip));
> >> + ip = (unsigned long)__va(__pa_symbol(ip));
> >>
> >> return probe_kernel_write((void *)ip, val, size);
> >> }
>
#define __pa(x) __phys_addr((unsigned long)(x))
#define __pa_symbol(x) __pa(__phys_reloc_hide((unsigned long)(x)))
I'm confused. __pa_symbol() just calls __pa() with some macro magic to
its parameter. How is this a performance improvement?
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists