Kevin,
Patch was applied.
Thanks for you contributions.
On Wed, Sep 05, 2007 at 09:11:40AM -0500, Kevin Corry wrote:
> Add macros for the bit-fields in the pm_status register.
>
> Signed-off-by: Kevin Corry <[EMAIL PROTECTED]>
> ---
>
> arch/powerpc/perfmon/perfmon_cell.c | 6 ++++--
> include/asm-powerpc/cell-pmu.h | 4 ++++
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/perfmon/perfmon_cell.c
> b/arch/powerpc/perfmon/perfmon_cell.c
> index 0a554fc..e0a3976 100644
> --- a/arch/powerpc/perfmon/perfmon_cell.c
> +++ b/arch/powerpc/perfmon/perfmon_cell.c
> @@ -511,11 +511,13 @@ static void pfm_cell_irq_handler(struct pt_regs *regs,
> struct pfm_context *ctx)
> */
> ctx_arch->last_read_updated = 1;
>
> - if (last_read_pm_status & 0xFF000000)
> + if (last_read_pm_status & CBE_PM_ALL_OVERFLOW_INTR)
> /* At least one counter overflowed. */
> pfm_interrupt_handler(instruction_pointer(regs), regs);
>
> - if (last_read_pm_status & 0x00E00000)
> + if (last_read_pm_status & (CBE_PM_INTERVAL_INTR |
> + CBE_PM_TRACE_BUFFER_FULL_INTR |
> + CBE_PM_TRACE_BUFFER_UNDERFLOW_INTR))
> /* Trace buffer or interval timer overflow. */
> handle_trace_buffer_interrupts(instruction_pointer(regs),
> regs, ctx, last_read_pm_status);
> diff --git a/include/asm-powerpc/cell-pmu.h b/include/asm-powerpc/cell-pmu.h
> index 57b2e2f..981db26 100644
> --- a/include/asm-powerpc/cell-pmu.h
> +++ b/include/asm-powerpc/cell-pmu.h
> @@ -62,6 +62,10 @@
> /* Macros for the pm_status register. */
> #define CBE_PM_CTR_OVERFLOW_INTR(ctr) (1 << (31 - ((ctr) & 7)))
> #define CBE_PM_OVERFLOW_CTRS(pm_status) (((pm_status) >> 24) & 0xff)
> +#define CBE_PM_ALL_OVERFLOW_INTR 0xff000000
> +#define CBE_PM_INTERVAL_INTR 0x00800000
> +#define CBE_PM_TRACE_BUFFER_FULL_INTR 0x00400000
> +#define CBE_PM_TRACE_BUFFER_UNDERFLOW_INTR 0x00200000
>
> enum pm_reg_name {
> group_control,
> _______________________________________________
> perfmon mailing list
> [email protected]
> http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
--
-Stephane
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/