git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] i386: move startup_32() in text.head section
[pandora-kernel.git]
/
arch
/
i386
/
kernel
/
head.S
diff --git
a/arch/i386/kernel/head.S
b/arch/i386/kernel/head.S
index
edef508
..
734be55
100644
(file)
--- a/
arch/i386/kernel/head.S
+++ b/
arch/i386/kernel/head.S
@@
-53,6
+53,7
@@
* any particular GDT layout, because we load our own as soon as we
* can.
*/
* any particular GDT layout, because we load our own as soon as we
* can.
*/
+.section .text.head,"ax",@progbits
ENTRY(startup_32)
#ifdef CONFIG_PARAVIRT
ENTRY(startup_32)
#ifdef CONFIG_PARAVIRT
@@
-103,7
+104,7
@@
ENTRY(startup_32)
movzwl OLD_CL_OFFSET,%esi
addl $(OLD_CL_BASE_ADDR),%esi
2:
movzwl OLD_CL_OFFSET,%esi
addl $(OLD_CL_BASE_ADDR),%esi
2:
- movl $(
saved
_command_line - __PAGE_OFFSET),%edi
+ movl $(
boot
_command_line - __PAGE_OFFSET),%edi
movl $(COMMAND_LINE_SIZE/4),%ecx
rep
movsl
movl $(COMMAND_LINE_SIZE/4),%ecx
rep
movsl
@@
-141,16
+142,25
@@
page_pde_offset = (__PAGE_OFFSET >> 20);
jb 10b
movl %edi,(init_pg_tables_end - __PAGE_OFFSET)
jb 10b
movl %edi,(init_pg_tables_end - __PAGE_OFFSET)
-#ifdef CONFIG_SMP
xorl %ebx,%ebx /* This is the boot CPU (BSP) */
jmp 3f
xorl %ebx,%ebx /* This is the boot CPU (BSP) */
jmp 3f
-
/*
* Non-boot CPU entry point; entered from trampoline.S
* We can't lgdt here, because lgdt itself uses a data segment, but
* we know the trampoline has already loaded the boot_gdt_table GDT
* for us.
/*
* Non-boot CPU entry point; entered from trampoline.S
* We can't lgdt here, because lgdt itself uses a data segment, but
* we know the trampoline has already loaded the boot_gdt_table GDT
* for us.
+ *
+ * If cpu hotplug is not supported then this code can go in init section
+ * which will be freed later
*/
*/
+
+#ifdef CONFIG_HOTPLUG_CPU
+.section .text,"ax",@progbits
+#else
+.section .init.text,"ax",@progbits
+#endif
+
+#ifdef CONFIG_SMP
ENTRY(startup_32_smp)
cld
movl $(__BOOT_DS),%eax
ENTRY(startup_32_smp)
cld
movl $(__BOOT_DS),%eax
@@
-208,8
+218,8
@@
ENTRY(startup_32_smp)
xorl %ebx,%ebx
incl %ebx
xorl %ebx,%ebx
incl %ebx
-3:
#endif /* CONFIG_SMP */
#endif /* CONFIG_SMP */
+3:
/*
* Enable paging
/*
* Enable paging
@@
-319,12
+329,12
@@
is386: movl $2,%ecx # set MP
movl %eax,%ds
movl %eax,%es
movl %eax,%ds
movl %eax,%es
- xorl %eax,%eax # Clear
F
S and LDT
- movl %eax,%
f
s
+ xorl %eax,%eax # Clear
G
S and LDT
+ movl %eax,%
g
s
lldt %ax
movl $(__KERNEL_PDA),%eax
lldt %ax
movl $(__KERNEL_PDA),%eax
- mov %eax,%
g
s
+ mov %eax,%
f
s
cld # gcc2 wants the direction flag cleared at all times
pushl $0 # fake return address for unwinder
cld # gcc2 wants the direction flag cleared at all times
pushl $0 # fake return address for unwinder
@@
-360,7
+370,7
@@
check_x87:
* cpu_gdt_table and boot_pda; for secondary CPUs, these will be
* that CPU's GDT and PDA.
*/
* cpu_gdt_table and boot_pda; for secondary CPUs, these will be
* that CPU's GDT and PDA.
*/
-setup_pda:
+ENTRY(setup_pda)
/* get the PDA pointer */
movl start_pda, %eax
/* get the PDA pointer */
movl start_pda, %eax
@@
-492,6
+502,7
@@
ignore_int:
#endif
iret
#endif
iret
+.section .text
#ifdef CONFIG_PARAVIRT
startup_paravirt:
cld
#ifdef CONFIG_PARAVIRT
startup_paravirt:
cld