aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig46
-rw-r--r--init/do_mounts.c1
-rw-r--r--init/initramfs.c12
-rw-r--r--init/main.c45
4 files changed, 27 insertions, 77 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 1d19fd25204..3b36a1d5365 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -365,43 +365,6 @@ config SHMEM
option replaces shmem and tmpfs with the much simpler ramfs code,
which may be appropriate on small systems without swap.
-config CC_ALIGN_FUNCTIONS
- int "Function alignment" if EMBEDDED
- default 0
- help
- Align the start of functions to the next power-of-two greater than n,
- skipping up to n bytes. For instance, 32 aligns functions
- to the next 32-byte boundary, but 24 would align to the next
- 32-byte boundary only if this can be done by skipping 23 bytes or less.
- Zero means use compiler's default.
-
-config CC_ALIGN_LABELS
- int "Label alignment" if EMBEDDED
- default 0
- help
- Align all branch targets to a power-of-two boundary, skipping
- up to n bytes like ALIGN_FUNCTIONS. This option can easily
- make code slower, because it must insert dummy operations for
- when the branch target is reached in the usual flow of the code.
- Zero means use compiler's default.
-
-config CC_ALIGN_LOOPS
- int "Loop alignment" if EMBEDDED
- default 0
- help
- Align loops to a power-of-two boundary, skipping up to n bytes.
- Zero means use compiler's default.
-
-config CC_ALIGN_JUMPS
- int "Jump alignment" if EMBEDDED
- default 0
- help
- Align branch targets to a power-of-two boundary, for branch
- targets where the targets can only be reached by jumping,
- skipping up to n bytes like ALIGN_FUNCTIONS. In this case,
- no dummy operations need be executed.
- Zero means use compiler's default.
-
config SLAB
default y
bool "Use full SLAB allocator" if EMBEDDED
@@ -470,15 +433,6 @@ config MODULE_FORCE_UNLOAD
rmmod). This is mainly for kernel developers and desperate users.
If unsure, say N.
-config OBSOLETE_MODPARM
- bool
- default y
- depends on MODULES
- help
- You need this option to use module parameters on modules which
- have not been converted to the new module parameter system yet.
- If unsure, say Y.
-
config MODVERSIONS
bool "Module versioning support"
depends on MODULES
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 8b671fe68af..adb7cad3e6e 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -23,7 +23,6 @@ int root_mountflags = MS_RDONLY | MS_SILENT;
char * __initdata root_device_name;
static char __initdata saved_root_name[64];
-/* this is initialized in init/main.c */
dev_t ROOT_DEV;
static int __init load_ramdisk(char *str)
diff --git a/init/initramfs.c b/init/initramfs.c
index 637344b0598..679d870d991 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -506,6 +506,7 @@ void __init populate_rootfs(void)
panic(err);
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start) {
+#ifdef CONFIG_BLK_DEV_RAM
int fd;
printk(KERN_INFO "checking if image is initramfs...");
err = unpack_to_rootfs((char *)initrd_start,
@@ -518,13 +519,22 @@ void __init populate_rootfs(void)
return;
}
printk("it isn't (%s); looks like an initrd\n", err);
- fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 700);
+ fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700);
if (fd >= 0) {
sys_write(fd, (char *)initrd_start,
initrd_end - initrd_start);
sys_close(fd);
free_initrd();
}
+#else
+ printk(KERN_INFO "Unpacking initramfs...");
+ err = unpack_to_rootfs((char *)initrd_start,
+ initrd_end - initrd_start, 0);
+ if (err)
+ panic(err);
+ printk(" done\n");
+ free_initrd();
+#endif
}
#endif
}
diff --git a/init/main.c b/init/main.c
index 2714e0e7cfe..4a2f0898dda 100644
--- a/init/main.c
+++ b/init/main.c
@@ -306,8 +306,6 @@ static int __init rdinit_setup(char *str)
}
__setup("rdinit=", rdinit_setup);
-extern void setup_arch(char **);
-
#ifndef CONFIG_SMP
#ifdef CONFIG_X86_LOCAL_APIC
@@ -343,7 +341,7 @@ static void __init setup_per_cpu_areas(void)
#endif
ptr = alloc_bootmem(size * nr_possible_cpus);
- for_each_cpu(i) {
+ for_each_possible_cpu(i) {
__per_cpu_offset[i] = ptr - __per_cpu_start;
memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
ptr += size;
@@ -571,17 +569,23 @@ static void __init do_initcalls(void)
int count = preempt_count();
for (call = __initcall_start; call < __initcall_end; call++) {
- char *msg;
+ char *msg = NULL;
+ char msgbuf[40];
+ int result;
if (initcall_debug) {
- printk(KERN_DEBUG "Calling initcall 0x%p", *call);
- print_fn_descriptor_symbol(": %s()", (unsigned long) *call);
+ printk("Calling initcall 0x%p", *call);
+ print_fn_descriptor_symbol(": %s()",
+ (unsigned long) *call);
printk("\n");
}
- (*call)();
+ result = (*call)();
- msg = NULL;
+ if (result && (result != -ENODEV || initcall_debug)) {
+ sprintf(msgbuf, "error code %d", result);
+ msg = msgbuf;
+ }
if (preempt_count() != count) {
msg = "preemption imbalance";
preempt_count() = count;
@@ -591,8 +595,10 @@ static void __init do_initcalls(void)
local_irq_enable();
}
if (msg) {
- printk(KERN_WARNING "error in initcall at 0x%p: "
- "returned with %s\n", *call, msg);
+ printk(KERN_WARNING "initcall at 0x%p", *call);
+ print_fn_descriptor_symbol(": %s()",
+ (unsigned long) *call);
+ printk(": returned with %s\n", msg);
}
}
@@ -639,24 +645,6 @@ static void run_init_process(char *init_filename)
execve(init_filename, argv_init, envp_init);
}
-static inline void fixup_cpu_present_map(void)
-{
-#ifdef CONFIG_SMP
- int i;
-
- /*
- * If arch is not hotplug ready and did not populate
- * cpu_present_map, just make cpu_present_map same as cpu_possible_map
- * for other cpu bringup code to function as normal. e.g smp_init() etc.
- */
- if (cpus_empty(cpu_present_map)) {
- for_each_cpu(i) {
- cpu_set(i, cpu_present_map);
- }
- }
-#endif
-}
-
static int init(void * unused)
{
lock_kernel();
@@ -678,7 +666,6 @@ static int init(void * unused)
do_pre_smp_initcalls();
- fixup_cpu_present_map();
smp_init();
sched_init_smp();