Commit febe8345 authored by Paul Mundt's avatar Paul Mundt

perf_counter tools: add cpu_relax()/rmb() definitions for sh.

Simple cpu_relax()/rmb() stubs that perf needs, which were inadvertently
omitted from the sh HAVE_PERF_COUNTERS patch.
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 163b2f0b
...@@ -19,6 +19,16 @@ ...@@ -19,6 +19,16 @@
#define cpu_relax() asm volatile("" ::: "memory"); #define cpu_relax() asm volatile("" ::: "memory");
#endif #endif
#ifdef __sh__
#include "../../arch/sh/include/asm/unistd.h"
#if defined(__SH4A__) || defined(__SH5__)
# define rmb() asm volatile("synco" ::: "memory")
#else
# define rmb() asm volatile("" ::: "memory")
#endif
#define cpu_relax() asm volatile("" ::: "memory")
#endif
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
......
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