diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-20 00:09:43 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-20 00:09:43 +0100 |
commit | b31a3bc3dbd2f42b61674d37de7f46022e1f6846 (patch) | |
tree | f497661f34009eff1455df8729ce750fdddad7e5 /arch/sh/kernel/smp.c | |
parent | Merge tag 'powerpc-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/po... (diff) | |
parent | sched/preempt, sh: kmap_coherent relies on disabled preemption (diff) | |
download | linux-b31a3bc3dbd2f42b61674d37de7f46022e1f6846.tar.xz linux-b31a3bc3dbd2f42b61674d37de7f46022e1f6846.zip |
Merge tag 'tag-sh-for-4.6' of git://git.libc.org/linux-sh
Pull arch/sh updates from Rich Felker:
"This includes minor cleanups, a fix for a crash that likely affects
all sh models with MMU, and introduction of a framework for boards
described by device tree, which sets the stage for future J2 support"
* tag 'tag-sh-for-4.6' of git://git.libc.org/linux-sh:
sched/preempt, sh: kmap_coherent relies on disabled preemption
sh: add SMP method selection to device tree pseudo-board
sh: add device tree support and generic board using device tree
sh: remove arch-specific localtimer and use generic one
sh: make MMU-specific SMP code conditional on CONFIG_MMU
sh: provide unified syscall trap compatible with all SH models
sh: New gcc support
sh: Disable trace for kernel uncompressing.
sh: Use generic clkdev.h header
Diffstat (limited to 'arch/sh/kernel/smp.c')
-rw-r--r-- | arch/sh/kernel/smp.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 13f633add29a..38e7860845db 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c @@ -22,6 +22,7 @@ #include <linux/interrupt.h> #include <linux/sched.h> #include <linux/atomic.h> +#include <linux/clockchips.h> #include <asm/processor.h> #include <asm/mmu_context.h> #include <asm/smp.h> @@ -141,16 +142,13 @@ int __cpu_disable(void) migrate_irqs(); /* - * Stop the local timer for this CPU. - */ - local_timer_stop(cpu); - - /* * Flush user cache and TLB mappings, and then remove this CPU * from the vm mask set of all processes. */ flush_cache_all(); +#ifdef CONFIG_MMU local_flush_tlb_all(); +#endif clear_tasks_mm_cpumask(cpu); @@ -183,8 +181,10 @@ asmlinkage void start_secondary(void) atomic_inc(&mm->mm_count); atomic_inc(&mm->mm_users); current->active_mm = mm; +#ifdef CONFIG_MMU enter_lazy_tlb(mm, current); local_flush_tlb_all(); +#endif per_cpu_trap_init(); @@ -194,8 +194,6 @@ asmlinkage void start_secondary(void) local_irq_enable(); - /* Enable local timers */ - local_timer_setup(cpu); calibrate_delay(); smp_store_cpu_info(cpu); @@ -285,7 +283,8 @@ void arch_send_call_function_single_ipi(int cpu) mp_ops->send_ipi(cpu, SMP_MSG_FUNCTION_SINGLE); } -void smp_timer_broadcast(const struct cpumask *mask) +#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST +void tick_broadcast(const struct cpumask *mask) { int cpu; @@ -296,9 +295,10 @@ void smp_timer_broadcast(const struct cpumask *mask) static void ipi_timer(void) { irq_enter(); - local_timer_interrupt(); + tick_receive_broadcast(); irq_exit(); } +#endif void smp_message_recv(unsigned int msg) { @@ -312,9 +312,11 @@ void smp_message_recv(unsigned int msg) case SMP_MSG_FUNCTION_SINGLE: generic_smp_call_function_single_interrupt(); break; +#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST case SMP_MSG_TIMER: ipi_timer(); break; +#endif default: printk(KERN_WARNING "SMP %d: %s(): unknown IPI %d\n", smp_processor_id(), __func__, msg); @@ -328,6 +330,8 @@ int setup_profiling_timer(unsigned int multiplier) return 0; } +#ifdef CONFIG_MMU + static void flush_tlb_all_ipi(void *info) { local_flush_tlb_all(); @@ -467,3 +471,5 @@ void flush_tlb_one(unsigned long asid, unsigned long vaddr) smp_call_function(flush_tlb_one_ipi, (void *)&fd, 1); local_flush_tlb_one(asid, vaddr); } + +#endif |