Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45375
b: refs/heads/master
c: dc40127
h: refs/heads/master
i:
  45373: ca58f07
  45371: f52a62c
  45367: 821ca6a
  45359: f114f5a
  45343: 5de68c0
  45311: 843a8d0
v: v3
  • Loading branch information
Anton Blanchard authored and Paul Mackerras committed Jan 9, 2007
1 parent 6c44d71 commit 6edf834
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab87e8dc88a7cae341c403547cea6b022f5ac023
refs/heads/master: dc40127ca5c6e1da48d2b5f9d0c65b5795faac12
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/platforms/pseries/hvCall.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 */ \
\
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/platforms/pseries/hvCall_inst.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/asm-powerpc/hvcall.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */
Expand Down

0 comments on commit 6edf834

Please sign in to comment.