aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig31
-rw-r--r--init/do_mounts.c27
-rw-r--r--init/do_mounts_md.c1
-rw-r--r--init/main.c83
4 files changed, 97 insertions, 45 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 3e7b257fc05..6199d112090 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -13,6 +13,7 @@ config DEFCONFIG_LIST
default "/lib/modules/$UNAME_RELEASE/.config"
default "/etc/kernel-config"
default "/boot/config-$UNAME_RELEASE"
+ default "$ARCH_DEFCONFIG"
default "arch/$ARCH/defconfig"
menu "General setup"
@@ -316,9 +317,16 @@ config CPUSETS
Say N if unsure.
+#
+# Architectures with an unreliable sched_clock() should select this:
+#
+config HAVE_UNSTABLE_SCHED_CLOCK
+ bool
+
config GROUP_SCHED
bool "Group CPU scheduler"
- default y
+ depends on EXPERIMENTAL
+ default n
help
This feature lets CPU scheduler recognize task groups and control CPU
bandwidth allocation to such task groups.
@@ -326,7 +334,7 @@ config GROUP_SCHED
config FAIR_GROUP_SCHED
bool "Group scheduling for SCHED_OTHER"
depends on GROUP_SCHED
- default y
+ default GROUP_SCHED
config RT_GROUP_SCHED
bool "Group scheduling for SCHED_RR/FIFO"
@@ -627,6 +635,14 @@ config ELF_CORE
help
Enable support for generating core dumps. Disabling saves about 4k.
+config PCSPKR_PLATFORM
+ bool "Enable PC-Speaker support" if EMBEDDED
+ depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES
+ default y
+ help
+ This option allows to disable the internal PC-Speaker
+ support, saving some memory.
+
config COMPAT_BRK
bool "Disable heap randomization"
default y
@@ -720,7 +736,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
@@ -825,6 +841,15 @@ menuconfig MODULES
If unsure, say Y.
+config MODULE_FORCE_LOAD
+ bool "Forced module loading"
+ depends on MODULES
+ default n
+ help
+ Allow loading of modules without version information (ie. modprobe
+ --force). Forced module loading sets the 'F' (forced) taint flag and
+ is usually a really bad idea.
+
config MODULE_UNLOAD
bool "Module unloading"
depends on MODULES
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 3885e70e775..660c1e50c91 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -76,6 +76,7 @@ dev_t name_to_dev_t(char *name)
char s[32];
char *p;
dev_t res = 0;
+ int part;
if (strncmp(name, "/dev/", 5) != 0) {
unsigned maj, min;
@@ -106,7 +107,31 @@ dev_t name_to_dev_t(char *name)
for (p = s; *p; p++)
if (*p == '/')
*p = '!';
- res = blk_lookup_devt(s);
+ res = blk_lookup_devt(s, 0);
+ if (res)
+ goto done;
+
+ /*
+ * try non-existant, but valid partition, which may only exist
+ * after revalidating the disk, like partitioned md devices
+ */
+ while (p > s && isdigit(p[-1]))
+ p--;
+ if (p == s || !*p || *p == '0')
+ goto fail;
+
+ /* try disk name without <part number> */
+ part = simple_strtoul(p, NULL, 10);
+ *p = '\0';
+ res = blk_lookup_devt(s, part);
+ if (res)
+ goto done;
+
+ /* try disk name without p<part number> */
+ if (p < s + 2 || !isdigit(p[-2]) || p[-1] != 'p')
+ goto fail;
+ p[-1] = '\0';
+ res = blk_lookup_devt(s, part);
if (res)
goto done;
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
index 7473b0c59d4..693d24694a6 100644
--- a/init/do_mounts_md.c
+++ b/init/do_mounts_md.c
@@ -24,7 +24,6 @@ static struct {
static int md_setup_ents __initdata;
-extern int mdp_major;
/*
* Parse the command-line parameters given our kernel, but do not
* actually try to invoke the MD device now; that is handled by
diff --git a/init/main.c b/init/main.c
index a87d4ca5c36..f7fb20021d4 100644
--- a/init/main.c
+++ b/init/main.c
@@ -602,6 +602,7 @@ asmlinkage void __init start_kernel(void)
softirq_init();
timekeeping_init();
time_init();
+ sched_clock_init();
profile_init();
if (!irqs_disabled())
printk("start_kernel(): bug: interrupts were enabled early\n");
@@ -692,55 +693,57 @@ static int __init initcall_debug_setup(char *str)
}
__setup("initcall_debug", initcall_debug_setup);
-extern initcall_t __initcall_start[], __initcall_end[];
-
-static void __init do_initcalls(void)
+static void __init do_one_initcall(initcall_t fn)
{
- initcall_t *call;
int count = preempt_count();
+ ktime_t t0, t1, delta;
+ char msgbuf[64];
+ int result;
- for (call = __initcall_start; call < __initcall_end; call++) {
- ktime_t t0, t1, delta;
- char *msg = NULL;
- char msgbuf[40];
- int result;
+ if (initcall_debug) {
+ print_fn_descriptor_symbol("calling %s\n", fn);
+ t0 = ktime_get();
+ }
- if (initcall_debug) {
- print_fn_descriptor_symbol("calling %s()\n",
- (unsigned long) *call);
- t0 = ktime_get();
- }
+ result = fn();
- result = (*call)();
+ if (initcall_debug) {
+ t1 = ktime_get();
+ delta = ktime_sub(t1, t0);
- if (initcall_debug) {
- t1 = ktime_get();
- delta = ktime_sub(t1, t0);
+ print_fn_descriptor_symbol("initcall %s", fn);
+ printk(" returned %d after %Ld msecs\n", result,
+ (unsigned long long) delta.tv64 >> 20);
+ }
- print_fn_descriptor_symbol("initcall %s()",
- (unsigned long) *call);
- printk(" returned %d after %Ld msecs\n", result,
- (unsigned long long) delta.tv64 >> 20);
- }
+ msgbuf[0] = 0;
- if (result && result != -ENODEV && initcall_debug) {
- sprintf(msgbuf, "error code %d", result);
- msg = msgbuf;
- }
- if (preempt_count() != count) {
- msg = "preemption imbalance";
- preempt_count() = count;
- }
- if (irqs_disabled()) {
- msg = "disabled interrupts";
- local_irq_enable();
- }
- if (msg) {
- print_fn_descriptor_symbol(KERN_WARNING "initcall %s()",
- (unsigned long) *call);
- printk(" returned with %s\n", msg);
- }
+ if (result && result != -ENODEV && initcall_debug)
+ sprintf(msgbuf, "error code %d ", result);
+
+ if (preempt_count() != count) {
+ strlcat(msgbuf, "preemption imbalance ", sizeof(msgbuf));
+ preempt_count() = count;
+ }
+ if (irqs_disabled()) {
+ strlcat(msgbuf, "disabled interrupts ", sizeof(msgbuf));
+ local_irq_enable();
+ }
+ if (msgbuf[0]) {
+ print_fn_descriptor_symbol(KERN_WARNING "initcall %s", fn);
+ printk(" returned with %s\n", msgbuf);
}
+}
+
+
+extern initcall_t __initcall_start[], __initcall_end[];
+
+static void __init do_initcalls(void)
+{
+ initcall_t *call;
+
+ for (call = __initcall_start; call < __initcall_end; call++)
+ do_one_initcall(*call);
/* Make sure there is no pending stuff from the initcall sequence */
flush_scheduled_work();