M68K: add arch_cpu_idle and arch_cpu_pause inline stubs

Remove the stub from arch_cpu.cpp

We might want to implement a 040 CPU module providing idle using LPSTOP.
This commit is contained in:
François Revol 2016-07-20 19:58:56 +02:00
parent 7ab9993a18
commit 990d34efdd
2 changed files with 20 additions and 10 deletions

View File

@ -445,6 +445,26 @@ extern bool m68k_is_hw_register_readable(addr_t address);
extern bool m68k_is_hw_register_writable(addr_t address, uint16 value);
// defined in kernel: arch/m68k/cpu_asm.S
static inline void
arch_cpu_idle(void)
{
// TODO: M68K CPU idle call
// there isn't really any insn for this. Maybe NOP/FNOP?
// TODO: make a 060 module using LPSTOP
//asm volatile ("lpstop");
}
static inline void
arch_cpu_pause(void)
{
// TODO: M68K STOP call
// the problem is STOP wants an immediate to put into SR
// but we don't want to overwrite it.
//asm volatile("stop #0" : : : "memory");
}
#ifdef __cplusplus
}
#endif

View File

@ -268,16 +268,6 @@ arch_cpu_shutdown(bool reboot)
}
void
arch_cpu_idle(void)
{
if (cpu_ops.idle)
cpu_ops.idle();
#warning M68K: use LPSTOP ?
//asm volatile ("lpstop");
}
// The purpose of this function is to trick the compiler. When setting the
// page_handler to a label that is obviously (to the compiler) never used,
// it may reorganize the control flow, so that the labeled part is optimized