.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Access to the shared data page by the vDSO & syscall map |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
10 | 6 | */ |
---|
11 | 7 | |
---|
12 | 8 | #include <asm/processor.h> |
---|
.. | .. |
---|
14 | 10 | #include <asm/asm-offsets.h> |
---|
15 | 11 | #include <asm/unistd.h> |
---|
16 | 12 | #include <asm/vdso.h> |
---|
| 13 | +#include <asm/vdso_datapage.h> |
---|
17 | 14 | |
---|
18 | 15 | .text |
---|
19 | 16 | .global __kernel_datapage_offset; |
---|
20 | 17 | __kernel_datapage_offset: |
---|
21 | 18 | .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) |
---|
45 | 19 | |
---|
46 | 20 | /* |
---|
47 | 21 | * void *__kernel_get_syscall_map(unsigned int *syscall_count) ; |
---|
.. | .. |
---|
56 | 30 | .cfi_startproc |
---|
57 | 31 | mflr r12 |
---|
58 | 32 | .cfi_register lr,r12 |
---|
59 | | - mr r4,r3 |
---|
60 | | - bl __get_datapage@local |
---|
| 33 | + mr. r4,r3 |
---|
| 34 | + get_datapage r3, r0 |
---|
61 | 35 | mtlr r12 |
---|
62 | 36 | addi r3,r3,CFG_SYSCALL_MAP32 |
---|
63 | | - cmpli cr0,r4,0 |
---|
64 | 37 | beqlr |
---|
65 | 38 | li r0,NR_syscalls |
---|
66 | 39 | stw r0,0(r4) |
---|
.. | .. |
---|
78 | 51 | .cfi_startproc |
---|
79 | 52 | mflr r12 |
---|
80 | 53 | .cfi_register lr,r12 |
---|
81 | | - bl __get_datapage@local |
---|
| 54 | + get_datapage r3, r0 |
---|
82 | 55 | lwz r4,(CFG_TB_TICKS_PER_SEC + 4)(r3) |
---|
83 | 56 | lwz r3,CFG_TB_TICKS_PER_SEC(r3) |
---|
84 | 57 | mtlr r12 |
---|