From: Cyrill Gorcunov <gorcunov@gmail.com>
To: ak@suse.de, mingo@elte.hu, sam@ravnborg.org, tglx@linutronix.de,
hpa@zytor.com, linux-kernel@vger.kernel.org
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Subject: [patch 2/2] x86: lds - Use THREAD_SIZE instead of numeric constant
Date: Sun, 17 Feb 2008 18:17:18 +0300 [thread overview]
Message-ID: <20080217151925.402628615@gmail.com> (raw)
In-Reply-To: 20080217151716.274134094@gmail.com
[-- Attachment #1: x86-thread-size --]
[-- Type: text/plain, Size: 1331 bytes --]
Though we use PDA for regular task stack but that
is not acceptable for init_task wich is special
one. We still have to allocate init_task's stack
in that manner.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
Ingo, Peter, I can be wrong but take a look please
to x86/lgest/i386_head.S:41
/* Set up the initial stack so we can run C code. */
movl $(init_thread_union+THREAD_SIZE),%esp
if we just eliminate this string from lds scripts - I bet
we get bad situation here. Xen has a similar trick.
And even head_32.S and head_64.S both have
32bits
======
ENTRY(stack_start)
.long init_thread_union+THREAD_SIZE
64bits
======
ENTRY(init_rsp)
.quad init_thread_union+THREAD_SIZE-8
So if we just remove that string from lds file - we will
be screwed up I think ;)
Index: linux-2.6.git/arch/x86/kernel/vmlinux_64.lds.S
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/vmlinux_64.lds.S 2008-02-17 13:56:54.000000000 +0300
+++ linux-2.6.git/arch/x86/kernel/vmlinux_64.lds.S 2008-02-17 14:10:21.000000000 +0300
@@ -129,7 +129,7 @@ SECTIONS
#undef VVIRT_OFFSET
#undef VVIRT
- . = ALIGN(8192); /* init_task */
+ . = ALIGN(THREAD_SIZE); /* init_task */
.data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
*(.data.init_task)
}:data.init
--
next prev parent reply other threads:[~2008-02-17 15:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-17 15:17 [patch 0/2] x86: vmlinux.lds cleanup Cyrill Gorcunov
2008-02-17 15:17 ` [patch 1/2] x86: lds - Use PAGE_SIZE instead of numeric constant Cyrill Gorcunov
2008-02-17 18:57 ` Sam Ravnborg
2008-02-17 19:09 ` Ingo Molnar
2008-02-17 15:17 ` Cyrill Gorcunov [this message]
2008-02-17 18:59 ` [patch 2/2] x86: lds - Use THREAD_SIZE " Sam Ravnborg
2008-02-17 19:08 ` Cyrill Gorcunov
2008-02-17 19:48 ` H. Peter Anvin
2008-02-17 20:06 ` Cyrill Gorcunov
2008-02-17 20:11 ` H. Peter Anvin
2008-02-17 20:15 ` Cyrill Gorcunov
2008-02-18 14:27 ` Andi Kleen
2008-02-17 19:08 ` Ingo Molnar
2008-02-17 19:26 ` Sam Ravnborg
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=20080217151925.402628615@gmail.com \
--to=gorcunov@gmail.com \
--cc=ak@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sam@ravnborg.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.