X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fmips%2Fkernel%2Fsetup.c;h=bcf1b10e518f8be4b4302e13bb3186d1e1773438;hb=55308c3712f56279d5547ef6e97d365ac3ab9e6d;hp=d86affa212787476759a9077b4b02f577de0e33f;hpb=ba77df570c6710c9c19b31e0e48e4bcdf31cefe8;p=pandora-kernel.git diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index d86affa21278..bcf1b10e518f 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -257,10 +258,6 @@ static inline int parse_rd_cmdline(unsigned long* rd_start, unsigned long* rd_en return 0; } -#define PFN_UP(x) (((x) + PAGE_SIZE - 1) >> PAGE_SHIFT) -#define PFN_DOWN(x) ((x) >> PAGE_SHIFT) -#define PFN_PHYS(x) ((x) << PAGE_SHIFT) - #define MAXMEM HIGHMEM_START #define MAXMEM_PFN PFN_DOWN(MAXMEM) @@ -447,21 +444,10 @@ static inline void resource_init(void) { int i; -#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) - /* - * The 64bit code in 32bit object format trick can't represent - * 64bit wide relocations for linker script symbols. - */ - code_resource.start = CPHYSADDR(&_text); - code_resource.end = CPHYSADDR(&_etext) - 1; - data_resource.start = CPHYSADDR(&_etext); - data_resource.end = CPHYSADDR(&_edata) - 1; -#else code_resource.start = virt_to_phys(&_text); code_resource.end = virt_to_phys(&_etext) - 1; data_resource.start = virt_to_phys(&_etext); data_resource.end = virt_to_phys(&_edata) - 1; -#endif /* * Request address space for all standard RAM. @@ -504,10 +490,6 @@ static inline void resource_init(void) } } -#undef PFN_UP -#undef PFN_DOWN -#undef PFN_PHYS - #undef MAXMEM #undef MAXMEM_PFN @@ -540,11 +522,17 @@ void __init setup_arch(char **cmdline_p) sparse_init(); paging_init(); resource_init(); +#ifdef CONFIG_SMP + plat_smp_setup(); +#endif } int __init fpu_disable(char *s) { - cpu_data[0].options &= ~MIPS_CPU_FPU; + int i; + + for (i = 0; i < NR_CPUS; i++) + cpu_data[i].options &= ~MIPS_CPU_FPU; return 1; }