2 * Access to the shared data page by the vDSO & syscall map
4 * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #include <asm/processor.h>
13 #include <asm/ppc_asm.h>
14 #include <asm/asm-offsets.h>
15 #include <asm/unistd.h>
19 .global __kernel_datapage_offset;
20 __kernel_datapage_offset:
23 V_FUNCTION_BEGIN(__get_datapage)
25 /* We don't want that exposed or overridable as we want other objects
26 * to be able to bl directly to here
28 .protected __get_datapage
29 .hidden __get_datapage
34 bcl 20,31,data_page_branch
38 addi r3, r3, __kernel_datapage_offset-data_page_branch
43 V_FUNCTION_END(__get_datapage)
46 * void *__kernel_get_syscall_map(unsigned int *syscall_count) ;
48 * returns a pointer to the syscall map. the map is agnostic to the
49 * size of "long", unlike kernel bitops, it stores bits from top to
50 * bottom so that memory actually contains a linear bitmap
51 * check for syscall N by testing bit (0x80000000 >> (N & 0x1f)) of
52 * 32 bits int at N >> 5.
54 V_FUNCTION_BEGIN(__kernel_get_syscall_map)
59 bl V_LOCAL_FUNC(__get_datapage)
61 addi r3,r3,CFG_SYSCALL_MAP64
69 V_FUNCTION_END(__kernel_get_syscall_map)
73 * void unsigned long __kernel_get_tbfreq(void);
75 * returns the timebase frequency in HZ
77 V_FUNCTION_BEGIN(__kernel_get_tbfreq)
81 bl V_LOCAL_FUNC(__get_datapage)
82 ld r3,CFG_TB_TICKS_PER_SEC(r3)
87 V_FUNCTION_END(__kernel_get_tbfreq)