Re: [PATCH] Add minimal support for software performance countersfor ia64

From: William Cohen
Date: Thu Aug 20 2009 - 17:19:44 EST


Peter Zijlstra wrote:
> On Wed, 2009-08-19 at 15:04 -0400, William Cohen wrote:
>> Peter Zijlstra wrote:
>>> On Wed, 2009-08-19 at 12:04 -0400, William Cohen wrote:
>>>> +#ifdef __ia64__
>>>> +#include "../../arch/ia64/include/asm/unistd.h"
>>>> +#define rmb() asm volatile("" ::: "memory")
>>>> +#define cpu_relax() asm volatile("" ::: "memory");
>>>> +#endif
>>> Surely the itanic has a real memory barrier? The kernel seems to use
>>> something along the lines of mf.
>>>
>>> Also, cpu_relax() seems to end up being asm volatile("hint @pause" :::
>>> "memory"), although we don't seem to have an actual user of cpu_relax()
>>> in perf atm.
>>>
>>>
>>>
>> Peter, thanks for the comment. I took a look at the rmb() and cpu_relax() code
>> in the kernel and revised the patch with the appropriate defines
>
> Looks good now, thanks!
>

When looking through the patch today I realized the new perf_counter.h was
placed in include/asm-ia64. It should be placed in
arch/ia64/include/asm/perf_counter.h.

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