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 @@ | |||
| 139 | #include <asm/system.h> | 139 | #include <asm/system.h> |
| 140 | #include <asm/gdb-stub.h> | 140 | #include <asm/gdb-stub.h> |
| 141 | #include <asm/inst.h> | 141 | #include <asm/inst.h> |
| 142 | #include <asm/smp.h> | ||
| 143 | 142 | ||
| 144 | /* | 143 | /* |
| 145 | * external low-level support routines | 144 | * external low-level support routines |
| @@ -656,6 +655,7 @@ void set_async_breakpoint(unsigned long *epc) | |||
| 656 | *epc = (unsigned long)async_breakpoint; | 655 | *epc = (unsigned long)async_breakpoint; |
| 657 | } | 656 | } |
| 658 | 657 | ||
| 658 | #ifdef CONFIG_SMP | ||
| 659 | static void kgdb_wait(void *arg) | 659 | static void kgdb_wait(void *arg) |
| 660 | { | 660 | { |
| 661 | unsigned flags; | 661 | unsigned flags; |
| @@ -668,6 +668,7 @@ static void kgdb_wait(void *arg) | |||
| 668 | 668 | ||
| 669 | local_irq_restore(flags); | 669 | local_irq_restore(flags); |
| 670 | } | 670 | } |
| 671 | #endif | ||
| 671 | 672 | ||
| 672 | /* | 673 | /* |
| 673 | * GDB stub needs to call kgdb_wait on all processor with interrupts | 674 | * 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 @@ | |||
| 15 | #include <asm/time.h> | 15 | #include <asm/time.h> |
| 16 | 16 | ||
| 17 | DEFINE_SPINLOCK(i8253_lock); | 17 | DEFINE_SPINLOCK(i8253_lock); |
| 18 | EXPORT_SYMBOL(i8253_lock); | ||
| 18 | 19 | ||
| 19 | /* | 20 | /* |
| 20 | * Initialize the PIT timer. | 21 | * 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) | |||
| 157 | { | 157 | { |
| 158 | plat_time_init(); | 158 | plat_time_init(); |
| 159 | 159 | ||
| 160 | if (mips_clockevent_init() || !cpu_has_mfc0_count_bug()) | 160 | if (!mips_clockevent_init() || !cpu_has_mfc0_count_bug()) |
| 161 | init_mips_clocksource(); | 161 | init_mips_clocksource(); |
| 162 | } | 162 | } |
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) | |||
| 262 | /* Find some VPE program space */ | 262 | /* Find some VPE program space */ |
| 263 | static void *alloc_progmem(unsigned long len) | 263 | static void *alloc_progmem(unsigned long len) |
| 264 | { | 264 | { |
| 265 | void *addr; | ||
| 266 | |||
| 265 | #ifdef CONFIG_MIPS_VPE_LOADER_TOM | 267 | #ifdef CONFIG_MIPS_VPE_LOADER_TOM |
| 266 | /* this means you must tell linux to use less memory than you physically have */ | 268 | /* |
| 267 | return pfn_to_kaddr(max_pfn); | 269 | * This means you must tell Linux to use less memory than you |
| 270 | * physically have, for example by passing a mem= boot argument. | ||
| 271 | */ | ||
| 272 | addr = pfn_to_kaddr(max_pfn); | ||
| 273 | memset(addr, 0, len); | ||
| 268 | #else | 274 | #else |
| 269 | // simple grab some mem for now | 275 | /* simple grab some mem for now */ |
| 270 | return kmalloc(len, GFP_KERNEL); | 276 | addr = kzalloc(len, GFP_KERNEL); |
| 271 | #endif | 277 | #endif |
| 278 | |||
| 279 | return addr; | ||
| 272 | } | 280 | } |
| 273 | 281 | ||
| 274 | static void release_progmem(void *ptr) | 282 | static void release_progmem(void *ptr) |
| @@ -884,9 +892,10 @@ static int vpe_elfload(struct vpe * v) | |||
| 884 | } | 892 | } |
| 885 | 893 | ||
| 886 | v->load_addr = alloc_progmem(mod.core_size); | 894 | v->load_addr = alloc_progmem(mod.core_size); |
| 887 | memset(v->load_addr, 0, mod.core_size); | 895 | if (!v->load_addr) |
| 896 | return -ENOMEM; | ||
| 888 | 897 | ||
| 889 | printk("VPE loader: loading to %p\n", v->load_addr); | 898 | pr_info("VPE loader: loading to %p\n", v->load_addr); |
| 890 | 899 | ||
| 891 | if (relocate) { | 900 | if (relocate) { |
| 892 | for (i = 0; i < hdr->e_shnum; i++) { | 901 | for (i = 0; i < hdr->e_shnum; i++) { |
