forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/arch/powerpc/kernel/vdso32/datapage.S
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Access to the shared data page by the vDSO & syscall map
34 *
45 * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp.
5
- *
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.
106 */
117
128 #include <asm/processor.h>
....@@ -14,34 +10,12 @@
1410 #include <asm/asm-offsets.h>
1511 #include <asm/unistd.h>
1612 #include <asm/vdso.h>
13
+#include <asm/vdso_datapage.h>
1714
1815 .text
1916 .global __kernel_datapage_offset;
2017 __kernel_datapage_offset:
2118 .long 0
22
-
23
-V_FUNCTION_BEGIN(__get_datapage)
24
- .cfi_startproc
25
- /* We don't want that exposed or overridable as we want other objects
26
- * to be able to bl directly to here
27
- */
28
- .protected __get_datapage
29
- .hidden __get_datapage
30
-
31
- mflr r0
32
- .cfi_register lr,r0
33
-
34
- bcl 20,31,data_page_branch
35
-data_page_branch:
36
- mflr r3
37
- mtlr r0
38
- addi r3, r3, __kernel_datapage_offset-data_page_branch
39
- lwz r0,0(r3)
40
- .cfi_restore lr
41
- add r3,r0,r3
42
- blr
43
- .cfi_endproc
44
-V_FUNCTION_END(__get_datapage)
4519
4620 /*
4721 * void *__kernel_get_syscall_map(unsigned int *syscall_count) ;
....@@ -56,11 +30,10 @@
5630 .cfi_startproc
5731 mflr r12
5832 .cfi_register lr,r12
59
- mr r4,r3
60
- bl __get_datapage@local
33
+ mr. r4,r3
34
+ get_datapage r3, r0
6135 mtlr r12
6236 addi r3,r3,CFG_SYSCALL_MAP32
63
- cmpli cr0,r4,0
6437 beqlr
6538 li r0,NR_syscalls
6639 stw r0,0(r4)
....@@ -78,7 +51,7 @@
7851 .cfi_startproc
7952 mflr r12
8053 .cfi_register lr,r12
81
- bl __get_datapage@local
54
+ get_datapage r3, r0
8255 lwz r4,(CFG_TB_TICKS_PER_SEC + 4)(r3)
8356 lwz r3,CFG_TB_TICKS_PER_SEC(r3)
8457 mtlr r12