summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-29 00:07:55 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-29 00:07:55 +0200
commitcb28a1bbdb4790378e7366d6c9ee1d2340b84f92 (patch)
tree316436f77dac75335fd2c3ef5f109e71606c50d3 /init
parentb6d4f7e3ef25beb8c658c97867d98883e69dc544 (diff)
parentf934fb19ef34730263e6afc01e8ec27a8a71470f (diff)
downloadlinux-cb28a1bbdb4790378e7366d6c9ee1d2340b84f92.tar.gz
linux-cb28a1bbdb4790378e7366d6c9ee1d2340b84f92.tar.xz
Merge branch 'linus' into core/generic-dma-coherent
Conflicts: arch/x86/Kconfig Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig19
-rw-r--r--init/do_mounts.c3
-rw-r--r--init/do_mounts.h1
-rw-r--r--init/do_mounts_rd.c37
-rw-r--r--init/initramfs.c22
-rw-r--r--init/main.c36
-rw-r--r--init/version.c3
7 files changed, 31 insertions, 90 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 63cdbd8bd3d5..250e02c8f8f9 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -171,7 +171,7 @@ config BSD_PROCESS_ACCT_V3
process and it's parent. Note that this file format is incompatible
with previous v0/v1/v2 file formats, so you will need updated tools
for processing it. A preliminary version of these tools is available
- at <http://www.physik3.uni-rostock.de/tim/kernel/utils/acct/>.
+ at <http://www.gnu.org/software/acct/>.
config TASKSTATS
bool "Export task/process statistics through netlink (EXPERIMENTAL)"
@@ -486,7 +486,7 @@ config PID_NS
default n
depends on NAMESPACES && EXPERIMENTAL
help
- Suport process id namespaces. This allows having multiple
+ Support process id namespaces. This allows having multiple
process with the same pid as long as they are in different
pid namespaces. This is a building block of containers.
@@ -860,8 +860,8 @@ config MODULE_UNLOAD
help
Without this option you will not be able to unload any
modules (note that some modules may not be unloadable
- anyway), which makes your kernel slightly smaller and
- simpler. If unsure, say Y.
+ anyway), which makes your kernel smaller, faster
+ and simpler. If unsure, say Y.
config MODULE_FORCE_UNLOAD
bool "Forced module unloading"
@@ -897,16 +897,11 @@ config MODULE_SRCVERSION_ALL
will be created for all modules. If unsure, say N.
config KMOD
- bool "Automatic kernel module loading"
+ def_bool y
depends on MODULES
help
- Normally when you have selected some parts of the kernel to
- be created as kernel modules, you must load them (using the
- "modprobe" command) before you can use them. If you say Y
- here, some parts of the kernel will be able to load modules
- automatically: when a part of the kernel needs a module, it
- runs modprobe with the appropriate arguments, thereby
- loading the module if it is available. If unsure, say Y.
+ This is being removed soon. These days, CONFIG_MODULES
+ implies CONFIG_KMOD, so use that instead.
config STOP_MACHINE
bool
diff --git a/init/do_mounts.c b/init/do_mounts.c
index a1de1bf3d6b9..3715feb8446d 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -12,6 +12,7 @@
#include <linux/device.h>
#include <linux/init.h>
#include <linux/fs.h>
+#include <linux/initrd.h>
#include <linux/nfs_fs.h>
#include <linux/nfs_fs_sb.h>
@@ -22,7 +23,7 @@
int __initdata rd_doload; /* 1 = load RAM disk, 0 = don't load */
int root_mountflags = MS_RDONLY | MS_SILENT;
-char * __initdata root_device_name;
+static char * __initdata root_device_name;
static char __initdata saved_root_name[64];
static int __initdata root_wait;
diff --git a/init/do_mounts.h b/init/do_mounts.h
index 735705d137ff..9aa968d54329 100644
--- a/init/do_mounts.h
+++ b/init/do_mounts.h
@@ -11,7 +11,6 @@ void change_floppy(char *fmt, ...);
void mount_block_root(char *name, int flags);
void mount_root(void);
extern int root_mountflags;
-extern char *root_device_name;
static inline int create_dev(char *name, dev_t dev)
{
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index 46dfd64ae8fb..fedef93b586f 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -10,8 +10,6 @@
#include "do_mounts.h"
-#define BUILD_CRAMDISK
-
int __initdata rd_prompt = 1;/* 1 = prompt for RAM disk, 0 = don't prompt */
static int __init prompt_ramdisk(char *str)
@@ -162,14 +160,8 @@ int __init rd_load_image(char *from)
goto done;
if (nblocks == 0) {
-#ifdef BUILD_CRAMDISK
if (crd_load(in_fd, out_fd) == 0)
goto successful_load;
-#else
- printk(KERN_NOTICE
- "RAMDISK: Kernel does not support compressed "
- "RAM disk images\n");
-#endif
goto done;
}
@@ -267,8 +259,6 @@ int __init rd_load_disk(int n)
return rd_load_image("/dev/root");
}
-#ifdef BUILD_CRAMDISK
-
/*
* gzip declarations
*/
@@ -313,32 +303,11 @@ static int crd_infd, crd_outfd;
static int __init fill_inbuf(void);
static void __init flush_window(void);
-static void __init *malloc(size_t size);
-static void __init free(void *where);
static void __init error(char *m);
-static void __init gzip_mark(void **);
-static void __init gzip_release(void **);
-
-#include "../lib/inflate.c"
-static void __init *malloc(size_t size)
-{
- return kmalloc(size, GFP_KERNEL);
-}
-
-static void __init free(void *where)
-{
- kfree(where);
-}
-
-static void __init gzip_mark(void **ptr)
-{
-}
-
-static void __init gzip_release(void **ptr)
-{
-}
+#define NO_INFLATE_MALLOC
+#include "../lib/inflate.c"
/* ===========================================================================
* Fill the input buffer. This is called only when the buffer is empty
@@ -425,5 +394,3 @@ static int __init crd_load(int in_fd, int out_fd)
kfree(window);
return result;
}
-
-#endif /* BUILD_CRAMDISK */
diff --git a/init/initramfs.c b/init/initramfs.c
index 8eeeccb328c9..644fc01ad5f0 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -14,16 +14,6 @@ static void __init error(char *x)
message = x;
}
-static void __init *malloc(size_t size)
-{
- return kmalloc(size, GFP_KERNEL);
-}
-
-static void __init free(void *where)
-{
- kfree(where);
-}
-
/* link hash */
#define N_ALIGN(len) ((((len) + 1) & ~3) + 2)
@@ -407,18 +397,10 @@ static long bytes_out;
static void __init flush_window(void);
static void __init error(char *m);
-static void __init gzip_mark(void **);
-static void __init gzip_release(void **);
-#include "../lib/inflate.c"
+#define NO_INFLATE_MALLOC
-static void __init gzip_mark(void **ptr)
-{
-}
-
-static void __init gzip_release(void **ptr)
-{
-}
+#include "../lib/inflate.c"
/* ===========================================================================
* Write the output window window[0..outcnt-1] and update crc and bytes_out.
diff --git a/init/main.c b/init/main.c
index edeace036fd9..20fdc9884b77 100644
--- a/init/main.c
+++ b/init/main.c
@@ -87,8 +87,6 @@ extern void init_IRQ(void);
extern void fork_init(unsigned long);
extern void mca_init(void);
extern void sbus_init(void);
-extern void pidhash_init(void);
-extern void pidmap_init(void);
extern void prio_tree_init(void);
extern void radix_tree_init(void);
extern void free_initmem(void);
@@ -415,6 +413,13 @@ static void __init smp_init(void)
{
unsigned int cpu;
+ /*
+ * Set up the current CPU as possible to migrate to.
+ * The other ones will be done by cpu_up/cpu_down()
+ */
+ cpu = smp_processor_id();
+ cpu_set(cpu, cpu_active_map);
+
/* FIXME: This should be done in userspace --RR */
for_each_present_cpu(cpu) {
if (num_online_cpus() >= setup_max_cpus)
@@ -630,9 +635,10 @@ asmlinkage void __init start_kernel(void)
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start && !initrd_below_start_ok &&
- initrd_start < min_low_pfn << PAGE_SHIFT) {
+ page_to_pfn(virt_to_page(initrd_start)) < min_low_pfn) {
printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
- "disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT);
+ "disabling it.\n",
+ page_to_pfn(virt_to_page(initrd_start)), min_low_pfn);
initrd_start = 0;
}
#endif
@@ -737,13 +743,13 @@ static void __init do_one_initcall(initcall_t fn)
}
-extern initcall_t __initcall_start[], __initcall_end[];
+extern initcall_t __initcall_start[], __initcall_end[], __early_initcall_end[];
static void __init do_initcalls(void)
{
initcall_t *call;
- for (call = __initcall_start; call < __initcall_end; call++)
+ for (call = __early_initcall_end; call < __initcall_end; call++)
do_one_initcall(*call);
/* Make sure there is no pending stuff from the initcall sequence */
@@ -768,24 +774,12 @@ static void __init do_basic_setup(void)
do_initcalls();
}
-static int __initdata nosoftlockup;
-
-static int __init nosoftlockup_setup(char *str)
-{
- nosoftlockup = 1;
- return 1;
-}
-__setup("nosoftlockup", nosoftlockup_setup);
-
static void __init do_pre_smp_initcalls(void)
{
- extern int spawn_ksoftirqd(void);
+ initcall_t *call;
- init_call_single_data();
- migration_init();
- spawn_ksoftirqd();
- if (!nosoftlockup)
- spawn_softlockup_task();
+ for (call = __initcall_start; call < __early_initcall_end; call++)
+ do_one_initcall(*call);
}
static void run_init_process(char *init_filename)
diff --git a/init/version.c b/init/version.c
index 9d17d70ee02d..52a8b98642b8 100644
--- a/init/version.c
+++ b/init/version.c
@@ -13,10 +13,13 @@
#include <linux/utsrelease.h>
#include <linux/version.h>
+#ifndef CONFIG_KALLSYMS
#define version(a) Version_ ## a
#define version_string(a) version(a)
+extern int version_string(LINUX_VERSION_CODE);
int version_string(LINUX_VERSION_CODE);
+#endif
struct uts_namespace init_uts_ns = {
.kref = {