Messages in this thread | | | Subject | Re: [tip:perf/core] perf tools, Alpha: Add Alpha support to perf.h | From | Peter Zijlstra <> | Date | Tue, 10 Nov 2009 22:21:36 +0100 |
| |
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.
| |