summaryrefslogtreecommitdiff
path: root/arch/arc/kernel/time.c
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-03-07 14:36:09 +0300
committerVineet Gupta <vgupta@synopsys.com>2015-06-19 15:39:24 +0300
commit565a9b497c5103a91027d95b9f3392c035703774 (patch)
tree00ee52063717660617951195d768f287c1c828a0 /arch/arc/kernel/time.c
parent742f8af6cb35cb07882ee13aed8d09d6f1b1f15c (diff)
downloadlinux-565a9b497c5103a91027d95b9f3392c035703774.tar.xz
ARC: RIP broken 64bit RTSC
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/time.c')
-rw-r--r--arch/arc/kernel/time.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/arch/arc/kernel/time.c b/arch/arc/kernel/time.c
index dbe74f418019..9307f87f2572 100644
--- a/arch/arc/kernel/time.c
+++ b/arch/arc/kernel/time.c
@@ -26,6 +26,7 @@
* while TIMER1 for free running (clocksource)
*
* Newer ARC700 cores have 64bit clk fetching RTSC insn, preferred over TIMER1
+ * which however is currently broken
*/
#include <linux/spinlock.h>
@@ -59,52 +60,6 @@
/********** Clock Source Device *********/
-#ifdef CONFIG_ARC_HAS_RTSC
-
-int arc_counter_setup(void)
-{
- /*
- * For SMP this needs to be 0. However Kconfig glue doesn't
- * enable this option for SMP configs
- */
- return 1;
-}
-
-static cycle_t arc_counter_read(struct clocksource *cs)
-{
- unsigned long flags;
- union {
-#ifdef CONFIG_CPU_BIG_ENDIAN
- struct { u32 high, low; };
-#else
- struct { u32 low, high; };
-#endif
- cycle_t full;
- } stamp;
-
- flags = arch_local_irq_save();
-
- __asm__ __volatile(
- " .extCoreRegister tsch, 58, r, cannot_shortcut \n"
- " rtsc %0, 0 \n"
- " mov %1, 0 \n"
- : "=r" (stamp.low), "=r" (stamp.high));
-
- arch_local_irq_restore(flags);
-
- return stamp.full;
-}
-
-static struct clocksource arc_counter = {
- .name = "ARC RTSC",
- .rating = 300,
- .read = arc_counter_read,
- .mask = CLOCKSOURCE_MASK(32),
- .flags = CLOCK_SOURCE_IS_CONTINUOUS,
-};
-
-#else /* !CONFIG_ARC_HAS_RTSC */
-
static bool is_usable_as_clocksource(void)
{
#ifdef CONFIG_SMP
@@ -139,8 +94,6 @@ static struct clocksource arc_counter = {
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
-#endif
-
/********** Clock Event Device *********/
/*