Commit graph

7 commits

Author SHA1 Message Date
Chris Metcalf ff3e9a7307 tile/vdso: emit a GNU hash as well
In principle, including the GNU hash can allow libc to avoid
calculating SysV hashes at all.

Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
2015-08-06 20:22:40 -04:00
Chris Metcalf 9ae4d6bf22 tile: vdso: use raw_read_seqcount_begin() in vdso
Previously we were using read_seqcount_begin(), which works fine until
lockdep is enabled in the kernel, at which point lockdep locking shows
up in the vdso and userspace will take a GPV accessing a kernel-only
SPR when calling gettimeofday() etc.

Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
2015-06-04 13:31:27 -04:00
Chris Metcalf 78410af511 tile: add clock_gettime support to vDSO
This change adds support for clock_gettime with CLOCK_REALTIME
and CLOCK_MONOTONIC using vDSO.  It also updates the vdso
struct nomenclature used for the clocks to match the x86 code
to keep it easier to update going forward.

We also support the *_COARSE clockid_t, for apps that want speed
but aren't concerned about fine-grained timestamps; this saves
about 20 cycles per call (see http://lwn.net/Articles/342018/).

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: John Stultz <john.stultz@linaro.org>
2014-10-02 13:56:07 -04:00
Chris Metcalf 94fb1afbcb tile: switch to using seqlocks for the vDSO time code
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2014-10-02 10:48:12 -04:00
Thomas Gleixner dc01c9fae1 tile: Convert VDSO timekeeping to the precise mechanism
The code was only halfarsed converted to the new VSDO update mechanism
and still uses the inaccurate base value which lacks the fractional
part of xtime_nsec. Fix it up.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2014-07-23 10:16:50 -07:00
Kerry Sheh 603eb2cdee tile: Fix vDSO compilation issue with allyesconfig
make allyesconfig give the following build error on tile:
 tilegx-linux-gcc: error: arch/tile/kernel/vdso/vgettimeofday32.o: No such file or directory
 tilegx-linux-objcopy: 'arch/tile/kernel/vdso/vdso32.so.dbg': No such file or directory

In case with CONFIG_MODVERSIONS, cmd_cc_o_c generate .tmp_<file>.o from
<file>.c only. Fix it by execute rule_cc_o_c instead.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Kerry Sheh <ksheh@tilera.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2014-04-04 13:03:44 -04:00
Chris Metcalf 4a556f4f56 tile: implement gettimeofday() via vDSO
This change creates the framework for vDSO calls, makes the existing
rt_sigreturn() mechanism use it, and adds a fast gettimeofday().
Now that we need to expose the vDSO address to userspace, we add
AT_SYSINFO_EHDR to the set of aux entries provided to userspace.
(You can disable any extra vDSO support by booting with vdso=0,
but the rt_sigreturn vDSO page will still be provided.)

Note that glibc has supported the tile vDSO since release 2.17.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2013-08-13 16:26:21 -04:00