aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/hvCall.S
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2007-01-08 10:43:02 -0500
committerPaul Mackerras <paulus@samba.org>2007-01-09 01:03:03 -0500
commitdc40127ca5c6e1da48d2b5f9d0c65b5795faac12 (patch)
tree7d57b9a53adc8f4416380b126108d1e458a8e20c /arch/powerpc/platforms/pseries/hvCall.S
parentab87e8dc88a7cae341c403547cea6b022f5ac023 (diff)
[POWERPC] Fix bugs in the hypervisor call stats code
There were a few issues with the HCALL_STATS code: - PURR cpu feature checks were backwards - We iterated one entry off the end of the hcall_stats array - Remove dead update_hcall_stats() function prototype I noticed one thing while debugging, and that is we call H_ENTER (to set up the MMU hashtable in early init) before we have done the cpu fixups. This means we will execute the PURR SPR reads even on a CPU that isnt capable of it. I wonder if we can move the CPU feature fixups earlier. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/hvCall.S')
-rw-r--r--arch/powerpc/platforms/pseries/hvCall.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S
index 527da445aaa..5c7e3878989 100644
--- a/arch/powerpc/platforms/pseries/hvCall.S
+++ b/arch/powerpc/platforms/pseries/hvCall.S
@@ -26,7 +26,7 @@
26BEGIN_FTR_SECTION; \ 26BEGIN_FTR_SECTION; \
27 mfspr r0,SPRN_PURR; /* get PURR and */ \ 27 mfspr r0,SPRN_PURR; /* get PURR and */ \
28 std r0,STK_PARM(r6)(r1); /* save for later */ \ 28 std r0,STK_PARM(r6)(r1); /* save for later */ \
29END_FTR_SECTION_IFCLR(CPU_FTR_PURR); 29END_FTR_SECTION_IFSET(CPU_FTR_PURR);
30 30
31/* 31/*
32 * postcall is performed immediately before function return which 32 * postcall is performed immediately before function return which
@@ -43,7 +43,7 @@ BEGIN_FTR_SECTION; \
43 mfspr r8,SPRN_PURR; /* PURR after */ \ 43 mfspr r8,SPRN_PURR; /* PURR after */ \
44 ld r6,STK_PARM(r6)(r1); /* PURR before */ \ 44 ld r6,STK_PARM(r6)(r1); /* PURR before */ \
45 subf r6,r6,r8; /* delta */ \ 45 subf r6,r6,r8; /* delta */ \
46END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ 46END_FTR_SECTION_IFSET(CPU_FTR_PURR); \
47 ld r5,STK_PARM(r5)(r1); /* timebase before */ \ 47 ld r5,STK_PARM(r5)(r1); /* timebase before */ \
48 subf r5,r5,r7; /* time delta */ \ 48 subf r5,r5,r7; /* time delta */ \
49 \ 49 \
@@ -66,7 +66,7 @@ BEGIN_FTR_SECTION; \
66 ld r7,HCALL_STAT_PURR(r4); /* PURR */ \ 66 ld r7,HCALL_STAT_PURR(r4); /* PURR */ \
67 add r7,r7,r6; \ 67 add r7,r7,r6; \
68 std r7,HCALL_STAT_PURR(r4); \ 68 std r7,HCALL_STAT_PURR(r4); \
69END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ 69END_FTR_SECTION_IFSET(CPU_FTR_PURR); \
701: 701:
71#else 71#else
72#define HCALL_INST_PRECALL 72#define HCALL_INST_PRECALL