1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2012 Freescale Semiconductor, Inc.
6 #include <linux/threads.h>
7 #include <asm/epapr_hcalls.h>
10 #include <asm/cputable.h>
11 #include <asm/thread_info.h>
12 #include <asm/ppc_asm.h>
13 #include <asm/asm-compat.h>
14 #include <asm/asm-offsets.h>
15 #include <asm/export.h>
18 /* epapr_ev_idle() was derived from e500_idle() */
19 _GLOBAL(epapr_ev_idle)
20 PPC_LL r4, TI_LOCAL_FLAGS(r2) /* set napping bit */
21 ori r4, r4,_TLF_NAPPING /* so when we take an exception */
22 PPC_STL r4, TI_LOCAL_FLAGS(r2) /* it will return to our caller */
27 LOAD_REG_IMMEDIATE(r11, EV_HCALL_TOKEN(EV_IDLE))
29 .global epapr_ev_idle_start
37 * Guard against spurious wakeups from a hypervisor --
38 * only interrupt will cause us to return to LR due to
44 /* Hypercall entry point. Will be patched with device tree instructions. */
45 .global epapr_hypercall_start
46 epapr_hypercall_start:
52 EXPORT_SYMBOL(epapr_hypercall_start)