Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1e028ef authored by Deng-Cheng Zhu's avatar Deng-Cheng Zhu Committed by Ingo Molnar
Browse files

perf, MIPS: Support cross compiling of tools/perf for MIPS



Changes:
 v4: Fix the cosmetic issue of redundant dot-ops
 v3: Change rmb() to use SYNC
 v2: Include mips unistd.h and define rmb()/cpu_relax() in tools/perf/perf.h

Signed-off-by: default avatarDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
Cc: David Daney <ddaney@caviumnetworks.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ad0cf347
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -73,6 +73,18 @@ void get_term_dimensions(struct winsize *ws);
#define cpu_relax()	asm volatile("":::"memory")
#define cpu_relax()	asm volatile("":::"memory")
#endif
#endif


#ifdef __mips__
#include "../../arch/mips/include/asm/unistd.h"
#define rmb()		asm volatile(					\
				".set	mips2\n\t"			\
				"sync\n\t"				\
				".set	mips0"				\
				: /* no output */			\
				: /* no input */			\
				: "memory")
#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>