gettimeofday.h (24640f233b466051ad3a5d2786d2951e43026c9d) | gettimeofday.h (abed3d826f2fb723c61b1251720348a42357c4e5) |
---|---|
1/* 2 * Copyright (C) 2018 ARM Limited 3 * Copyright (C) 2015 Imagination Technologies 4 * Author: Alex Smith <alex.smith@imgtec.com> 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License as published by the 8 * Free Software Foundation; either version 2 of the License, or (at your --- 8 unchanged lines hidden (view full) --- 17#include <linux/time.h> 18 19#include <asm/vdso/vdso.h> 20#include <asm/clocksource.h> 21#include <asm/io.h> 22#include <asm/unistd.h> 23#include <asm/vdso.h> 24 | 1/* 2 * Copyright (C) 2018 ARM Limited 3 * Copyright (C) 2015 Imagination Technologies 4 * Author: Alex Smith <alex.smith@imgtec.com> 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License as published by the 8 * Free Software Foundation; either version 2 of the License, or (at your --- 8 unchanged lines hidden (view full) --- 17#include <linux/time.h> 18 19#include <asm/vdso/vdso.h> 20#include <asm/clocksource.h> 21#include <asm/io.h> 22#include <asm/unistd.h> 23#include <asm/vdso.h> 24 |
25#define VDSO_HAS_CLOCK_GETRES 1 26 |
|
25#ifdef CONFIG_MIPS_CLOCK_VSYSCALL 26 27static __always_inline long gettimeofday_fallback( 28 struct __kernel_old_timeval *_tv, 29 struct timezone *_tz) 30{ 31 register struct timezone *tz asm("a1") = _tz; 32 register struct __kernel_old_timeval *tv asm("a0") = _tv; --- 41 unchanged lines hidden (view full) --- 74 : "=r" (ret), "=r" (error) 75 : "r" (clkid), "r" (ts), "r" (nr) 76 : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", 77 "$14", "$15", "$24", "$25", "hi", "lo", "memory"); 78 79 return error ? -ret : ret; 80} 81 | 27#ifdef CONFIG_MIPS_CLOCK_VSYSCALL 28 29static __always_inline long gettimeofday_fallback( 30 struct __kernel_old_timeval *_tv, 31 struct timezone *_tz) 32{ 33 register struct timezone *tz asm("a1") = _tz; 34 register struct __kernel_old_timeval *tv asm("a0") = _tv; --- 41 unchanged lines hidden (view full) --- 76 : "=r" (ret), "=r" (error) 77 : "r" (clkid), "r" (ts), "r" (nr) 78 : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", 79 "$14", "$15", "$24", "$25", "hi", "lo", "memory"); 80 81 return error ? -ret : ret; 82} 83 |
84static __always_inline int clock_getres_fallback( 85 clockid_t _clkid, 86 struct __kernel_timespec *_ts) 87{ 88 register struct __kernel_timespec *ts asm("a1") = _ts; 89 register clockid_t clkid asm("a0") = _clkid; 90 register long ret asm("v0"); 91#if _MIPS_SIM == _MIPS_SIM_ABI64 92 register long nr asm("v0") = __NR_clock_getres; 93#else 94 register long nr asm("v0") = __NR_clock_getres_time64; 95#endif 96 register long error asm("a3"); 97 98 asm volatile( 99 " syscall\n" 100 : "=r" (ret), "=r" (error) 101 : "r" (clkid), "r" (ts), "r" (nr) 102 : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", 103 "$14", "$15", "$24", "$25", "hi", "lo", "memory"); 104 105 return error ? -ret : ret; 106} 107 |
|
82#ifdef CONFIG_CSRC_R4K 83 84static __always_inline u64 read_r4k_count(void) 85{ 86 unsigned int count; 87 88 __asm__ __volatile__( 89 " .set push\n" --- 62 unchanged lines hidden --- | 108#ifdef CONFIG_CSRC_R4K 109 110static __always_inline u64 read_r4k_count(void) 111{ 112 unsigned int count; 113 114 __asm__ __volatile__( 115 " .set push\n" --- 62 unchanged lines hidden --- |