Re: [tip:perf/core] perf tools, Alpha: Add Alpha support to perf.h

From: Peter Zijlstra
Date: Tue Nov 10 2009 - 16:22:06 EST


On Mon, 2009-10-26 at 14:08 +0200, Pekka Enberg wrote:
> > +#ifdef __alpha__
> > +#include "../../arch/alpha/include/asm/unistd.h"
> > +#define rmb() asm volatile("mb" ::: "memory")
> > +#define cpu_relax() asm volatile("" ::: "memory")
> > +#endif
>
> OK, I'll bite. We tell userspace developers not to include kernel
> headers. Why is it okay for perf to do it (especially for something
> that's in asm)?

The reason we take the explicit arch header is because we need the perf
syscall thingy, which isn't yet in the installed system unistd.h because
that's probably some ancient version.

Once distro's have had perf enabled kernels for long enough that all of
userspace has the syscall bits we can remove it.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/