Skip to content

Commit

Permalink
ARC: Abstract out ISA specific SLEEP args
Browse files Browse the repository at this point in the history
No semantical changes, prepares for ARCv2 specific change in next commit

Signed-off-by: Vineet Gupta <[email protected]>
  • Loading branch information
vineetgarc committed Nov 16, 2015
1 parent 61a1634 commit 512b5b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions arch/arc/include/asm/irqflags-arcv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#define ISA_INIT_STATUS_BITS (STATUS_IE_MASK | STATUS_AD_MASK | \
(ARCV2_IRQ_DEF_PRIO << 1))

#define ISA_SLEEP_ARG 0x10

#ifndef __ASSEMBLY__

/*
Expand Down
2 changes: 2 additions & 0 deletions arch/arc/include/asm/irqflags-compact.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

#define ISA_INIT_STATUS_BITS STATUS_IE_MASK

#define ISA_SLEEP_ARG 0x3

#ifndef __ASSEMBLY__

/******************************************************************
Expand Down
9 changes: 4 additions & 5 deletions arch/arc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ SYSCALL_DEFINE0(arc_gettls)
void arch_cpu_idle(void)
{
/* sleep, but enable all interrupts before committing */
if (is_isa_arcompact()) {
__asm__("sleep 0x3");
} else {
__asm__("sleep 0x10");
}
__asm__ __volatile__(
"sleep %0 \n"
:
:"I"(ISA_SLEEP_ARG)); /* can't be "r" has to be embedded const */
}

asmlinkage void ret_from_fork(void);
Expand Down

0 comments on commit 512b5b8

Please sign in to comment.