cregit-Linux how code gets into the kernel

Release 4.14 arch/x86/kernel/time.c

Directory: arch/x86/kernel
// 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

PersonTokensPropCommitsCommitProp
Andi Kleen4844.04%333.33%
Zwane Mwaikambo2825.69%111.11%
Glauber de Oliveira Costa2522.94%111.11%
H. Peter Anvin32.75%111.11%
Anton Blanchard32.75%111.11%
Andrew Lutomirski10.92%111.11%
Thomas Gleixner10.92%111.11%
Total109100.00%9100.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

PersonTokensPropCommitsCommitProp
Thomas Gleixner2191.30%133.33%
Glauber de Oliveira Costa14.35%133.33%
Jaswinder Singh Rajput14.35%133.33%
Total23100.00%3100.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

PersonTokensPropCommitsCommitProp
Thomas Gleixner1666.67%133.33%
Andy Shevchenko729.17%133.33%
Dou Liyang14.17%133.33%
Total24100.00%3100.00%

/* Default timer init function */
void __init hpet_time_init(void) { if (!hpet_enable()) setup_pit_timer(); setup_default_timer_irq(); }

Contributors

PersonTokensPropCommitsCommitProp
John Stultz735.00%233.33%
Andi Kleen630.00%116.67%
Thomas Gleixner525.00%233.33%
Glauber de Oliveira Costa210.00%116.67%
Total20100.00%6100.00%


static __init void x86_late_time_init(void) { x86_init.timers.timer_init(); tsc_init(); }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner19100.00%3100.00%
Total19100.00%3100.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

PersonTokensPropCommitsCommitProp
Glauber de Oliveira Costa1083.33%133.33%
Andi Kleen18.33%133.33%
Thomas Gleixner18.33%133.33%
Total12100.00%3100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner8228.28%924.32%
Andi Kleen7626.21%924.32%
Glauber de Oliveira Costa4214.48%38.11%
Zwane Mwaikambo3311.38%12.70%
John Stultz186.21%25.41%
Bernhard Walle93.10%12.70%
Andy Shevchenko72.41%12.70%
Ralf Bächle51.72%12.70%
Anton Blanchard31.03%12.70%
H. Peter Anvin31.03%12.70%
Paul Gortmaker31.03%12.70%
Andrew Lutomirski31.03%25.41%
Linus Torvalds20.69%12.70%
Dou Liyang10.34%12.70%
Venkatesh Pallipadi10.34%12.70%
Greg Kroah-Hartman10.34%12.70%
Jaswinder Singh Rajput10.34%12.70%
Total290100.00%37100.00%
Directory: arch/x86/kernel
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.