| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Adapted from arm64 version. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2012 ARM Limited |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | | - * GNU General Public License for more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License |
|---|
| 16 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | 6 | */ |
|---|
| 18 | 7 | #ifndef __ASM_VDSO_DATAPAGE_H |
|---|
| 19 | 8 | #define __ASM_VDSO_DATAPAGE_H |
|---|
| .. | .. |
|---|
| 22 | 11 | |
|---|
| 23 | 12 | #ifndef __ASSEMBLY__ |
|---|
| 24 | 13 | |
|---|
| 14 | +#include <vdso/datapage.h> |
|---|
| 25 | 15 | #include <asm/page.h> |
|---|
| 26 | 16 | |
|---|
| 27 | | -/* Try to be cache-friendly on systems that don't implement the |
|---|
| 28 | | - * generic timer: fit the unconditionally updated fields in the first |
|---|
| 29 | | - * 32 bytes. |
|---|
| 30 | | - */ |
|---|
| 31 | | -struct vdso_data { |
|---|
| 32 | | - u32 seq_count; /* sequence count - odd during updates */ |
|---|
| 33 | | - u16 tk_is_cntvct; /* fall back to syscall if false */ |
|---|
| 34 | | - u16 cs_shift; /* clocksource shift */ |
|---|
| 35 | | - u32 xtime_coarse_sec; /* coarse time */ |
|---|
| 36 | | - u32 xtime_coarse_nsec; |
|---|
| 37 | | - |
|---|
| 38 | | - u32 wtm_clock_sec; /* wall to monotonic offset */ |
|---|
| 39 | | - u32 wtm_clock_nsec; |
|---|
| 40 | | - u32 xtime_clock_sec; /* CLOCK_REALTIME - seconds */ |
|---|
| 41 | | - u32 cs_mult; /* clocksource multiplier */ |
|---|
| 42 | | - |
|---|
| 43 | | - u64 cs_cycle_last; /* last cycle value */ |
|---|
| 44 | | - u64 cs_mask; /* clocksource mask */ |
|---|
| 45 | | - |
|---|
| 46 | | - u64 xtime_clock_snsec; /* CLOCK_REALTIME sub-ns base */ |
|---|
| 47 | | - u32 tz_minuteswest; /* timezone info for gettimeofday(2) */ |
|---|
| 48 | | - u32 tz_dsttime; |
|---|
| 49 | | -}; |
|---|
| 50 | | - |
|---|
| 51 | 17 | union vdso_data_store { |
|---|
| 52 | | - struct vdso_data data; |
|---|
| 53 | | - u8 page[PAGE_SIZE]; |
|---|
| 18 | + struct vdso_data data[CS_BASES]; |
|---|
| 19 | + u8 page[PAGE_SIZE]; |
|---|
| 54 | 20 | }; |
|---|
| 55 | 21 | |
|---|
| 56 | 22 | #endif /* !__ASSEMBLY__ */ |
|---|