All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch to make the head.S-must-be-first-in-vmlinux order explicit
@ 2006-02-23 13:19 Arjan van de Ven
  2006-02-23 13:42 ` Andi Kleen
  2006-02-23 15:09 ` Patch to reorder functions in the vmlinux to a defined order Arjan van de Ven
  0 siblings, 2 replies; 60+ messages in thread
From: Arjan van de Ven @ 2006-02-23 13:19 UTC (permalink / raw)
  To: ak, linux-kernel; +Cc: akpm

This patch puts the code from head.S in a special .bootstrap.text
section.

I'm working on a patch to reorder the functions in the kernel (I'll post
that later), but for x86-64 at least the kernel bootstrap requires that the
head.S functions are on the very first page/pages of the kernel text. This
is understandable since the bootstrap is complex enough already and not a
problem at all, it just means they aren't allowed to be reordered. This
patch puts these special functions into a separate section to document this,
and to guarantee this in the light of possibly reordering the rest later.

(So this patch doesn't fix a bug per se, but makes things more robust by
making the order of these functions explicit)

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
 arch/x86_64/kernel/head.S        |    1 +
 arch/x86_64/kernel/vmlinux.lds.S |    1 +
 2 files changed, 2 insertions(+)

Index: linux-2.6.16-reorder/arch/x86_64/kernel/head.S
===================================================================
--- linux-2.6.16-reorder.orig/arch/x86_64/kernel/head.S
+++ linux-2.6.16-reorder/arch/x86_64/kernel/head.S
@@ -26,6 +26,7 @@
  */
 
 	.text
+	.section .bootstrap.text
 	.code32
 	.globl startup_32
 /* %bx:	 1 if coming from smp trampoline on secondary cpu */ 
Index: linux-2.6.16-reorder/arch/x86_64/kernel/vmlinux.lds.S
===================================================================
--- linux-2.6.16-reorder.orig/arch/x86_64/kernel/vmlinux.lds.S
+++ linux-2.6.16-reorder/arch/x86_64/kernel/vmlinux.lds.S
@@ -20,6 +20,7 @@ SECTIONS
   phys_startup_64 = startup_64 - LOAD_OFFSET;
   _text = .;			/* Text and read-only data */
   .text :  AT(ADDR(.text) - LOAD_OFFSET) {
+	*(.bootstrap.text)
 	*(.text)
 	SCHED_TEXT
 	LOCK_TEXT


^ permalink raw reply	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2006-03-07 23:36 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-23 13:19 Patch to make the head.S-must-be-first-in-vmlinux order explicit Arjan van de Ven
2006-02-23 13:42 ` Andi Kleen
2006-02-23 13:57   ` Arjan van de Ven
2006-02-23 14:14     ` Andi Kleen
2006-02-23 14:40       ` Arjan van de Ven
2006-02-24 13:49       ` Eric W. Biederman
2006-02-24 13:53         ` Arjan van de Ven
2006-02-24 14:17           ` Eric W. Biederman
2006-02-24 14:32           ` Andi Kleen
2006-02-23 15:09 ` Patch to reorder functions in the vmlinux to a defined order Arjan van de Ven
2006-02-23 16:00   ` Andi Kleen
2006-02-23 16:02     ` Arjan van de Ven
2006-02-23 16:43     ` Arjan van de Ven
2006-02-23 16:48       ` Andi Kleen
2006-02-23 16:49         ` Arjan van de Ven
2006-02-23 17:08       ` Linus Torvalds
2006-02-23 17:20         ` Andi Kleen
2006-02-23 17:34           ` Alan Cox
2006-02-23 18:13             ` Andi Kleen
2006-02-23 17:44           ` Linus Torvalds
2006-02-23 18:14             ` Andi Kleen
2006-02-23 19:03         ` linux-os (Dick Johnson)
2006-02-23 19:32           ` Linus Torvalds
2006-02-24 12:43             ` linux-os (Dick Johnson)
2006-02-23 19:23         ` Rene Herman
2006-02-23 19:31           ` Andi Kleen
2006-02-23 19:34           ` Alan Cox
2006-02-23 19:48             ` Rene Herman
2006-02-23 19:35           ` Linus Torvalds
2006-02-23 19:44             ` Arjan van de Ven
2006-02-23 20:13             ` Rene Herman
2006-02-23 20:26               ` Dave Jones
2006-02-24  2:44                 ` Fernando Luis Vazquez Cao
2006-02-24  2:47                   ` Andi Kleen
2006-02-24 14:44                   ` Theodore Ts'o
2006-02-23 23:19               ` Linus Torvalds
2006-02-23 23:53                 ` Rene Herman
2006-02-24 14:23                   ` Eric W. Biederman
2006-02-24 14:23                   ` Eric W. Biederman
2006-02-24 15:30                     ` Rene Herman
2006-02-24 15:55                       ` Eric W. Biederman
2006-02-24 16:48                         ` Andi Kleen
2006-02-24 20:38                           ` Eric W. Biederman
2006-02-25  2:11                             ` Folkert van Heusden
2006-02-25  8:32                               ` Arjan van de Ven
2006-02-24 17:26                         ` Linus Torvalds
2006-02-24 17:57                           ` Rene Herman
2006-02-24 18:11                             ` Linus Torvalds
2006-03-07 23:36                             ` H. Peter Anvin
2006-02-24 14:11                 ` Eric W. Biederman
2006-02-24  1:38             ` Martin Bligh
2006-02-23 20:07         ` Andy Whitcroft
2006-02-23 16:48   ` Linus Torvalds
2006-02-23 16:54     ` Benjamin LaHaise
2006-02-23 18:01     ` Arjan van de Ven
2006-02-23 16:57   ` linux-os (Dick Johnson)
2006-02-23 17:36   ` Zwane Mwaikambo
2006-02-23 17:59     ` Arjan van de Ven
2006-02-24 22:19   ` Tony Luck
2006-02-24 22:21     ` Arjan van de Ven

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.