2 * Copyright (C) 2012 Freescale Semiconductor, Inc.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
10 #include <linux/threads.h>
11 #include <asm/epapr_hcalls.h>
14 #include <asm/cputable.h>
15 #include <asm/thread_info.h>
16 #include <asm/ppc_asm.h>
17 #include <asm/asm-compat.h>
18 #include <asm/asm-offsets.h>
21 /* epapr_ev_idle() was derived from e500_idle() */
22 _GLOBAL(epapr_ev_idle)
23 CURRENT_THREAD_INFO(r3, r1)
24 PPC_LL r4, TI_LOCAL_FLAGS(r3) /* set napping bit */
25 ori r4, r4,_TLF_NAPPING /* so when we take an exception */
26 PPC_STL r4, TI_LOCAL_FLAGS(r3) /* it will return to our caller */
31 LOAD_REG_IMMEDIATE(r11, EV_HCALL_TOKEN(EV_IDLE))
33 .global epapr_ev_idle_start
41 * Guard against spurious wakeups from a hypervisor --
42 * only interrupt will cause us to return to LR due to
48 /* Hypercall entry point. Will be patched with device tree instructions. */
49 .global epapr_hypercall_start
50 epapr_hypercall_start: