Release 4.14 arch/x86/kernel/time.c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 1991,1992,1995 Linus Torvalds
* Copyright (c) 1994 Alan Modra
* Copyright (c) 1995 Markus Kuhn
* Copyright (c) 1996 Ingo Molnar
* Copyright (c) 1998 Andrea Arcangeli
* Copyright (c) 2002,2006 Vojtech Pavlik
* Copyright (c) 2003 Andi Kleen
*
*/
#include <linux/clockchips.h>
#include <linux/interrupt.h>
#include <linux/i8253.h>
#include <linux/time.h>
#include <linux/export.h>
#include <asm/vsyscall.h>
#include <asm/x86_init.h>
#include <asm/i8259.h>
#include <asm/timer.h>
#include <asm/hpet.h>
#include <asm/time.h>
#ifdef CONFIG_X86_64
__visible volatile unsigned long jiffies __cacheline_aligned = INITIAL_JIFFIES;
#endif
unsigned long profile_pc(struct pt_regs *regs)
{
unsigned long pc = instruction_pointer(regs);
if (!user_mode(regs) && in_lock_functions(pc)) {
#ifdef CONFIG_FRAME_POINTER
return *(unsigned long *)(regs->bp + sizeof(long));
#else
unsigned long *sp =
(unsigned long *)kernel_stack_pointer(regs);
/*
* Return address is either directly at stack pointer
* or above a saved flags. Eflags has bits 22-31 zero,
* kernel addresses don't.
*/
if (sp[0] >> 22)
return sp[0];
if (sp[1] >> 22)
return sp[1];
#endif
}
return pc;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andi Kleen | 48 | 44.04% | 3 | 33.33% |
Zwane Mwaikambo | 28 | 25.69% | 1 | 11.11% |
Glauber de Oliveira Costa | 25 | 22.94% | 1 | 11.11% |
H. Peter Anvin | 3 | 2.75% | 1 | 11.11% |
Anton Blanchard | 3 | 2.75% | 1 | 11.11% |
Andrew Lutomirski | 1 | 0.92% | 1 | 11.11% |
Thomas Gleixner | 1 | 0.92% | 1 | 11.11% |
Total | 109 | 100.00% | 9 | 100.00% |
EXPORT_SYMBOL(profile_pc);
/*
* Default timer interrupt handler for PIT/HPET
*/
static irqreturn_t timer_interrupt(int irq, void *dev_id)
{
global_clock_event->event_handler(global_clock_event);
return IRQ_HANDLED;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Thomas Gleixner | 21 | 91.30% | 1 | 33.33% |
Glauber de Oliveira Costa | 1 | 4.35% | 1 | 33.33% |
Jaswinder Singh Rajput | 1 | 4.35% | 1 | 33.33% |
Total | 23 | 100.00% | 3 | 100.00% |
static struct irqaction irq0 = {
.handler = timer_interrupt,
.flags = IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER,
.name = "timer"
};
static void __init setup_default_timer_irq(void)
{
if (!nr_legacy_irqs())
return;
setup_irq(0, &irq0);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Thomas Gleixner | 16 | 66.67% | 1 | 33.33% |
Andy Shevchenko | 7 | 29.17% | 1 | 33.33% |
Dou Liyang | 1 | 4.17% | 1 | 33.33% |
Total | 24 | 100.00% | 3 | 100.00% |
/* Default timer init function */
void __init hpet_time_init(void)
{
if (!hpet_enable())
setup_pit_timer();
setup_default_timer_irq();
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
John Stultz | 7 | 35.00% | 2 | 33.33% |
Andi Kleen | 6 | 30.00% | 1 | 16.67% |
Thomas Gleixner | 5 | 25.00% | 2 | 33.33% |
Glauber de Oliveira Costa | 2 | 10.00% | 1 | 16.67% |
Total | 20 | 100.00% | 6 | 100.00% |
static __init void x86_late_time_init(void)
{
x86_init.timers.timer_init();
tsc_init();
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Thomas Gleixner | 19 | 100.00% | 3 | 100.00% |
Total | 19 | 100.00% | 3 | 100.00% |
/*
* Initialize TSC and delay the periodic timer init to
* late x86_late_time_init() so ioremap works.
*/
void __init time_init(void)
{
late_time_init = x86_late_time_init;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Glauber de Oliveira Costa | 10 | 83.33% | 1 | 33.33% |
Andi Kleen | 1 | 8.33% | 1 | 33.33% |
Thomas Gleixner | 1 | 8.33% | 1 | 33.33% |
Total | 12 | 100.00% | 3 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Thomas Gleixner | 82 | 28.28% | 9 | 24.32% |
Andi Kleen | 76 | 26.21% | 9 | 24.32% |
Glauber de Oliveira Costa | 42 | 14.48% | 3 | 8.11% |
Zwane Mwaikambo | 33 | 11.38% | 1 | 2.70% |
John Stultz | 18 | 6.21% | 2 | 5.41% |
Bernhard Walle | 9 | 3.10% | 1 | 2.70% |
Andy Shevchenko | 7 | 2.41% | 1 | 2.70% |
Ralf Bächle | 5 | 1.72% | 1 | 2.70% |
Anton Blanchard | 3 | 1.03% | 1 | 2.70% |
H. Peter Anvin | 3 | 1.03% | 1 | 2.70% |
Paul Gortmaker | 3 | 1.03% | 1 | 2.70% |
Andrew Lutomirski | 3 | 1.03% | 2 | 5.41% |
Linus Torvalds | 2 | 0.69% | 1 | 2.70% |
Dou Liyang | 1 | 0.34% | 1 | 2.70% |
Venkatesh Pallipadi | 1 | 0.34% | 1 | 2.70% |
Greg Kroah-Hartman | 1 | 0.34% | 1 | 2.70% |
Jaswinder Singh Rajput | 1 | 0.34% | 1 | 2.70% |
Total | 290 | 100.00% | 37 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.