Hello,

I updated the patch for the latest git tree.

Thanks,
Takashi Yamamoto
--------------------------------------------------------
This patch adds not_dfl_ctxsw flag to context flags.
It is used not to set TIF_PERFMON_CTXSW.

Signed-off-by: Takashi Yamamoto <[EMAIL PROTECTED]>
---
 arch/powerpc/perfmon/perfmon_cell.c |    2 ++
 include/asm-powerpc/perfmon.h       |    8 ++++++++
 include/linux/perfmon_kern.h        |    3 ++-
 perfmon/perfmon_attach.c            |    4 +++-
 4 files changed, 15 insertions(+), 2 deletions(-)

--- a/arch/powerpc/perfmon/perfmon_cell.c
+++ b/arch/powerpc/perfmon/perfmon_cell.c
@@ -1220,6 +1220,8 @@ static void pfm_cell_get_ovfl_pmds(struc
  **/
 static int pfm_cell_create_context(struct pfm_context *ctx, u32 ctx_flags)
 {
+       ctx->flags.not_dflt_ctxsw =
+               (ctx_flags & PFM_FL_CELL_SPE_FOLLOW) ? 1:0;
        return 0;
 }
 
--- a/include/asm-powerpc/perfmon.h
+++ b/include/asm-powerpc/perfmon.h
@@ -30,4 +30,12 @@
 #define PFM_ARCH_MAX_PMCS      (256+64) /* 256 HW 64 SW */
 #define PFM_ARCH_MAX_PMDS      (256+64) /* 256 HW 64 SW */
 
+/*
+ * context flags (ctx_flags)
+ *
+ * bits[00-15]: generic flags
+ * bits[16-31]: arch-specific flags
+ */
+#define PFM_FL_CELL_SPE_FOLLOW 0x10000
+
 #endif /* _ASM_POWERPC_PERFMON_H_ */
--- a/include/linux/perfmon_kern.h
+++ b/include/linux/perfmon_kern.h
@@ -118,7 +118,8 @@ struct pfm_context_flags {
        unsigned int can_restart:8;     /* allowed to issue a PFM_RESTART */
        unsigned int reset_count:8;     /* number of pending resets */
        unsigned int is_self:1;         /* per-thread and self-montoring */
-       unsigned int reserved:5;        /* for future use */
+       unsigned int not_dflt_ctxsw:1;  /* TIF_PERFMON_CTXSW is not set */
+       unsigned int reserved:4;        /* for future use */
 };
 
 /*
--- a/perfmon/perfmon_attach.c
+++ b/perfmon/perfmon_attach.c
@@ -240,7 +240,9 @@ static int pfm_load_ctx_thread(struct pf
                 */
                pfm_set_pmu_owner(ctx->task, ctx);
        }
-       set_tsk_thread_flag(task, TIF_PERFMON_CTXSW);
+
+       if (!ctx->flags.not_dflt_ctxsw)
+               set_tsk_thread_flag(task, TIF_PERFMON_CTXSW);
 
        /*
         * reset pending work


Attachment: cell-add-spe-follow-flag.patch
Description: Binary data

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
perfmon2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to