Commit 5f57eb3f authored by Philippe Gerum's avatar Philippe Gerum
Browse files

cobalt/arm: upgrade I-pipe support

parent e95e7563
......@@ -1635,7 +1635,7 @@ index bb28af7..780ca50 100644
static inline void sp804_clockevents_init(void __iomem *base, unsigned int irq, const char *name)
diff --git a/arch/arm/include/asm/ipipe.h b/arch/arm/include/asm/ipipe.h
new file mode 100644
index 0000000..77969f4
index 0000000..eccfbcb
--- /dev/null
+++ b/arch/arm/include/asm/ipipe.h
@@ -0,0 +1,297 @@
......@@ -1685,7 +1685,7 @@ index 0000000..77969f4
+#include <linux/jump_label.h>
+#include <linux/ipipe_trace.h>
+
+#define IPIPE_CORE_RELEASE 2
+#define IPIPE_CORE_RELEASE 3
+
+struct ipipe_domain;
+struct timekeeper;
......@@ -4277,7 +4277,7 @@ index 0000000..ffe02fe
+EXPORT_SYMBOL_GPL(cpu_architecture);
diff --git a/arch/arm/kernel/ipipe_tsc.c b/arch/arm/kernel/ipipe_tsc.c
new file mode 100644
index 0000000..d122b39
index 0000000..aa9571e
--- /dev/null
+++ b/arch/arm/kernel/ipipe_tsc.c
@@ -0,0 +1,214 @@
......@@ -4409,7 +4409,7 @@ index 0000000..d122b39
+
+ default:
+ unimplemented:
+ printk("I-pipel: Unimplemented tsc configuration, "
+ printk("I-pipe: Unimplemented tsc configuration, "
+ "type: %d, mask: 0x%08Lx\n", info->type, info->u.mask);
+ BUG();
+ }
......@@ -4446,8 +4446,8 @@ index 0000000..d122b39
+
+ wrap_ms *= HZ / 2;
+ do_div(wrap_ms, 1000);
+ if (wrap_ms > 0xffffffff)
+ wrap_ms = 0xffffffff;
+ if (wrap_ms > 0x7fffffff)
+ wrap_ms = 0x7fffffff;
+ ipipe_tsc_update_timer.data = wrap_ms;
+ ipipe_tsc_update_timer.function = __ipipe_tsc_update_fn;
+ mod_timer(&ipipe_tsc_update_timer,
......@@ -10738,7 +10738,7 @@ index f6e4d56..e2904aa 100644
/*
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 0aa135d..b13608c 100644
index 0aa135d..c48e8f7 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -17,6 +17,8 @@
......@@ -10760,7 +10760,7 @@ index 0aa135d..b13608c 100644
{
unsigned long ctrl;
@@ -146,6 +147,49 @@ static __always_inline irqreturn_t timer_handler(const int access,
@@ -146,6 +147,52 @@ static __always_inline irqreturn_t timer_handler(const int access,
if (ctrl & ARCH_TIMER_CTRL_IT_STAT) {
ctrl |= ARCH_TIMER_CTRL_IT_MASK;
arch_timer_reg_write(access, ARCH_TIMER_REG_CTRL, ctrl, evt);
......@@ -10806,11 +10806,14 @@ index 0aa135d..b13608c 100644
+ itimer->irq = irq;
+#endif /* CONFIG_IPIPE */
+ stolen:
+ __ipipe_tsc_update();
+ /*
+ * This is a 64bit clock source, no need for TSC
+ * update.
+ */
evt->event_handler(evt);
return IRQ_HANDLED;
}
@@ -157,28 +201,28 @@ static irqreturn_t arch_timer_handler_virt(int irq, void *dev_id)
@@ -157,28 +204,28 @@ static irqreturn_t arch_timer_handler_virt(int irq, void *dev_id)
{
struct clock_event_device *evt = dev_id;
......@@ -10843,7 +10846,7 @@ index 0aa135d..b13608c 100644
}
static __always_inline void timer_set_mode(const int access, int mode,
@@ -280,6 +324,18 @@ static void __arch_timer_setup(unsigned type,
@@ -280,6 +327,18 @@ static void __arch_timer_setup(unsigned type,
clk->set_mode = arch_timer_set_mode_phys;
clk->set_next_event = arch_timer_set_next_event_phys;
}
......@@ -10862,21 +10865,17 @@ index 0aa135d..b13608c 100644
} else {
clk->features |= CLOCK_EVT_FEAT_DYNIRQ;
clk->name = "arch_mem_timer";
@@ -342,6 +398,13 @@ static void arch_counter_set_user_access(void)
@@ -342,6 +401,9 @@ static void arch_counter_set_user_access(void)
/* Enable user access to the virtual counter */
cntkctl |= ARCH_TIMER_USR_VCT_ACCESS_EN;
+#ifdef CONFIG_IPIPE
+ cntkctl |= ARCH_TIMER_USR_PCT_ACCESS_EN;
+#endif
+
+#ifdef CONFIG_IPIPE
+ cntkctl |= ARCH_TIMER_USR_PCT_ACCESS_EN;
+#endif
arch_timer_set_cntkctl(cntkctl);
}
@@ -483,6 +546,11 @@ static void __init arch_counter_register(unsigned type)
@@ -483,6 +545,11 @@ static void __init arch_counter_register(unsigned type)
clocksource_counter.name = "arch_mem_counter";
}
......@@ -23587,18 +23586,6 @@ index 1afec32..5803111 100644
goto out;
/*
diff --git a/mm/Kconfig b/mm/Kconfig
index 390214d..0ff2650 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -410,6 +410,7 @@ config NOMMU_INITIAL_TRIM_EXCESS
config TRANSPARENT_HUGEPAGE
bool "Transparent Hugepage Support"
depends on HAVE_ARCH_TRANSPARENT_HUGEPAGE
+ depends on !IPIPE
select COMPACTION
help
Transparent Hugepages allows the kernel to use huge pages and
diff --git a/mm/memory.c b/mm/memory.c
index 2a9e098..46ec4cd 100644
--- a/mm/memory.c
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment