diff options
author | Paul Mackerras <paulus@samba.org> | 2008-05-09 10:12:06 (GMT) |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-05-09 10:12:06 (GMT) |
commit | 2a5f2e3e6cd1ce9fb3f8b186b6bc9aa1f1497a92 (patch) | |
tree | b2306840f227972a7c9d4a2b75e516fe81358ce8 /init | |
parent | 02539d71fa98d5737bb668b02286c76241e4bac9 (diff) | |
parent | 78be76476a34a77f0ea9db2f78ba46a2b0fd5ab5 (diff) | |
download | linux-fsl-qoriq-2a5f2e3e6cd1ce9fb3f8b186b6bc9aa1f1497a92.tar.xz |
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 52 | ||||
-rw-r--r-- | init/initramfs.c | 20 | ||||
-rw-r--r-- | init/main.c | 30 |
3 files changed, 67 insertions, 35 deletions
diff --git a/init/Kconfig b/init/Kconfig index da071c4..f0e62e5 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -259,17 +259,14 @@ config IKCONFIG_PROC config LOG_BUF_SHIFT int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" range 12 21 - default 17 if S390 || LOCKDEP - default 16 if X86_NUMAQ || IA64 - default 15 if SMP - default 14 + default 17 help Select kernel log buffer size as a power of 2. - Defaults and Examples: - 17 => 128 KB for S/390 - 16 => 64 KB for x86 NUMAQ or IA-64 - 15 => 32 KB for SMP - 14 => 16 KB for uniprocessor + Examples: + 17 => 128 KB + 16 => 64 KB + 15 => 32 KB + 14 => 16 KB 13 => 8 KB 12 => 4 KB @@ -284,6 +281,7 @@ config CGROUPS config CGROUP_DEBUG bool "Example debug cgroup subsystem" depends on CGROUPS + default n help This option enables a simple cgroup subsystem that exports useful debugging information about the cgroups @@ -300,6 +298,13 @@ config CGROUP_NS for instance virtual servers and checkpoint/restart jobs. +config CGROUP_DEVICE + bool "Device controller for cgroups" + depends on CGROUPS && EXPERIMENTAL + help + Provides a cgroup implementing whitelists for devices which + a process in the cgroup can mknod or open. + config CPUSETS bool "Cpuset support" depends on SMP && CGROUPS @@ -373,9 +378,13 @@ config RESOURCE_COUNTERS infrastructure that works with cgroups depends on CGROUPS +config MM_OWNER + bool + config CGROUP_MEM_RES_CTLR bool "Memory Resource Controller for Control Groups" depends on CGROUPS && RESOURCE_COUNTERS + select MM_OWNER help Provides a memory resource controller that manages both page cache and RSS memory. @@ -388,6 +397,9 @@ config CGROUP_MEM_RES_CTLR Only enable when you're ok with these trade offs and really sure you need the memory resource controller. + This config option also selects MM_OWNER config option, which + could in turn add some fork/exit overhead. + config SYSFS_DEPRECATED bool @@ -538,6 +550,17 @@ config SYSCTL_SYSCALL If unsure say Y here. +config SYSCTL_SYSCALL_CHECK + bool "Sysctl checks" if EMBEDDED + depends on SYSCTL_SYSCALL + default y + ---help--- + sys_sysctl uses binary paths that have been found challenging + to properly maintain and use. This enables checks that help + you to keep things correct. + + If unsure say Y here. + config KALLSYMS bool "Load all symbols for debugging/ksymoops" if EMBEDDED default y @@ -697,7 +720,7 @@ config VM_EVENT_COUNTERS config SLUB_DEBUG default y bool "Enable SLUB debugging support" if EMBEDDED - depends on SLUB + depends on SLUB && SYSFS help SLUB has extensive debug support features. Disabling these can result in significant savings in code size. This also disables @@ -802,6 +825,15 @@ menuconfig MODULES If unsure, say Y. +config MODULE_FORCE_LOAD + bool "Forced module loading" + depends on MODULES + default n + help + This option allows loading of modules even if that would set the + 'F' (forced) taint, due to lack of version info. Which is + usually a really bad idea. + config MODULE_UNLOAD bool "Module unloading" depends on MODULES diff --git a/init/initramfs.c b/init/initramfs.c index d53fee8..8eeeccb 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -57,7 +57,7 @@ static char __init *find_link(int major, int minor, int ino, continue; return (*p)->name; } - q = (struct hash *)malloc(sizeof(struct hash)); + q = kmalloc(sizeof(struct hash), GFP_KERNEL); if (!q) panic("can't allocate link hash entry"); q->major = major; @@ -77,7 +77,7 @@ static void __init free_hash(void) while (*p) { q = *p; *p = q->next; - free(q); + kfree(q); } } } @@ -445,10 +445,10 @@ static char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only) { int written; dry_run = check_only; - header_buf = malloc(110); - symlink_buf = malloc(PATH_MAX + N_ALIGN(PATH_MAX) + 1); - name_buf = malloc(N_ALIGN(PATH_MAX)); - window = malloc(WSIZE); + header_buf = kmalloc(110, GFP_KERNEL); + symlink_buf = kmalloc(PATH_MAX + N_ALIGN(PATH_MAX) + 1, GFP_KERNEL); + name_buf = kmalloc(N_ALIGN(PATH_MAX), GFP_KERNEL); + window = kmalloc(WSIZE, GFP_KERNEL); if (!window || !header_buf || !symlink_buf || !name_buf) panic("can't allocate buffers"); state = Start; @@ -484,10 +484,10 @@ static char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only) buf += inptr; len -= inptr; } - free(window); - free(name_buf); - free(symlink_buf); - free(header_buf); + kfree(window); + kfree(name_buf); + kfree(symlink_buf); + kfree(header_buf); return message; } diff --git a/init/main.c b/init/main.c index 1687b01..a87d4ca5 100644 --- a/init/main.c +++ b/init/main.c @@ -52,12 +52,14 @@ #include <linux/unwind.h> #include <linux/buffer_head.h> #include <linux/debug_locks.h> +#include <linux/debugobjects.h> #include <linux/lockdep.h> #include <linux/pid_namespace.h> #include <linux/device.h> #include <linux/kthread.h> #include <linux/sched.h> #include <linux/signal.h> +#include <linux/idr.h> #include <asm/io.h> #include <asm/bugs.h> @@ -458,7 +460,7 @@ static void noinline __init_refok rest_init(void) kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); numa_default_policy(); pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); - kthreadd_task = find_task_by_pid(pid); + kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns); unlock_kernel(); /* @@ -542,6 +544,7 @@ asmlinkage void __init start_kernel(void) */ unwind_init(); lockdep_init(); + debug_objects_early_init(); cgroup_init_early(); local_irq_disable(); @@ -559,6 +562,7 @@ asmlinkage void __init start_kernel(void) printk(KERN_NOTICE); printk(linux_banner); setup_arch(&command_line); + mm_init_owner(&init_mm, &init_task); setup_command_line(command_line); unwind_setup(); setup_per_cpu_areas(); @@ -636,6 +640,8 @@ asmlinkage void __init start_kernel(void) enable_debug_pagealloc(); cpu_hotplug_init(); kmem_cache_init(); + debug_objects_mem_init(); + idr_init_cache(); setup_per_cpu_pageset(); numa_policy_init(); if (late_time_init) @@ -700,10 +706,8 @@ static void __init do_initcalls(void) int result; if (initcall_debug) { - printk("Calling initcall 0x%p", *call); - print_fn_descriptor_symbol(": %s()", + print_fn_descriptor_symbol("calling %s()\n", (unsigned long) *call); - printk("\n"); t0 = ktime_get(); } @@ -713,15 +717,10 @@ static void __init do_initcalls(void) t1 = ktime_get(); delta = ktime_sub(t1, t0); - printk("initcall 0x%p", *call); - print_fn_descriptor_symbol(": %s()", + print_fn_descriptor_symbol("initcall %s()", (unsigned long) *call); - printk(" returned %d.\n", result); - - printk("initcall 0x%p ran for %Ld msecs: ", - *call, (unsigned long long)delta.tv64 >> 20); - print_fn_descriptor_symbol("%s()\n", - (unsigned long) *call); + printk(" returned %d after %Ld msecs\n", result, + (unsigned long long) delta.tv64 >> 20); } if (result && result != -ENODEV && initcall_debug) { @@ -737,10 +736,9 @@ static void __init do_initcalls(void) local_irq_enable(); } if (msg) { - printk(KERN_WARNING "initcall at 0x%p", *call); - print_fn_descriptor_symbol(": %s()", + print_fn_descriptor_symbol(KERN_WARNING "initcall %s()", (unsigned long) *call); - printk(": returned with %s\n", msg); + printk(" returned with %s\n", msg); } } @@ -807,6 +805,8 @@ static int noinline init_post(void) (void) sys_dup(0); (void) sys_dup(0); + current->signal->flags |= SIGNAL_UNKILLABLE; + if (ramdisk_execute_command) { run_init_process(ramdisk_execute_command); printk(KERN_WARNING "Failed to execute %s\n", |