aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/head_64.S
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-01-30 07:33:06 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:06 -0500
commit076f9776f5d8d131b36955db8641aba3893c2c1b (patch)
treeb85e705ecfe34400c6e1188fb470572956a232ab /arch/x86/kernel/head_64.S
parent8866cd9dc9d0bbadcf361a14e0cdfecb66473087 (diff)
x86: make early printk selectable on 64-bit as well
Enable CONFIG_EMBEDDED to select CONFIG_EARLY_PRINTK on 64-bit as well. saves ~2K: text data bss dec hex filename 7290283 3672091 1907848 12870222 c4624e vmlinux.before 7288373 3671795 1907848 12868016 c459b0 vmlinux.after Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/head_64.S')
-rw-r--r--arch/x86/kernel/head_64.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index 8b4c35cb519a..1d5a7a361200 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -267,6 +267,7 @@ init_rsp:
267bad_address: 267bad_address:
268 jmp bad_address 268 jmp bad_address
269 269
270#ifdef CONFIG_EARLY_PRINTK
270.macro early_idt_tramp first, last 271.macro early_idt_tramp first, last
271 .ifgt \last-\first 272 .ifgt \last-\first
272 early_idt_tramp \first, \last-1 273 early_idt_tramp \first, \last-1
@@ -281,8 +282,10 @@ early_idt_handlers:
281 early_idt_tramp 64, 127 282 early_idt_tramp 64, 127
282 early_idt_tramp 128, 191 283 early_idt_tramp 128, 191
283 early_idt_tramp 192, 255 284 early_idt_tramp 192, 255
285#endif
284 286
285ENTRY(early_idt_handler) 287ENTRY(early_idt_handler)
288#ifdef CONFIG_EARLY_PRINTK
286 cmpl $2,early_recursion_flag(%rip) 289 cmpl $2,early_recursion_flag(%rip)
287 jz 1f 290 jz 1f
288 incl early_recursion_flag(%rip) 291 incl early_recursion_flag(%rip)
@@ -311,8 +314,11 @@ ENTRY(early_idt_handler)
311 movq 8(%rsp),%rsi # get rip again 314 movq 8(%rsp),%rsi # get rip again
312 call __print_symbol 315 call __print_symbol
313#endif 316#endif
317#endif /* EARLY_PRINTK */
3141: hlt 3181: hlt
315 jmp 1b 319 jmp 1b
320
321#ifdef CONFIG_EARLY_PRINTK
316early_recursion_flag: 322early_recursion_flag:
317 .long 0 323 .long 0
318 324
@@ -320,6 +326,7 @@ early_idt_msg:
320 .asciz "PANIC: early exception %02lx rip %lx:%lx error %lx cr2 %lx\n" 326 .asciz "PANIC: early exception %02lx rip %lx:%lx error %lx cr2 %lx\n"
321early_idt_ripmsg: 327early_idt_ripmsg:
322 .asciz "RIP %s\n" 328 .asciz "RIP %s\n"
329#endif /* CONFIG_EARLY_PRINTK */
323 330
324.balign PAGE_SIZE 331.balign PAGE_SIZE
325 332