Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370845
b: refs/heads/master
c: f070986
h: refs/heads/master
i:
  370843: e5258a1
v: v3
  • Loading branch information
Stuart Yoder authored and Kumar Gala committed Mar 13, 2013
1 parent f559a9e commit d764f8d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19c29f1747b7fb8cbb4a4c4bca6357c60c43a61a
refs/heads/master: f070986a07e514e3b4fc4aef6551b8dffcb19287
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/kernel/epapr_hcalls.S
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <asm/asm-compat.h>
#include <asm/asm-offsets.h>

#ifndef CONFIG_PPC64
/* epapr_ev_idle() was derived from e500_idle() */
_GLOBAL(epapr_ev_idle)
CURRENT_THREAD_INFO(r3, r1)
Expand All @@ -42,6 +43,7 @@ epapr_ev_idle_start:
* _TLF_NAPPING.
*/
b idle_loop
#endif

/* Hypercall entry point. Will be patched with device tree instructions. */
.global epapr_hypercall_start
Expand Down
32 changes: 30 additions & 2 deletions trunk/arch/powerpc/kernel/idle_book3e.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
#include <asm/ppc-opcode.h>
#include <asm/processor.h>
#include <asm/thread_info.h>
#include <asm/epapr_hcalls.h>

/* 64-bit version only for now */
#ifdef CONFIG_PPC64

_GLOBAL(book3e_idle)
.macro BOOK3E_IDLE name loop
_GLOBAL(\name)
/* Save LR for later */
mflr r0
std r0,16(r1)
Expand Down Expand Up @@ -67,7 +69,33 @@ _GLOBAL(book3e_idle)

/* We can now re-enable hard interrupts and go to sleep */
wrteei 1
1: PPC_WAIT(0)
\loop

.endm

.macro BOOK3E_IDLE_LOOP
1:
PPC_WAIT(0)
b 1b
.endm

/* epapr_ev_idle_start below is patched with the proper hcall
opcodes during kernel initialization */
.macro EPAPR_EV_IDLE_LOOP
idle_loop:
LOAD_REG_IMMEDIATE(r11, EV_HCALL_TOKEN(EV_IDLE))

.global epapr_ev_idle_start
epapr_ev_idle_start:
li r3, -1
nop
nop
nop
b idle_loop
.endm

BOOK3E_IDLE epapr_ev_idle EPAPR_EV_IDLE_LOOP

BOOK3E_IDLE book3e_idle BOOK3E_IDLE_LOOP

#endif /* CONFIG_PPC64 */

0 comments on commit d764f8d

Please sign in to comment.