Re: [PATCH 1/3] x86: record relocation offset
From: H. Peter Anvin
Date: Wed Dec 30 2009 - 14:50:51 EST
On 12/30/2009 05:15 AM, Arnaldo Carvalho de Melo wrote:
>
> I'm no expert on the intricacies of boot_params, but all the other hunks
> seems sensible, but can't we provide a non-perf specific way of getting
> the relocate_offset? I guess other tools would also love to have it.
>
> What about systemtap, don't they solve this in some other way? Frank?
>
I at one point proposed that boot_params should be exported in toto via
sysfs. This got rather brutally shut down as "it's just a debugging
feature" and got moved to debugfs (/debug/boot_params/data). However,
the entire boot_params structure is available there.
Regardless of the reporting method, the patch passing this in by
modifying the early assembly code, though, is more than a little
pointless. The kernel already knows where it is loaded -- obviously, by
sheer necessity -- and knows how it was itself configured, and as such
we can do this calculation in C code without modifying boot_params or
the early bootstrap.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
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/