10 #include <linux/module.h>
14 #include <linux/sched.h>
19 #include <linux/errno.h>
26 #include <linux/slab.h>
28 #include <asm/cacheflush.h>
30 #include <asm/mmu_context.h>
31 #include <asm/pgtable.h>
32 #include <asm/pgalloc.h>
33 #include <asm/processor.h>
34 #include <asm/ptrace.h>
45 #ifdef CONFIG_ICACHE_FLUSH_L1
46 unsigned long blackfin_iflush_l1_entry[
NR_CPUS];
71 #define BFIN_IPI_MSGQ_LEN 5
81 static void ipi_cpu_stop(
unsigned int cpu)
83 spin_lock(&stop_lock);
86 spin_unlock(&stop_lock);
96 static void ipi_flush_icache(
void *
info)
102 (
unsigned long)fdata +
sizeof(*fdata));
123 static irqreturn_t ipi_handler_int0(
int irq,
void *dev_instance)
135 struct clock_event_device *
evt = &
per_cpu(coretmr_events, cpu);
136 evt->event_handler(evt);
139 static irqreturn_t ipi_handler_int1(
int irq,
void *dev_instance)
143 unsigned long pending;
150 while ((pending =
xchg(&bfin_ipi_data->
bits, 0)) != 0) {
162 generic_smp_call_function_interrupt();
166 generic_smp_call_function_single_interrupt();
180 static void bfin_ipi_init(
void)
185 bfin_ipi_data = &
per_cpu(bfin_ipi, cpu);
186 bfin_ipi_data->
bits = 0;
187 bfin_ipi_data->
count = 0;
200 bfin_ipi_data = &
per_cpu(bfin_ipi, cpu);
203 bfin_ipi_data->
count++;
244 if (!cpumask_empty(&callmap))
265 static void __cpuinit setup_secondary(
unsigned int cpu)
290 #ifdef CONFIG_DEBUG_DOUBLEFAULT
319 setup_secondary(cpu);
330 notify_cpu_starting(cpu);
355 unsigned long bogosum = 0;
362 "(%lu.%02lu BogoMIPS).\n",
364 bogosum / (500000/
HZ),
365 (bogosum / (5000/
HZ)) % 100);
370 smp_flush_data.start =
start;
371 smp_flush_data.end =
end;
380 #ifdef __ARCH_SYNC_CORE_ICACHE
381 unsigned long icache_invld_count[
NR_CPUS];
382 void resync_core_icache(
void)
386 icache_invld_count[
cpu]++;
392 #ifdef __ARCH_SYNC_CORE_DCACHE
393 unsigned long dcache_invld_count[
NR_CPUS];
394 unsigned long barrier_mask
__attribute__ ((__section__(
".l2.bss")));
396 void resync_core_dcache(
void)
400 dcache_invld_count[
cpu]++;
406 #ifdef CONFIG_HOTPLUG_CPU