hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/powerpc/include/asm/vdso_datapage.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 #ifndef _VDSO_DATAPAGE_H
23 #define _VDSO_DATAPAGE_H
34 #ifdef __KERNEL__
....@@ -6,11 +7,6 @@
67 * Copyright (C) 2002 Peter Bergner <bergner@vnet.ibm.com>, IBM
78 * Copyright (C) 2005 Benjamin Herrenschmidy <benh@kernel.crashing.org>,
89 * IBM Corp.
9
- *
10
- * This program is free software; you can redistribute it and/or
11
- * modify it under the terms of the GNU General Public License
12
- * as published by the Free Software Foundation; either version
13
- * 2 of the License, or (at your option) any later version.
1410 */
1511
1612
....@@ -85,7 +81,8 @@
8581 __u32 stamp_sec_fraction; /* fractional seconds of stamp_xtime */
8682 __s32 wtom_clock_nsec; /* Wall to monotonic clock nsec */
8783 __s64 wtom_clock_sec; /* Wall to monotonic clock sec */
88
- struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */
84
+ __s64 stamp_xtime_sec; /* xtime secs as at tb_orig_stamp */
85
+ __s64 stamp_xtime_nsec; /* xtime nsecs as at tb_orig_stamp */
8986 __u32 hrtimer_res; /* hrtimer resolution */
9087 __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */
9188 __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
....@@ -106,20 +103,27 @@
106103 __u32 tz_dsttime; /* Type of dst correction 0x5C */
107104 __s32 wtom_clock_sec; /* Wall to monotonic clock */
108105 __s32 wtom_clock_nsec;
109
- struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */
106
+ __s32 stamp_xtime_sec; /* xtime seconds as at tb_orig_stamp */
107
+ __s32 stamp_xtime_nsec; /* xtime nsecs as at tb_orig_stamp */
110108 __u32 stamp_sec_fraction; /* fractional seconds of stamp_xtime */
111109 __u32 hrtimer_res; /* hrtimer resolution */
112110 __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
113
- __u32 dcache_block_size; /* L1 d-cache block size */
114
- __u32 icache_block_size; /* L1 i-cache block size */
115
- __u32 dcache_log_block_size; /* L1 d-cache log block size */
116
- __u32 icache_log_block_size; /* L1 i-cache log block size */
117111 };
118112
119113 #endif /* CONFIG_PPC64 */
120114
121115 extern struct vdso_data *vdso_data;
122116
117
+#else /* __ASSEMBLY__ */
118
+
119
+.macro get_datapage ptr, tmp
120
+ bcl 20, 31, .+4
121
+ mflr \ptr
122
+ addi \ptr, \ptr, (__kernel_datapage_offset - (.-4))@l
123
+ lwz \tmp, 0(\ptr)
124
+ add \ptr, \tmp, \ptr
125
+.endm
126
+
123127 #endif /* __ASSEMBLY__ */
124128
125129 #endif /* __KERNEL__ */