* init_task & Co.
@ 2007-06-07 0:26 Davide Libenzi
2007-06-07 1:26 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Davide Libenzi @ 2007-06-07 0:26 UTC (permalink / raw)
To: Linux Kernel Mailing List
I'm sure there's a good reason behind, but why are those variables
replicated in every architecture?
Those are global variables, defined in global include files, and AFAICS
they could be moved in a single kernel/init_task.c file. No?
- Davide
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: init_task & Co.
2007-06-07 0:26 init_task & Co Davide Libenzi
@ 2007-06-07 1:26 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2007-06-07 1:26 UTC (permalink / raw)
To: Davide Libenzi; +Cc: Linux Kernel Mailing List
On Wed, Jun 06, 2007 at 05:26:49PM -0700, Davide Libenzi wrote:
> I'm sure there's a good reason behind, but why are those variables
> replicated in every architecture?
> Those are global variables, defined in global include files, and AFAICS
> they could be moved in a single kernel/init_task.c file. No?
>
Except they aren't all the same. At the very least, most architectures
don't agree on the linker section, some don't agree on alignment, and
others don't agree on initialization. Most people set the initial stack
from assembly on entry, others do it differently.
Having said that, there likely are some things that could be made
generic, it's basically just init_task and init_thread_union where there
are disagreements. The rest could likely be stashed in
kernel/init_task.c (although you'd have to carefully examine the
alignment for each architecture, particularly the ones that have special
__asm__ labels).
Perhaps having everyone use the same linker section for init_task and
moving that to asm-generic/vmlinux.lds.h is a reasonable first step.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-07 1:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-07 0:26 init_task & Co Davide Libenzi
2007-06-07 1:26 ` Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox