ARC: Abstract out ISA specific SLEEP args
No semantical changes, prepares for ARCv2 specific change in next commit Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
This commit is contained in:
@@ -37,6 +37,8 @@
|
|||||||
#define ISA_INIT_STATUS_BITS (STATUS_IE_MASK | STATUS_AD_MASK | \
|
#define ISA_INIT_STATUS_BITS (STATUS_IE_MASK | STATUS_AD_MASK | \
|
||||||
(ARCV2_IRQ_DEF_PRIO << 1))
|
(ARCV2_IRQ_DEF_PRIO << 1))
|
||||||
|
|
||||||
|
#define ISA_SLEEP_ARG 0x10
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -43,6 +43,8 @@
|
|||||||
|
|
||||||
#define ISA_INIT_STATUS_BITS STATUS_IE_MASK
|
#define ISA_INIT_STATUS_BITS STATUS_IE_MASK
|
||||||
|
|
||||||
|
#define ISA_SLEEP_ARG 0x3
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
|
@@ -44,11 +44,10 @@ SYSCALL_DEFINE0(arc_gettls)
|
|||||||
void arch_cpu_idle(void)
|
void arch_cpu_idle(void)
|
||||||
{
|
{
|
||||||
/* sleep, but enable all interrupts before committing */
|
/* sleep, but enable all interrupts before committing */
|
||||||
if (is_isa_arcompact()) {
|
__asm__ __volatile__(
|
||||||
__asm__("sleep 0x3");
|
"sleep %0 \n"
|
||||||
} else {
|
:
|
||||||
__asm__("sleep 0x10");
|
:"I"(ISA_SLEEP_ARG)); /* can't be "r" has to be embedded const */
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
asmlinkage void ret_from_fork(void);
|
asmlinkage void ret_from_fork(void);
|
||||||
|
Reference in New Issue
Block a user