Re: [PATCH] x86: remove __phys_reloc_hide

From: Ingo Molnar
Date: Mon Aug 09 2010 - 04:08:10 EST



* Namhyung Kim <namhyung@xxxxxxxxx> wrote:

> remove unnecessary use of RELOC_HIDE(). It only does simple addition of ptr
> and offset, and in this case, offset 0, does nothing. It does NOT do anything
> with linker relocation things. I could find no reason to use it.
>
> The only user of __phys_reloc_hide() was __pa_symbol() so it can be removed
> safely here.
>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx>
> ---
> arch/x86/include/asm/page.h | 5 ++---
> arch/x86/include/asm/page_32.h | 1 -
> arch/x86/include/asm/page_64_types.h | 1 -
> 3 files changed, 2 insertions(+), 5 deletions(-)

We do this as a general Voodoo barrier against GCC miscompilations.

You are right that it's largely moot by today (and especially so on x86 - i
only remember a single instance of miscompilation that Rusty mentioned few
years ago, and that was on powerpc), but the wrapper is simple enough, so
unless there's some real tangible improvement in the binary output we might as
well keep it.

Peter, what do you think?

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/