summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-27 01:05:20 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-27 01:05:20 +0000
commit546db14ee74118296f425f3b91634fb767d67290 (patch)
tree22b613a3da8d4bf663eec5e155af01b87fdf9094 /init
parent1e25e41c4f5474e14452094492dbc169b800e4c8 (diff)
Merge with Linux 2.3.23. The new bootmem stuff has broken various
platforms. At this time I've only verified that IP22 support compiles and IP27 actually works.
Diffstat (limited to 'init')
-rw-r--r--init/main.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/init/main.c b/init/main.c
index f11652338..be06a1d0a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -24,6 +24,7 @@
#include <linux/blk.h>
#include <linux/hdreg.h>
#include <linux/iobuf.h>
+#include <linux/bootmem.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -56,6 +57,10 @@ extern void nubus_init(void);
#include <linux/isapnp.h>
#endif
+#ifdef CONFIG_IRDA
+#include <net/irda/irda_device.h>
+#endif
+
/*
* Versions of gcc older than that listed below may actually compile
* and link okay, but the end product can have subtle run time bugs.
@@ -75,7 +80,6 @@ static int init(void *);
extern void init_IRQ(void);
extern void init_modules(void);
-extern long console_init(long, long);
extern void init_inventory(void);
extern void sock_init(void);
extern void fork_init(unsigned long);
@@ -115,9 +119,6 @@ extern void dquot_init_hash(void);
extern void time_init(void);
-static unsigned long memory_start = 0;
-static unsigned long memory_end = 0;
-
int rows, cols;
#ifdef CONFIG_BLK_DEV_INITRD
@@ -428,7 +429,7 @@ static void __init parse_options(char *line)
}
-extern void setup_arch(char **, unsigned long *, unsigned long *);
+extern void setup_arch(char **);
extern void cpu_idle(void);
#ifndef __SMP__
@@ -455,15 +456,15 @@ static void __init smp_init(void)
asmlinkage void __init start_kernel(void)
{
char * command_line;
-
+ unsigned long mempages;
/*
* Interrupts are still disabled. Do necessary setups, then
* enable them
*/
lock_kernel();
printk(linux_banner);
- setup_arch(&command_line, &memory_start, &memory_end);
- memory_start = paging_init(memory_start,memory_end);
+ setup_arch(&command_line);
+ paging_init();
trap_init();
init_IRQ();
sched_init();
@@ -475,23 +476,26 @@ asmlinkage void __init start_kernel(void)
* we've done PCI setups etc, and console_init() must be aware of
* this. But we do want output early, in case something goes wrong.
*/
- memory_start = console_init(memory_start,memory_end);
+ console_init();
#ifdef CONFIG_MODULES
init_modules();
#endif
if (prof_shift) {
- prof_buffer = (unsigned int *) memory_start;
+ unsigned int size;
/* only text is profiled */
prof_len = (unsigned long) &_etext - (unsigned long) &_stext;
prof_len >>= prof_shift;
- memory_start += prof_len * sizeof(unsigned int);
+
+ size = prof_len * sizeof(unsigned int) + PAGE_SIZE-1;
+ prof_buffer = (unsigned int *) alloc_bootmem(size);
memset(prof_buffer, 0, prof_len * sizeof(unsigned int));
}
- memory_start = kmem_cache_init(memory_start, memory_end);
+ kmem_cache_init();
sti();
calibrate_delay();
#ifdef CONFIG_BLK_DEV_INITRD
+ // FIXME, use the bootmem.h interface.
if (initrd_start && !initrd_below_start_ok && initrd_start < memory_start) {
printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
"disabling it.\n",initrd_start,memory_start);
@@ -501,17 +505,19 @@ asmlinkage void __init start_kernel(void)
#ifdef CONFIG_BINFMT_IRIX
init_inventory();
#endif
- mem_init(memory_start,memory_end);
+ mem_init();
kmem_cache_sizes_init();
#ifdef CONFIG_PROC_FS
proc_root_init();
#endif
- fork_init(memory_end-memory_start);
+ mempages = num_physpages;
+
+ fork_init(mempages);
filescache_init();
dcache_init();
vma_init();
- buffer_init(memory_end-memory_start);
- page_cache_init(memory_end-memory_start);
+ buffer_init(mempages);
+ page_cache_init(mempages);
kiobuf_init();
signals_init();
inode_init();