projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[powerpc.git]
/
arch
/
i386
/
kernel
/
head.S
diff --git
a/arch/i386/kernel/head.S
b/arch/i386/kernel/head.S
index
edef508
..
3fa7f93
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
@@
-309,7
+319,7
@@
is386: movl $2,%ecx # set MP
call check_x87
call setup_pda
call check_x87
call setup_pda
- lgdt
cpu
_gdt_descr
+ lgdt
early
_gdt_descr
lidt idt_descr
ljmp $(__KERNEL_CS),$1f
1: movl $(__KERNEL_DS),%eax # reload all the segment registers
lidt idt_descr
ljmp $(__KERNEL_CS),$1f
1: movl $(__KERNEL_DS),%eax # reload all the segment registers
@@
-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,12
+370,12
@@
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
/* slot the PDA address into the GDT */
/* get the PDA pointer */
movl start_pda, %eax
/* slot the PDA address into the GDT */
- mov
cpu
_gdt_descr+2, %ecx
+ mov
early
_gdt_descr+2, %ecx
mov %ax, (__KERNEL_PDA+0+2)(%ecx) /* base & 0x0000ffff */
shr $16, %eax
mov %al, (__KERNEL_PDA+4+0)(%ecx) /* base & 0x00ff0000 */
mov %ax, (__KERNEL_PDA+0+2)(%ecx) /* base & 0x0000ffff */
shr $16, %eax
mov %al, (__KERNEL_PDA+4+0)(%ecx) /* base & 0x00ff0000 */
@@
-492,6
+502,7
@@
ignore_int:
#endif
iret
#endif
iret
+.section .text
#ifdef CONFIG_PARAVIRT
startup_paravirt:
cld
#ifdef CONFIG_PARAVIRT
startup_paravirt:
cld
@@
-502,10
+513,11
@@
startup_paravirt:
pushl %ecx
pushl %eax
pushl %ecx
pushl %eax
- /* paravirt.o is last in link, and that probe fn never returns */
pushl $__start_paravirtprobe
1:
movl 0(%esp), %eax
pushl $__start_paravirtprobe
1:
movl 0(%esp), %eax
+ cmpl $__stop_paravirtprobe, %eax
+ je unhandled_paravirt
pushl (%eax)
movl 8(%esp), %eax
call *(%esp)
pushl (%eax)
movl 8(%esp), %eax
call *(%esp)
@@
-517,6
+529,10
@@
startup_paravirt:
addl $4, (%esp)
jmp 1b
addl $4, (%esp)
jmp 1b
+
+unhandled_paravirt:
+ /* Nothing wanted us: we're screwed. */
+ ud2
#endif
/*
#endif
/*
@@
-581,7
+597,7
@@
idt_descr:
# boot GDT descriptor (later on used by CPU#0):
.word 0 # 32 bit align gdt_desc.address
# boot GDT descriptor (later on used by CPU#0):
.word 0 # 32 bit align gdt_desc.address
-ENTRY(
cpu
_gdt_descr)
+ENTRY(
early
_gdt_descr)
.word GDT_ENTRIES*8-1
.long cpu_gdt_table
.word GDT_ENTRIES*8-1
.long cpu_gdt_table