diff options
author | Harald Koerfgen <hkoerfg@web.de> | 1999-08-09 19:43:13 +0000 |
---|---|---|
committer | Harald Koerfgen <hkoerfg@web.de> | 1999-08-09 19:43:13 +0000 |
commit | f67e4ffc79905482c3b9b8c8dd65197bac7eb508 (patch) | |
tree | c88163a075d06cf625e7f7aa69572144806d1175 /arch/mips/dec | |
parent | 920be6021d3cd30ce10b1423b565f304736bf899 (diff) |
My proposal for non-generic kernels:
o only code for the configured CPU is compiled
and linked (saves ~100k for R3000 kernels!)
o removed a lot of indirect function calls
o removed Ralf's "cowboy patch"
o added sanity check for DECstations (print warning
if the kernel is configured for the wrong CPU)
Diffstat (limited to 'arch/mips/dec')
-rw-r--r-- | arch/mips/dec/prom/init.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/mips/dec/prom/init.c b/arch/mips/dec/prom/init.c index 2cb9da66c..b751e8515 100644 --- a/arch/mips/dec/prom/init.c +++ b/arch/mips/dec/prom/init.c @@ -7,6 +7,7 @@ */ #include <linux/init.h> #include <linux/config.h> +#include <asm/bootinfo.h> #include "prom.h" /* @@ -82,12 +83,31 @@ __initfunc(void which_prom(unsigned long magic, int *prom_vec)) __initfunc(int prom_init(int argc, char **argv, unsigned long magic, int *prom_vec)) { + extern void dec_machine_halt(void); + /* Determine which PROM's we have (and therefore which machine we're on!) */ which_prom(magic, prom_vec); if (magic == REX_PROM_MAGIC) rex_clear_cache(); + /* Were we compiled with the right CPU option? */ +#if defined(CONFIG_CPU_R3000) + if ((mips_cputype == CPU_R4000SC) || (mips_cputype == CPU_R4400SC)) { + prom_printf("Sorry, this kernel is compiled for the wrong CPU type!\n"); + prom_printf("Please recompile with \"CONFIG_CPU_R4x00 = y\"\n"); + dec_machine_halt(); + } +#endif + +#if defined(CONFIG_CPU_R4x00) + if ((mips_cputype == CPU_R3000) || (mips_cputype == CPU_R3000A)) { + prom_printf("Sorry, this kernel is compiled for the wrong CPU type!\n"); + prom_printf("Please recompile with \"CONFIG_CPU_R3000 = y\"\n"); + dec_machine_halt(); + } +#endif + prom_meminit(magic); prom_identify_arch(magic); prom_init_cmdline(argc, argv, magic); |