cregit-Linux how code gets into the kernel

Release 4.14 arch/mips/kernel/irq.c

Directory: arch/mips/kernel
/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Code to handle x86 style IRQs plus some generic interrupt stuff.
 *
 * Copyright (C) 1992 Linus Torvalds
 * Copyright (C) 1994 - 2000 Ralf Baechle
 */
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel_stat.h>
#include <linux/proc_fs.h>
#include <linux/mm.h>
#include <linux/random.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
#include <linux/kallsyms.h>
#include <linux/kgdb.h>
#include <linux/ftrace.h>

#include <linux/atomic.h>
#include <linux/uaccess.h>


void *irq_stack[NR_CPUS];

/*
 * 'what should we do if we get a hw irq event on an illegal vector'.
 * each architecture has to answer this themselves.
 */

void ack_bad_irq(unsigned int irq) { printk("unexpected IRQ # %d\n", irq); }

Contributors

PersonTokensPropCommitsCommitProp
Ralf Bächle16100.00%2100.00%
Total16100.00%2100.00%

atomic_t irq_err_count;
int arch_show_interrupts(struct seq_file *p, int prec) { seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds1133.33%233.33%
Linus Torvalds (pre-git)1133.33%233.33%
Thomas Gleixner618.18%116.67%
Ralf Bächle515.15%116.67%
Total33100.00%6100.00%


asmlinkage void spurious_interrupt(void) { atomic_inc(&irq_err_count); }

Contributors

PersonTokensPropCommitsCommitProp
Ralf Bächle14100.00%2100.00%
Total14100.00%2100.00%


void __init init_IRQ(void) { int i; for (i = 0; i < NR_IRQS; i++) irq_set_noprobe(i); if (cpu_has_veic) clear_c0_status(ST0_IM); arch_init_irq(); for_each_possible_cpu(i) { int irq_pages = IRQ_STACK_SIZE / PAGE_SIZE; void *s = (void *)__get_free_pages(GFP_KERNEL, irq_pages); irq_stack[i] = s; pr_debug("CPU%d IRQ stack at 0x%p - 0x%p\n", i, irq_stack[i], irq_stack[i] + IRQ_STACK_SIZE); } }

Contributors

PersonTokensPropCommitsCommitProp
Matt Redfearn5456.84%112.50%
Ralf Bächle2829.47%337.50%
Paul Burton99.47%112.50%
Linus Torvalds22.11%112.50%
Thomas Gleixner11.05%112.50%
Linus Torvalds (pre-git)11.05%112.50%
Total95100.00%8100.00%

#ifdef CONFIG_DEBUG_STACKOVERFLOW
static inline void check_stack_overflow(void) { unsigned long sp; __asm__ __volatile__("move %0, $sp" : "=r" (sp)); sp &= THREAD_MASK; /* * Check for stack overflow: is there less than STACK_WARN free? * STACK_WARN is defined as 1/8 of THREAD_SIZE by default. */ if (unlikely(sp < (sizeof(struct thread_info) + STACK_WARN))) { printk("do_IRQ: stack overflow: %ld\n", sp - sizeof(struct thread_info)); dump_stack(); } }

Contributors

PersonTokensPropCommitsCommitProp
From: jiang.adam@gmail.com56100.00%1100.00%
Total56100.00%1100.00%

#else
static inline void check_stack_overflow(void) {}

Contributors

PersonTokensPropCommitsCommitProp
From: jiang.adam@gmail.com8100.00%1100.00%
Total8100.00%1100.00%

#endif /* * do_IRQ handles all normal device IRQ's (the special * SMP cross-CPU interrupts have their own specific * handlers). */
void __irq_entry do_IRQ(unsigned int irq) { irq_enter(); check_stack_overflow(); generic_handle_irq(irq); irq_exit(); }

Contributors

PersonTokensPropCommitsCommitProp
Wu Zhangjin2187.50%150.00%
From: jiang.adam@gmail.com312.50%150.00%
Total24100.00%2100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Ralf Bächle7624.44%520.83%
From: jiang.adam@gmail.com7323.47%14.17%
Matt Redfearn6119.61%14.17%
Linus Torvalds (pre-git)3310.61%729.17%
Wu Zhangjin258.04%14.17%
Linus Torvalds227.07%312.50%
Paul Burton92.89%14.17%
Thomas Gleixner72.25%28.33%
Jason Wessel30.96%14.17%
Arun Sharma10.32%14.17%
James Hogan10.32%14.17%
Total311100.00%24100.00%
Directory: arch/mips/kernel
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.