1
2
3
4
5
6
7
8 #include <asm/processor.h>
9 #include <asm/ppc_asm.h>
10 #include <asm/asm-offsets.h>
11 #include <asm/unistd.h>
12 #include <asm/vdso.h>
13
14 .text
15 .global __kernel_datapage_offset;
16 __kernel_datapage_offset:
17 .long 0
18
19 V_FUNCTION_BEGIN(__get_datapage)
20 .cfi_startproc
21
22
23
24 .protected __get_datapage
25 .hidden __get_datapage
26
27 mflr r0
28 .cfi_register lr,r0
29
30 bcl 20,31,data_page_branch
31 data_page_branch:
32 mflr r3
33 mtlr r0
34 addi r3, r3, __kernel_datapage_offset-data_page_branch
35 lwz r0,0(r3)
36 .cfi_restore lr
37 add r3,r0,r3
38 blr
39 .cfi_endproc
40 V_FUNCTION_END(__get_datapage)
41
42
43
44
45
46
47
48
49
50
51 V_FUNCTION_BEGIN(__kernel_get_syscall_map)
52 .cfi_startproc
53 mflr r12
54 .cfi_register lr,r12
55 mr r4,r3
56 bl V_LOCAL_FUNC(__get_datapage)
57 mtlr r12
58 addi r3,r3,CFG_SYSCALL_MAP64
59 cmpldi cr0,r4,0
60 crclr cr0*4+so
61 beqlr
62 li r0,NR_syscalls
63 stw r0,0(r4)
64 blr
65 .cfi_endproc
66 V_FUNCTION_END(__kernel_get_syscall_map)
67
68
69
70
71
72
73
74 V_FUNCTION_BEGIN(__kernel_get_tbfreq)
75 .cfi_startproc
76 mflr r12
77 .cfi_register lr,r12
78 bl V_LOCAL_FUNC(__get_datapage)
79 ld r3,CFG_TB_TICKS_PER_SEC(r3)
80 mtlr r12
81 crclr cr0*4+so
82 blr
83 .cfi_endproc
84 V_FUNCTION_END(__kernel_get_tbfreq)