Flexible I/O Tester development
 help / color / mirror / Atom feed
* [PATCH] implement get_cpu_clock() for s390/s390x
@ 2012-12-30 22:03 Dan Horák
  2013-01-01  9:57 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Horák @ 2012-12-30 22:03 UTC (permalink / raw)
  To: fio; +Cc: Dan Horák

---
 arch/arch-s390.h |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/arch-s390.h b/arch/arch-s390.h
index fe51791..bcd9163 100644
--- a/arch/arch-s390.h
+++ b/arch/arch-s390.h
@@ -22,4 +22,22 @@
 #define read_barrier()	asm volatile("bcr 15,0" : : : "memory")
 #define write_barrier()	asm volatile("bcr 15,0" : : : "memory")
 
+static inline unsigned long long get_cpu_clock(void)
+{
+	unsigned long long clk;
+
+	__asm__ __volatile__("stck %0" : "=Q" (clk) : : "cc");
+	return clk;
+}
+
+#define ARCH_HAVE_INIT
+extern int tsc_reliable;
+static inline int arch_init(char *envp[])
+{
+	tsc_reliable = 1;
+	return 0;
+}
+
+#define ARCH_HAVE_CPU_CLOCK
+
 #endif
-- 
1.7.7.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-01  9:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-30 22:03 [PATCH] implement get_cpu_clock() for s390/s390x Dan Horák
2013-01-01  9:57 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox