1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 * Copyright (C) IBM Corporation, 2012
6 * Author: Anton Blanchard <anton@au.ibm.com>
8 #include <asm/ppc_asm.h>
13 * Exact prototype of getcpu
15 * int __kernel_getcpu(unsigned *cpu, unsigned *node);
18 V_FUNCTION_BEGIN(__kernel_getcpu)
20 mfspr r5,SPRN_SPRG_VDSO_READ
24 rlwinm r7,r5,16,31-15,31-0
30 li r3,0 /* always success */
33 V_FUNCTION_END(__kernel_getcpu)