Skip to content

Commit

Permalink
perf tools: Fix include for non x86 architectures
Browse files Browse the repository at this point in the history
Commit 71ae8aac ("lib: introduce arch optimized hash library") added an
include to <linux/hash.h> for setting up an architecture specific fast
hash.

Since perf includes directly the non-uapi kernel header, it cannot find
<asm/hash.h> on non-x86 and thus prevents perf to be compiled on every
architecture other than x86.

The problem is the inclusion of <asm/hash.h> in hash.h that results in
the following error originating from util/evlist.c:

  fatal error: asm/hash.h: No such file or directory

This commit simply adds an empty <asm/hash.h> stub/file to fix the
compile issue on non-x86 architectures.

As perf does not use any of these new functions, it fixes the
compilation and therefore seems to be the most appropriate solution to
go with.

Signed-off-by: Francesco Fusco <ffusco@redhat.com>
Link: http://lkml.kernel.org/r/2cf8143aad65a6aa6fe30325ef8a65847141afa2.1390829373.git.ffusco@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Francesco Fusco authored and Arnaldo Carvalho de Melo committed Jan 31, 2014
1 parent f428ebd commit 6a02652
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/perf/util/include/asm/hash.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __ASM_GENERIC_HASH_H
#define __ASM_GENERIC_HASH_H

/* Stub */

#endif /* __ASM_GENERIC_HASH_H */

0 comments on commit 6a02652

Please sign in to comment.