diff options
Diffstat (limited to 'init')
| -rw-r--r-- | init/main.c | 31 | ||||
| -rw-r--r-- | init/version.c | 1 |
2 files changed, 29 insertions, 3 deletions
diff --git a/init/main.c b/init/main.c index b2f3b566790e..628b8e9e841a 100644 --- a/init/main.c +++ b/init/main.c | |||
| @@ -47,6 +47,8 @@ | |||
| 47 | #include <linux/key.h> | 47 | #include <linux/key.h> |
| 48 | #include <linux/unwind.h> | 48 | #include <linux/unwind.h> |
| 49 | #include <linux/buffer_head.h> | 49 | #include <linux/buffer_head.h> |
| 50 | #include <linux/debug_locks.h> | ||
| 51 | #include <linux/lockdep.h> | ||
| 50 | 52 | ||
| 51 | #include <asm/io.h> | 53 | #include <asm/io.h> |
| 52 | #include <asm/bugs.h> | 54 | #include <asm/bugs.h> |
| @@ -456,6 +458,16 @@ asmlinkage void __init start_kernel(void) | |||
| 456 | 458 | ||
| 457 | smp_setup_processor_id(); | 459 | smp_setup_processor_id(); |
| 458 | 460 | ||
| 461 | /* | ||
| 462 | * Need to run as early as possible, to initialize the | ||
| 463 | * lockdep hash: | ||
| 464 | */ | ||
| 465 | lockdep_init(); | ||
| 466 | |||
| 467 | local_irq_disable(); | ||
| 468 | early_boot_irqs_off(); | ||
| 469 | early_init_irq_lock_class(); | ||
| 470 | |||
| 459 | /* | 471 | /* |
| 460 | * Interrupts are still disabled. Do necessary setups, then | 472 | * Interrupts are still disabled. Do necessary setups, then |
| 461 | * enable them | 473 | * enable them |
| @@ -496,8 +508,13 @@ asmlinkage void __init start_kernel(void) | |||
| 496 | init_timers(); | 508 | init_timers(); |
| 497 | hrtimers_init(); | 509 | hrtimers_init(); |
| 498 | softirq_init(); | 510 | softirq_init(); |
| 499 | time_init(); | ||
| 500 | timekeeping_init(); | 511 | timekeeping_init(); |
| 512 | time_init(); | ||
| 513 | profile_init(); | ||
| 514 | if (!irqs_disabled()) | ||
| 515 | printk("start_kernel(): bug: interrupts were enabled early\n"); | ||
| 516 | early_boot_irqs_on(); | ||
| 517 | local_irq_enable(); | ||
| 501 | 518 | ||
| 502 | /* | 519 | /* |
| 503 | * HACK ALERT! This is early. We're enabling the console before | 520 | * HACK ALERT! This is early. We're enabling the console before |
| @@ -507,8 +524,16 @@ asmlinkage void __init start_kernel(void) | |||
| 507 | console_init(); | 524 | console_init(); |
| 508 | if (panic_later) | 525 | if (panic_later) |
| 509 | panic(panic_later, panic_param); | 526 | panic(panic_later, panic_param); |
| 510 | profile_init(); | 527 | |
| 511 | local_irq_enable(); | 528 | lockdep_info(); |
| 529 | |||
| 530 | /* | ||
| 531 | * Need to run this when irqs are enabled, because it wants | ||
| 532 | * to self-test [hard/soft]-irqs on/off lock inversion bugs | ||
| 533 | * too: | ||
| 534 | */ | ||
| 535 | locking_selftest(); | ||
| 536 | |||
| 512 | #ifdef CONFIG_BLK_DEV_INITRD | 537 | #ifdef CONFIG_BLK_DEV_INITRD |
| 513 | if (initrd_start && !initrd_below_start_ok && | 538 | if (initrd_start && !initrd_below_start_ok && |
| 514 | initrd_start < min_low_pfn << PAGE_SHIFT) { | 539 | initrd_start < min_low_pfn << PAGE_SHIFT) { |
diff --git a/init/version.c b/init/version.c index 3ddc3ceec2fe..e290802c6bd2 100644 --- a/init/version.c +++ b/init/version.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
| 11 | #include <linux/uts.h> | 11 | #include <linux/uts.h> |
| 12 | #include <linux/utsname.h> | 12 | #include <linux/utsname.h> |
| 13 | #include <linux/utsrelease.h> | ||
| 13 | #include <linux/version.h> | 14 | #include <linux/version.h> |
| 14 | 15 | ||
| 15 | #define version(a) Version_ ## a | 16 | #define version(a) Version_ ## a |
