diff options
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/gdb-stub.c | 3 | ||||
-rw-r--r-- | arch/mips/kernel/i8253.c | 1 | ||||
-rw-r--r-- | arch/mips/kernel/time.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/vpe.c | 21 |
4 files changed, 19 insertions, 8 deletions
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c index 3191afa29ad8..25f4eab8ea9c 100644 --- a/arch/mips/kernel/gdb-stub.c +++ b/arch/mips/kernel/gdb-stub.c @@ -139,7 +139,6 @@ #include <asm/system.h> #include <asm/gdb-stub.h> #include <asm/inst.h> -#include <asm/smp.h> /* * external low-level support routines @@ -656,6 +655,7 @@ void set_async_breakpoint(unsigned long *epc) *epc = (unsigned long)async_breakpoint; } +#ifdef CONFIG_SMP static void kgdb_wait(void *arg) { unsigned flags; @@ -668,6 +668,7 @@ static void kgdb_wait(void *arg) local_irq_restore(flags); } +#endif /* * GDB stub needs to call kgdb_wait on all processor with interrupts diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c index fc4aa07b6d35..38fa1a194bf4 100644 --- a/arch/mips/kernel/i8253.c +++ b/arch/mips/kernel/i8253.c @@ -15,6 +15,7 @@ #include <asm/time.h> DEFINE_SPINLOCK(i8253_lock); +EXPORT_SYMBOL(i8253_lock); /* * Initialize the PIT timer. diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 9f85d4cecc5b..b45a7093ca2d 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c @@ -157,6 +157,6 @@ void __init time_init(void) { plat_time_init(); - if (mips_clockevent_init() || !cpu_has_mfc0_count_bug()) + if (!mips_clockevent_init() || !cpu_has_mfc0_count_bug()) init_mips_clocksource(); } diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index eed2dc4273e0..39804c584edd 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c @@ -262,13 +262,21 @@ void dump_mtregs(void) /* Find some VPE program space */ static void *alloc_progmem(unsigned long len) { + void *addr; + #ifdef CONFIG_MIPS_VPE_LOADER_TOM - /* this means you must tell linux to use less memory than you physically have */ - return pfn_to_kaddr(max_pfn); + /* + * This means you must tell Linux to use less memory than you + * physically have, for example by passing a mem= boot argument. + */ + addr = pfn_to_kaddr(max_pfn); + memset(addr, 0, len); #else - // simple grab some mem for now - return kmalloc(len, GFP_KERNEL); + /* simple grab some mem for now */ + addr = kzalloc(len, GFP_KERNEL); #endif + + return addr; } static void release_progmem(void *ptr) @@ -884,9 +892,10 @@ static int vpe_elfload(struct vpe * v) } v->load_addr = alloc_progmem(mod.core_size); - memset(v->load_addr, 0, mod.core_size); + if (!v->load_addr) + return -ENOMEM; - printk("VPE loader: loading to %p\n", v->load_addr); + pr_info("VPE loader: loading to %p\n", v->load_addr); if (relocate) { for (i = 0; i < hdr->e_shnum; i++) { |