[POWERPC] Bypass hcall stats until cpu features have run

I noticed that we execute hcalls before cpu feature code has run (eg
for setting up the bolted kernel region).  This means that we may be
executing code that is not appropriate for the processor we have.
Create an unconditional branch that we nop out all the time to fix this.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Anton Blanchard 2007-03-20 14:29:54 -05:00 committed by Paul Mackerras
parent b4aea36b79
commit 4f5fa2fb12
1 changed files with 6 additions and 1 deletions

View File

@ -30,9 +30,14 @@ END_FTR_SECTION_IFSET(CPU_FTR_PURR);
/* /*
* postcall is performed immediately before function return which * postcall is performed immediately before function return which
* allows liberal use of volatile registers. * allows liberal use of volatile registers. We branch around this
* in early init (eg when populating the MMU hashtable) by using an
* unconditional cpu feature.
*/ */
#define HCALL_INST_POSTCALL \ #define HCALL_INST_POSTCALL \
BEGIN_FTR_SECTION; \
b 1f; \
END_FTR_SECTION(0, 1); \
ld r4,STK_PARM(r3)(r1); /* validate opcode */ \ ld r4,STK_PARM(r3)(r1); /* validate opcode */ \
cmpldi cr7,r4,MAX_HCALL_OPCODE; \ cmpldi cr7,r4,MAX_HCALL_OPCODE; \
bgt- cr7,1f; \ bgt- cr7,1f; \