blob: 9b069692153f4cf50a0d1c40eca0f13cf3c31a1b [file] [log] [blame]
Chris Metcalf4a556f42013-08-07 15:33:32 -04001/*
2 * Copyright 2012 Tilera Corporation. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
13 */
14
15#ifndef __TILE_VDSO_H__
16#define __TILE_VDSO_H__
17
Chris Metcalf94fb1af2014-10-02 10:48:12 -040018#include <linux/seqlock.h>
Chris Metcalf4a556f42013-08-07 15:33:32 -040019#include <linux/types.h>
20
21/*
22 * Note about the vdso_data structure:
23 *
24 * NEVER USE THEM IN USERSPACE CODE DIRECTLY. The layout of the
25 * structure is supposed to be known only to the function in the vdso
26 * itself and may change without notice.
27 */
28
29struct vdso_data {
Chris Metcalf94fb1af2014-10-02 10:48:12 -040030 seqcount_t tz_seq; /* Timezone seqlock */
31 seqcount_t tb_seq; /* Timebase seqlock */
Chris Metcalf78410af2014-10-02 10:32:15 -040032 __u64 cycle_last; /* TOD clock for xtime */
33 __u64 mask; /* Cycle mask */
Chris Metcalf4a556f42013-08-07 15:33:32 -040034 __u32 mult; /* Cycle to nanosecond multiplier */
35 __u32 shift; /* Cycle to nanosecond divisor (power of two) */
Chris Metcalf78410af2014-10-02 10:32:15 -040036 __u64 wall_time_sec;
37 __u64 wall_time_snsec;
38 __u64 monotonic_time_sec;
39 __u64 monotonic_time_snsec;
40 __u64 wall_time_coarse_sec;
41 __u64 wall_time_coarse_nsec;
42 __u64 monotonic_time_coarse_sec;
43 __u64 monotonic_time_coarse_nsec;
Chris Metcalf4a556f42013-08-07 15:33:32 -040044 __u32 tz_minuteswest; /* Minutes west of Greenwich */
45 __u32 tz_dsttime; /* Type of dst correction */
46};
47
48extern struct vdso_data *vdso_data;
49
50/* __vdso_rt_sigreturn is defined with the addresses in the vdso page. */
51extern void __vdso_rt_sigreturn(void);
52
53extern int setup_vdso_pages(void);
54
55#endif /* __TILE_VDSO_H__ */