Re: init_task & Co.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux