summaryrefslogtreecommitdiff
path: root/arch/tile/kernel/smp.c
diff options
context:
space:
mode:
authorTony Lu <zlu@tilera.com>2013-08-09 19:08:57 (GMT)
committerChris Metcalf <cmetcalf@tilera.com>2013-08-30 15:55:53 (GMT)
commit3fa17c395bb0c358745fbe0c8aa039d6cdac1735 (patch)
treec12f999476581bf31929c4d6a7697efe7062d904 /arch/tile/kernel/smp.c
parenta61fd5e3662d576998d72f80376f23b6ef083d6e (diff)
downloadlinux-fsl-qoriq-3fa17c395bb0c358745fbe0c8aa039d6cdac1735.tar.xz
tile: support kprobes on tilegx
This change includes support for Kprobes, Jprobes and Return Probes. Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Tony Lu <zlu@tilera.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/kernel/smp.c')
-rw-r--r--arch/tile/kernel/smp.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/tile/kernel/smp.c b/arch/tile/kernel/smp.c
index 6cc520d..0ae1c59 100644
--- a/arch/tile/kernel/smp.c
+++ b/arch/tile/kernel/smp.c
@@ -20,6 +20,7 @@
#include <linux/irq.h>
#include <linux/module.h>
#include <asm/cacheflush.h>
+#include <asm/homecache.h>
HV_Topology smp_topology __write_once;
EXPORT_SYMBOL(smp_topology);
@@ -167,9 +168,16 @@ static void ipi_flush_icache_range(void *info)
void flush_icache_range(unsigned long start, unsigned long end)
{
struct ipi_flush flush = { start, end };
- preempt_disable();
- on_each_cpu(ipi_flush_icache_range, &flush, 1);
- preempt_enable();
+
+ /* If invoked with irqs disabled, we can not issue IPIs. */
+ if (irqs_disabled())
+ flush_remote(0, HV_FLUSH_EVICT_L1I, NULL, 0, 0, 0,
+ NULL, NULL, 0);
+ else {
+ preempt_disable();
+ on_each_cpu(ipi_flush_icache_range, &flush, 1);
+ preempt_enable();
+ }
}