From 6edf834af2d3be26f28aa9b951f2df0793994352 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Tue, 9 Jan 2007 02:43:02 +1100 Subject: [PATCH] --- yaml --- r: 45375 b: refs/heads/master c: dc40127ca5c6e1da48d2b5f9d0c65b5795faac12 h: refs/heads/master i: 45373: ca58f0750cc3933b93177673ebcb71708db24a80 45371: f52a62c849a2d83ee5cea91cbcc8e8154d0f2ee8 45367: 821ca6a2df8239f076b7c38d568b6a5acc2bfe17 45359: f114f5a81a8347794a32c233f174edbe178006ac 45343: 5de68c037be9bf3551f91db54d47f1f552956c50 45311: 843a8d075d9828ab38598ff0d6e3eeb970244e57 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/pseries/hvCall.S | 6 +++--- trunk/arch/powerpc/platforms/pseries/hvCall_inst.c | 4 ++-- trunk/include/asm-powerpc/hvcall.h | 2 -- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 12f70eedfb73..85c9a6e891a6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ab87e8dc88a7cae341c403547cea6b022f5ac023 +refs/heads/master: dc40127ca5c6e1da48d2b5f9d0c65b5795faac12 diff --git a/trunk/arch/powerpc/platforms/pseries/hvCall.S b/trunk/arch/powerpc/platforms/pseries/hvCall.S index 527da445aaa5..5c7e38789897 100644 --- a/trunk/arch/powerpc/platforms/pseries/hvCall.S +++ b/trunk/arch/powerpc/platforms/pseries/hvCall.S @@ -26,7 +26,7 @@ BEGIN_FTR_SECTION; \ mfspr r0,SPRN_PURR; /* get PURR and */ \ std r0,STK_PARM(r6)(r1); /* save for later */ \ -END_FTR_SECTION_IFCLR(CPU_FTR_PURR); +END_FTR_SECTION_IFSET(CPU_FTR_PURR); /* * postcall is performed immediately before function return which @@ -43,7 +43,7 @@ BEGIN_FTR_SECTION; \ mfspr r8,SPRN_PURR; /* PURR after */ \ ld r6,STK_PARM(r6)(r1); /* PURR before */ \ subf r6,r6,r8; /* delta */ \ -END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ +END_FTR_SECTION_IFSET(CPU_FTR_PURR); \ ld r5,STK_PARM(r5)(r1); /* timebase before */ \ subf r5,r5,r7; /* time delta */ \ \ @@ -66,7 +66,7 @@ BEGIN_FTR_SECTION; \ ld r7,HCALL_STAT_PURR(r4); /* PURR */ \ add r7,r7,r6; \ std r7,HCALL_STAT_PURR(r4); \ -END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ +END_FTR_SECTION_IFSET(CPU_FTR_PURR); \ 1: #else #define HCALL_INST_PRECALL diff --git a/trunk/arch/powerpc/platforms/pseries/hvCall_inst.c b/trunk/arch/powerpc/platforms/pseries/hvCall_inst.c index 80181c4c49eb..3ddc04925d50 100644 --- a/trunk/arch/powerpc/platforms/pseries/hvCall_inst.c +++ b/trunk/arch/powerpc/platforms/pseries/hvCall_inst.c @@ -34,7 +34,7 @@ DEFINE_PER_CPU(struct hcall_stats[HCALL_STAT_ARRAY_SIZE], hcall_stats); */ static void *hc_start(struct seq_file *m, loff_t *pos) { - if ((int)*pos < HCALL_STAT_ARRAY_SIZE) + if ((int)*pos < (HCALL_STAT_ARRAY_SIZE-1)) return (void *)(unsigned long)(*pos + 1); return NULL; @@ -57,7 +57,7 @@ static int hc_show(struct seq_file *m, void *p) struct hcall_stats *hs = (struct hcall_stats *)m->private; if (hs[h_num].num_calls) { - if (!cpu_has_feature(CPU_FTR_PURR)) + if (cpu_has_feature(CPU_FTR_PURR)) seq_printf(m, "%lu %lu %lu %lu\n", h_num<<2, hs[h_num].num_calls, hs[h_num].tb_total, diff --git a/trunk/include/asm-powerpc/hvcall.h b/trunk/include/asm-powerpc/hvcall.h index 257d1cecb8c9..7a500732b671 100644 --- a/trunk/include/asm-powerpc/hvcall.h +++ b/trunk/include/asm-powerpc/hvcall.h @@ -252,8 +252,6 @@ struct hcall_stats { unsigned long tb_total; /* total wall time (mftb) of calls. */ unsigned long purr_total; /* total cpu time (PURR) of calls. */ }; -void update_hcall_stats(unsigned long opcode, unsigned long tb_delta, - unsigned long purr_delta); #define HCALL_STAT_ARRAY_SIZE ((MAX_HCALL_OPCODE >> 2) + 1) #endif /* __ASSEMBLY__ */