cregit-Linux how code gets into the kernel

Release 4.11 arch/arm/kernel/time.c

Directory: arch/arm/kernel
/*
 *  linux/arch/arm/kernel/time.c
 *
 *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
 *  Modifications for ARM (C) 1994-2001 Russell King
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 *  This file contains the ARM-specific time handling details:
 *  reading the RTC at bootup, etc...
 */
#include <linux/clk-provider.h>
#include <linux/clocksource.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/profile.h>
#include <linux/sched.h>
#include <linux/sched_clock.h>
#include <linux/smp.h>
#include <linux/time.h>
#include <linux/timex.h>
#include <linux/timer.h>

#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <asm/stacktrace.h>
#include <asm/thread_info.h>

#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \
    defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE)
/* this needs a better home */

DEFINE_SPINLOCK(rtc_lock);

EXPORT_SYMBOL(rtc_lock);
#endif	/* pc-style 'CMOS' RTC support */

/* change this if you have some constant time drift */

#define USECS_PER_JIFFY	(1000000/HZ)

#ifdef CONFIG_SMP

unsigned long profile_pc(struct pt_regs *regs) { struct stackframe frame; if (!in_lock_functions(regs->ARM_pc)) return regs->ARM_pc; arm_get_current_stackframe(regs, &frame); do { int ret = unwind_frame(&frame); if (ret < 0) return 0; } while (in_lock_functions(frame.pc)); return frame.pc; }

Contributors

PersonTokensPropCommitsCommitProp
Catalin Marinas4662.16%125.00%
Zwane Mwaikambo2027.03%125.00%
Nikolay Borisov56.76%125.00%
Anton Blanchard34.05%125.00%
Total74100.00%4100.00%

EXPORT_SYMBOL(profile_pc); #endif #ifndef CONFIG_GENERIC_CLOCKEVENTS /* * Kernel system timer support. */
void timer_tick(void) { profile_tick(CPU_PROFILING); xtime_update(1); #ifndef CONFIG_SMP update_process_times(user_mode(get_irq_regs())); #endif }

Contributors

PersonTokensPropCommitsCommitProp
Martin Schwidefsky1238.71%114.29%
Deepak Saxena1032.26%114.29%
Linus Torvalds39.68%114.29%
William Lee Irwin III26.45%114.29%
Russell King26.45%114.29%
Atsushi Nemoto13.23%114.29%
Torben Hohn13.23%114.29%
Total31100.00%7100.00%

#endif
static void dummy_clock_access(struct timespec64 *ts) { ts->tv_sec = 0; ts->tv_nsec = 0; }

Contributors

PersonTokensPropCommitsCommitProp
Marc Zyngier2295.65%150.00%
Xunlei Pang14.35%150.00%
Total23100.00%2100.00%

static clock_access_fn __read_persistent_clock = dummy_clock_access; static clock_access_fn __read_boot_clock = dummy_clock_access; ;
void read_persistent_clock64(struct timespec64 *ts) { __read_persistent_clock(ts); }

Contributors

PersonTokensPropCommitsCommitProp
Marc Zyngier1386.67%150.00%
Xunlei Pang213.33%150.00%
Total15100.00%2100.00%


void read_boot_clock64(struct timespec64 *ts) { __read_boot_clock(ts); }

Contributors

PersonTokensPropCommitsCommitProp
Marc Zyngier1386.67%150.00%
Xunlei Pang213.33%150.00%
Total15100.00%2100.00%


int __init register_persistent_clock(clock_access_fn read_boot, clock_access_fn read_persistent) { /* Only allow the clockaccess functions to be registered once */ if (__read_persistent_clock == dummy_clock_access && __read_boot_clock == dummy_clock_access) { if (read_boot) __read_boot_clock = read_boot; if (read_persistent) __read_persistent_clock = read_persistent; return 0; } return -EINVAL; }

Contributors

PersonTokensPropCommitsCommitProp
Marc Zyngier48100.00%1100.00%
Total48100.00%1100.00%


void __init time_init(void) { if (machine_desc->init_time) { machine_desc->init_time(); } else { #ifdef CONFIG_COMMON_CLK of_clk_init(NULL); #endif clocksource_probe(); } }

Contributors

PersonTokensPropCommitsCommitProp
Sebastian Hesselbarth1437.84%114.29%
Deepak Saxena924.32%114.29%
Arnd Bergmann924.32%114.29%
Russell King25.41%114.29%
Stephen Warren12.70%114.29%
Marc Zyngier12.70%114.29%
Linus Torvalds (pre-git)12.70%114.29%
Total37100.00%7100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Marc Zyngier11029.65%25.71%
Catalin Marinas4812.94%12.86%
Sebastian Hesselbarth349.16%12.86%
Zwane Mwaikambo328.63%12.86%
Linus Torvalds (pre-git)236.20%38.57%
Russell King236.20%822.86%
Arnd Bergmann225.93%25.71%
Deepak Saxena215.66%25.71%
Martin Schwidefsky123.23%12.86%
David Brownell123.23%12.86%
Xunlei Pang51.35%12.86%
Nikolay Borisov51.35%12.86%
Kevin Hilman51.35%25.71%
Thomas Gleixner41.08%12.86%
Anton Blanchard30.81%12.86%
Linus Torvalds30.81%12.86%
Frederik Deweerdt20.54%12.86%
Alexey Dobriyan20.54%12.86%
William Lee Irwin III20.54%12.86%
Torben Hohn10.27%12.86%
Stephen Warren10.27%12.86%
Atsushi Nemoto10.27%12.86%
Total371100.00%35100.00%
Directory: arch/arm/kernel
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.