cregit-Linux how code gets into the kernel

Release 4.16 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 Kleen4743.12%333.33%
Zwane Mwaikambo2926.61%111.11%
Glauber de Oliveira Costa2522.94%111.11%
H. Peter Anvin32.75%111.11%
Anton Blanchard32.75%111.11%
Thomas Gleixner10.92%111.11%
Andrew Lutomirski10.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%
Jaswinder Singh Rajput14.35%133.33%
Glauber de Oliveira Costa14.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) { /* * Unconditionally register the legacy timer; even without legacy * PIC/PIT we need this for the HPET0 in legacy replacement mode. */ if (setup_irq(0, &irq0)) pr_info("Failed to register legacy timer interrupt\n"); }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner1664.00%125.00%
Peter Zijlstra624.00%125.00%
Andy Shevchenko28.00%125.00%
Dou Liyang14.00%125.00%
Total25100.00%4100.00%

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

Contributors

PersonTokensPropCommitsCommitProp
Andi Kleen735.00%116.67%
John Stultz630.00%233.33%
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(); /* * After PIT/HPET timers init, select and setup * the final interrupt mode for delivering IRQs. */ x86_init.irqs.intr_mode_init(); tsc_init(); }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Gleixner1970.37%375.00%
Dou Liyang829.63%125.00%
Total27100.00%4100.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 Gleixner8227.42%923.08%
Andi Kleen7625.42%923.08%
Glauber de Oliveira Costa4214.05%37.69%
Zwane Mwaikambo3411.37%12.56%
John Stultz175.69%25.13%
Dou Liyang93.01%25.13%
Bernhard Walle93.01%12.56%
Peter Zijlstra62.01%12.56%
Ralf Bächle51.67%12.56%
Anton Blanchard31.00%12.56%
Andrew Lutomirski31.00%25.13%
H. Peter Anvin31.00%12.56%
Paul Gortmaker31.00%12.56%
Andy Shevchenko20.67%12.56%
Linus Torvalds20.67%12.56%
Jaswinder Singh Rajput10.33%12.56%
Greg Kroah-Hartman10.33%12.56%
Venkatesh Pallipadi10.33%12.56%
Total299100.00%39100.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.