Re: [PATCH 1/2] perf tools: allow building for ARM

From: Ingo Molnar
Date: Fri Dec 11 2009 - 05:41:42 EST



* David Miller <davem@xxxxxxxxxxxxx> wrote:

> From: Ingo Molnar <mingo@xxxxxxx>
> Date: Fri, 11 Dec 2009 11:23:16 +0100
>
> >
> > * Jamie Iles <jamie.iles@xxxxxxxxxxxx> wrote:
> >
> >> +#ifdef __arm__
> >> +#include "../../arch/arm/include/asm/unistd.h"
> >> +#define rmb() asm volatile("":::"memory")
> >> +#define cpu_relax() asm volatile("":::"memory")
> >> +#endif
> >
> > cpu_relax() looks fine, but rmb() seems not to match the one that can be
> > found in arch/arm/:
>
> I think he did it this way so it can compile in the meantime, and that
> doing it right requires runtime cpu detection to select which barrier
> instruction is even available on the current ARM cpu.

Yeah. We can merge a quick patch for it if runtime detection is
difficult - but if then such a patch should err on the side of using the
barrier instruction unconditionally - even if this causes perf to
segfault on certain (older? UP configured?) ARM cores.

Ingo
--
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/