public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: init_task & Co.
Date: Thu, 7 Jun 2007 10:26:22 +0900	[thread overview]
Message-ID: <20070607012622.GA14234@linux-sh.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0706061722390.10383@alien.or.mcafeemobile.com>

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.

      reply	other threads:[~2007-06-07  1:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-07  0:26 init_task & Co Davide Libenzi
2007-06-07  1:26 ` Paul Mundt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070607012622.GA14234@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox