lkml.org 
[lkml]   [2008]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86 (Linux Tiny): configure out support for some processors
Matt Mackall wrote:
> On Mon, 2008-02-11 at 15:01 -0800, H. Peter Anvin wrote:
>> Matt Mackall wrote:
>>> Best would be to have no ifdefs and do it all with linker magic, of
>>> course. But that's trickier.
>>>
>> I concur with this, definitely.
>
> Ok, so let's come up with a plan. We can:
>
> a) use weak symbols, ala cond_syscall
> b) use a special section
> c) use early_init code (is it early enough?)
> c) have some sort of registration list
>
> Having a generic cond_call of some sort might be nice for this sort of
> thing.
>

c) is out, because this has to be executed after the early generic code
and before the late generic code.

b) would be my first choice, and yes, it would be a good thing to have a
generalized mechanism for this. For the registrant, it's pretty easy:
just add a macro that adds a pointer to a named section. We then need a
way to get the base address and length of each such section in order to
be able to execute each function in sequence.

-hpa



\
 
 \ /
  Last update: 2008-02-12 02:05    [W:0.076 / U:2.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site