Commit a76d1bae authored by Tom Rini's avatar Tom Rini

PPC32: Replace 2 inline functions with their normal macro equivalents

parent 2f52183c
...@@ -420,18 +420,6 @@ static void kgdb_flush_cache_all(void) ...@@ -420,18 +420,6 @@ static void kgdb_flush_cache_all(void)
flush_instruction_cache(); flush_instruction_cache();
} }
static inline int get_msr(void)
{
int msr;
asm volatile("mfmsr %0" : "=r" (msr):);
return msr;
}
static inline void set_msr(int msr)
{
asm volatile("mtmsr %0" : : "r" (msr));
}
/* Set up exception handlers for tracing and breakpoints /* Set up exception handlers for tracing and breakpoints
* [could be called kgdb_init()] * [could be called kgdb_init()]
*/ */
...@@ -598,8 +586,8 @@ handle_exception (struct pt_regs *regs) ...@@ -598,8 +586,8 @@ handle_exception (struct pt_regs *regs)
kgdb_interruptible(0); kgdb_interruptible(0);
lock_kernel(); lock_kernel();
msr = get_msr(); msr = mfmsr();
set_msr(msr & ~MSR_EE); /* disable interrupts */ mtmsr(msr & ~MSR_EE); /* disable interrupts */
if (regs->nip == (unsigned long)breakinst) { if (regs->nip == (unsigned long)breakinst) {
/* Skip over breakpoint trap insn */ /* Skip over breakpoint trap insn */
...@@ -786,7 +774,7 @@ handle_exception (struct pt_regs *regs) ...@@ -786,7 +774,7 @@ handle_exception (struct pt_regs *regs)
strcpy(remcomOutBuffer, "OK"); strcpy(remcomOutBuffer, "OK");
putpacket(remcomOutBuffer); putpacket(remcomOutBuffer);
#endif #endif
set_msr(msr); mtmsr(msr);
kgdb_interruptible(1); kgdb_interruptible(1);
unlock_kernel(); unlock_kernel();
...@@ -802,7 +790,7 @@ handle_exception (struct pt_regs *regs) ...@@ -802,7 +790,7 @@ handle_exception (struct pt_regs *regs)
#if defined(CONFIG_40x) #if defined(CONFIG_40x)
regs->msr |= MSR_DE; regs->msr |= MSR_DE;
regs->dbcr0 |= (DBCR0_IDM | DBCR0_IC); regs->dbcr0 |= (DBCR0_IDM | DBCR0_IC);
set_msr(msr); mtmsr(msr);
#else #else
regs->msr |= MSR_SE; regs->msr |= MSR_SE;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment