1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Access to the shared data page by the vDSO & syscall map
5 * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp.
8 #include <asm/processor.h>
9 #include <asm/ppc_asm.h>
10 #include <asm/asm-offsets.h>
11 #include <asm/unistd.h>
13 #include <asm/vdso_datapage.h>
18 * void *__kernel_get_syscall_map(unsigned int *syscall_count) ;
20 * returns a pointer to the syscall map. the map is agnostic to the
21 * size of "long", unlike kernel bitops, it stores bits from top to
22 * bottom so that memory actually contains a linear bitmap
23 * check for syscall N by testing bit (0x80000000 >> (N & 0x1f)) of
24 * 32 bits int at N >> 5.
26 V_FUNCTION_BEGIN(__kernel_get_syscall_map)
33 addi r3,r3,CFG_SYSCALL_MAP32
40 V_FUNCTION_END(__kernel_get_syscall_map)
43 * void unsigned long long __kernel_get_tbfreq(void);
45 * returns the timebase frequency in HZ
47 V_FUNCTION_BEGIN(__kernel_get_tbfreq)
52 lwz r4,(CFG_TB_TICKS_PER_SEC + 4)(r3)
53 lwz r3,CFG_TB_TICKS_PER_SEC(r3)
58 V_FUNCTION_END(__kernel_get_tbfreq)