aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig41
-rw-r--r--init/do_mounts_initrd.c1
-rw-r--r--init/initramfs.c10
-rw-r--r--init/main.c26
-rw-r--r--init/version.c6
5 files changed, 64 insertions, 20 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 176f7e5136c..a3f83e2c825 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -249,6 +249,26 @@ config CPUSETS
Say N if unsure.
+config SYSFS_DEPRECATED
+ bool "Create deprecated sysfs files"
+ default y
+ help
+ This option creates deprecated symlinks such as the
+ "device"-link, the <subsystem>:<name>-link, and the
+ "bus"-link. It may also add deprecated key in the
+ uevent environment.
+ None of these features or values should be used today, as
+ they export driver core implementation details to userspace
+ or export properties which can't be kept stable across kernel
+ releases.
+
+ If enabled, this option will also move any device structures
+ that belong to a class, back into the /sys/class heirachy, in
+ order to support older versions of udev.
+
+ If you are using a distro that was released in 2006 or later,
+ it should be safe to say N here.
+
config RELAY
bool "Kernel->user space relay support (formerly relayfs)"
help
@@ -284,6 +304,15 @@ config TASK_XACCT
Say N if unsure.
+config TASK_IO_ACCOUNTING
+ bool "Enable per-task storage I/O accounting (EXPERIMENTAL)"
+ depends on TASK_XACCT
+ help
+ Collect information on the number of bytes of storage I/O which this
+ task has caused.
+
+ Say N if unsure.
+
config SYSCTL
bool
@@ -319,7 +348,7 @@ config SYSCTL_SYSCALL
If unsure say Y here.
config KALLSYMS
- bool "Load all symbols for debugging/kksymoops" if EMBEDDED
+ bool "Load all symbols for debugging/ksymoops" if EMBEDDED
default y
help
Say Y here to let the kernel print out symbolic crash information and
@@ -421,7 +450,7 @@ config SHMEM
config SLAB
default y
- bool "Use full SLAB allocator" if EMBEDDED
+ bool "Use full SLAB allocator" if (EMBEDDED && !SMP && !SPARSEMEM)
help
Disabling this replaces the advanced SLAB allocator and
kmalloc support with the drastically simpler SLOB allocator.
@@ -432,10 +461,10 @@ config VM_EVENT_COUNTERS
default y
bool "Enable VM event counters for /proc/vmstat" if EMBEDDED
help
- VM event counters are only needed to for event counts to be
- shown. They have no function for the kernel itself. This
- option allows the disabling of the VM event counters.
- /proc/vmstat will only show page counts.
+ VM event counters are needed for event counts to be shown.
+ This option allows the disabling of the VM event counters
+ on EMBEDDED systems. /proc/vmstat will only show page counts
+ if VM event counters are disabled.
endmenu # General setup
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index 919a80cb322..2cfd7cb36e7 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -6,6 +6,7 @@
#include <linux/romfs_fs.h>
#include <linux/initrd.h>
#include <linux/sched.h>
+#include <linux/freezer.h>
#include "do_mounts.h"
diff --git a/init/initramfs.c b/init/initramfs.c
index d28c1094d7e..4fa0f7977de 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -182,6 +182,10 @@ static int __init do_collect(void)
static int __init do_header(void)
{
+ if (memcmp(collected, "070707", 6)==0) {
+ error("incorrect cpio method used: use -H newc option");
+ return 1;
+ }
if (memcmp(collected, "070701", 6)) {
error("no cpio magic");
return 1;
@@ -522,7 +526,7 @@ static void __init free_initrd(void)
#endif
-void __init populate_rootfs(void)
+static int __init populate_rootfs(void)
{
char *err = unpack_to_rootfs(__initramfs_start,
__initramfs_end - __initramfs_start, 0);
@@ -540,7 +544,7 @@ void __init populate_rootfs(void)
unpack_to_rootfs((char *)initrd_start,
initrd_end - initrd_start, 0);
free_initrd();
- return;
+ return 0;
}
printk("it isn't (%s); looks like an initrd\n", err);
fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700);
@@ -561,4 +565,6 @@ void __init populate_rootfs(void)
#endif
}
#endif
+ return 0;
}
+rootfs_initcall(populate_rootfs);
diff --git a/init/main.c b/init/main.c
index 36f608a7cfb..8b4a7d76916 100644
--- a/init/main.c
+++ b/init/main.c
@@ -29,6 +29,7 @@
#include <linux/percpu.h>
#include <linux/kmod.h>
#include <linux/kernel_stat.h>
+#include <linux/start_kernel.h>
#include <linux/security.h>
#include <linux/workqueue.h>
#include <linux/profile.h>
@@ -49,6 +50,8 @@
#include <linux/buffer_head.h>
#include <linux/debug_locks.h>
#include <linux/lockdep.h>
+#include <linux/pid_namespace.h>
+#include <linux/device.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -73,6 +76,10 @@
#error Sorry, your GCC is too old. It builds incorrect kernels.
#endif
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 0
+#warning gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended.
+#endif
+
static int init(void *);
extern void init_IRQ(void);
@@ -86,8 +93,6 @@ extern void pidmap_init(void);
extern void prio_tree_init(void);
extern void radix_tree_init(void);
extern void free_initmem(void);
-extern void populate_rootfs(void);
-extern void driver_init(void);
extern void prepare_namespace(void);
#ifdef CONFIG_ACPI
extern void acpi_early_init(void);
@@ -525,6 +530,11 @@ asmlinkage void __init start_kernel(void)
parse_args("Booting kernel", command_line, __start___param,
__stop___param - __start___param,
&unknown_bootoption);
+ if (!irqs_disabled()) {
+ printk(KERN_WARNING "start_kernel(): bug: interrupts were "
+ "enabled *very* early, fixing it\n");
+ local_irq_disable();
+ }
sort_main_extable();
trap_init();
rcu_init();
@@ -619,8 +629,6 @@ static int __init initcall_debug_setup(char *str)
}
__setup("initcall_debug", initcall_debug_setup);
-struct task_struct *child_reaper = &init_task;
-
extern initcall_t __initcall_start[], __initcall_end[];
static void __init do_initcalls(void)
@@ -687,7 +695,7 @@ static void __init do_basic_setup(void)
do_initcalls();
}
-static void do_pre_smp_initcalls(void)
+static void __init do_pre_smp_initcalls(void)
{
extern int spawn_ksoftirqd(void);
#ifdef CONFIG_SMP
@@ -720,7 +728,7 @@ static int init(void * unused)
* assumptions about where in the task array this
* can be found.
*/
- child_reaper = current;
+ init_pid_ns.child_reaper = current;
cad_pid = task_pid(current);
@@ -733,12 +741,6 @@ static int init(void * unused)
cpuset_init_smp();
- /*
- * Do this before initcalls, because some drivers want to access
- * firmware files.
- */
- populate_rootfs();
-
do_basic_setup();
/*
diff --git a/init/version.c b/init/version.c
index 8f28344d9c7..6c01ec1cc48 100644
--- a/init/version.c
+++ b/init/version.c
@@ -34,6 +34,12 @@ struct uts_namespace init_uts_ns = {
};
EXPORT_SYMBOL_GPL(init_uts_ns);
+/* FIXED STRINGS! Don't touch! */
const char linux_banner[] =
"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
+
+const char linux_proc_banner[] =
+ "%s version %s"
+ " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
+ " (" LINUX_COMPILER ") %s\n";