| .. | .. |
|---|
| 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) ; |
|---|
| .. | .. |
|---|
| 57 | 31 | mflr r12 |
|---|
| 58 | 32 | .cfi_register lr,r12 |
|---|
| 59 | 33 | mr r4,r3 |
|---|
| 60 | | - bl V_LOCAL_FUNC(__get_datapage) |
|---|
| 34 | + get_datapage r3, r0 |
|---|
| 61 | 35 | mtlr r12 |
|---|
| 62 | 36 | addi r3,r3,CFG_SYSCALL_MAP64 |
|---|
| 63 | 37 | cmpldi cr0,r4,0 |
|---|
| .. | .. |
|---|
| 79 | 53 | .cfi_startproc |
|---|
| 80 | 54 | mflr r12 |
|---|
| 81 | 55 | .cfi_register lr,r12 |
|---|
| 82 | | - bl V_LOCAL_FUNC(__get_datapage) |
|---|
| 56 | + get_datapage r3, r0 |
|---|
| 83 | 57 | ld r3,CFG_TB_TICKS_PER_SEC(r3) |
|---|
| 84 | 58 | mtlr r12 |
|---|
| 85 | 59 | crclr cr0*4+so |
|---|