Skip to content
Snippets Groups Projects
Select Git revision
  • c0029de50982c1fb215330a5f9d433cec0cfd8cc
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

scm.c

Blame
  • hrtimer.c 40.18 KiB
    /*
     *  linux/kernel/hrtimer.c
     *
     *  Copyright(C) 2005-2006, Thomas Gleixner <tglx@linutronix.de>
     *  Copyright(C) 2005-2007, Red Hat, Inc., Ingo Molnar
     *  Copyright(C) 2006-2007  Timesys Corp., Thomas Gleixner
     *
     *  High-resolution kernel timers
     *
     *  In contrast to the low-resolution timeout API implemented in
     *  kernel/timer.c, hrtimers provide finer resolution and accuracy
     *  depending on system configuration and capabilities.
     *
     *  These timers are currently used for:
     *   - itimers
     *   - POSIX timers
     *   - nanosleep
     *   - precise in-kernel timing
     *
     *  Started by: Thomas Gleixner and Ingo Molnar
     *
     *  Credits:
     *	based on kernel/timer.c
     *
     *	Help, testing, suggestions, bugfixes, improvements were
     *	provided by:
     *
     *	George Anzinger, Andrew Morton, Steven Rostedt, Roman Zippel
     *	et. al.
     *
     *  For licencing details see kernel-base/COPYING
     */
    
    #include <linux/cpu.h>
    #include <linux/irq.h>
    #include <linux/module.h>
    #include <linux/percpu.h>
    #include <linux/hrtimer.h>
    #include <linux/notifier.h>
    #include <linux/syscalls.h>
    #include <linux/kallsyms.h>
    #include <linux/interrupt.h>
    #include <linux/tick.h>
    #include <linux/seq_file.h>
    #include <linux/err.h>
    #include <linux/debugobjects.h>
    
    #include <asm/uaccess.h>
    
    /**
     * ktime_get - get the monotonic time in ktime_t format
     *
     * returns the time in ktime_t format
     */
    ktime_t ktime_get(void)
    {
    	struct timespec now;
    
    	ktime_get_ts(&now);
    
    	return timespec_to_ktime(now);
    }
    EXPORT_SYMBOL_GPL(ktime_get);
    
    /**
     * ktime_get_real - get the real (wall-) time in ktime_t format
     *
     * returns the time in ktime_t format
     */
    ktime_t ktime_get_real(void)