Contributors: 34
Author Tokens Token Proportion Commits Commit Proportion
Linus Torvalds (pre-git) 74 24.34% 10 14.29%
Thomas Gleixner 49 16.12% 12 17.14%
Suresh B. Siddha 23 7.57% 2 2.86%
Afzal Mohammed 20 6.58% 1 1.43%
Yinghai Lu 17 5.59% 4 5.71%
Pekka J Enberg 13 4.28% 3 4.29%
Cyrill V. Gorcunov 10 3.29% 1 1.43%
Linus Torvalds 8 2.63% 3 4.29%
H. Peter Anvin 8 2.63% 2 2.86%
Jaswinder Singh Rajput 8 2.63% 3 4.29%
Sebastian Andrzej Siewior 6 1.97% 1 1.43%
Xin Li 6 1.97% 1 1.43%
Andi Kleen 6 1.97% 1 1.43%
Rusty Russell 6 1.97% 1 1.43%
Ingo Molnar 6 1.97% 3 4.29%
Andrew Morton 5 1.64% 2 2.86%
Eric W. Biedermann 5 1.64% 1 1.43%
Mike Rapoport 4 1.32% 1 1.43%
Brian Gerst 4 1.32% 2 2.86%
Andy Shevchenko 3 0.99% 1 1.43%
Ville Syrjälä 3 0.99% 1 1.43%
James Bottomley 3 0.99% 2 2.86%
Jacob jun Pan 3 0.99% 1 1.43%
Len Brown 2 0.66% 1 1.43%
Pavel Machek 2 0.66% 1 1.43%
Jiang Liu 2 0.66% 1 1.43%
Lv Zheng 1 0.33% 1 1.43%
Paul Jimenez 1 0.33% 1 1.43%
Maciej W. Rozycki 1 0.33% 1 1.43%
Greg Kroah-Hartman 1 0.33% 1 1.43%
Martin Molnar 1 0.33% 1 1.43%
Mikael Pettersson 1 0.33% 1 1.43%
Dou Liyang 1 0.33% 1 1.43%
Kay Sievers 1 0.33% 1 1.43%
Total 304 70


// SPDX-License-Identifier: GPL-2.0
#include <linux/linkage.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/timex.h>
#include <linux/random.h>
#include <linux/kprobes.h>
#include <linux/init.h>
#include <linux/kernel_stat.h>
#include <linux/device.h>
#include <linux/bitops.h>
#include <linux/acpi.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/pgtable.h>

#include <linux/atomic.h>
#include <asm/timer.h>
#include <asm/hw_irq.h>
#include <asm/desc.h>
#include <asm/io_apic.h>
#include <asm/acpi.h>
#include <asm/apic.h>
#include <asm/setup.h>
#include <asm/i8259.h>
#include <asm/traps.h>
#include <asm/fred.h>
#include <asm/prom.h>

/*
 * ISA PIC or low IO-APIC triggered (INTA-cycle or APIC) interrupts:
 * (these are usually mapped to vectors 0x30-0x3f)
 */

/*
 * The IO-APIC gives us many more interrupt sources. Most of these
 * are unused but an SMP system is supposed to have enough memory ...
 * sometimes (mostly wrt. hw bugs) we get corrupted vectors all
 * across the spectrum, so we really want to be prepared to get all
 * of these. Plus, more powerful systems might have more than 64
 * IO-APIC registers.
 *
 * (these are usually mapped into the 0x30-0xff vector range)
 */

DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
	[0 ... NR_VECTORS - 1] = VECTOR_UNUSED,
};

void __init init_ISA_irqs(void)
{
	struct irq_chip *chip = legacy_pic->chip;
	int i;

	/*
	 * Try to set up the through-local-APIC virtual wire mode earlier.
	 *
	 * On some 32-bit UP machines, whose APIC has been disabled by BIOS
	 * and then got re-enabled by "lapic", it hangs at boot time without this.
	 */
	init_bsp_APIC();

	legacy_pic->init(0);

	for (i = 0; i < nr_legacy_irqs(); i++) {
		irq_set_chip_and_handler(i, chip, handle_level_irq);
		irq_set_status_flags(i, IRQ_LEVEL);
	}
}

void __init init_IRQ(void)
{
	int i;

	/*
	 * On cpu 0, Assign ISA_IRQ_VECTOR(irq) to IRQ 0..15.
	 * If these IRQ's are handled by legacy interrupt-controllers like PIC,
	 * then this configuration will likely be static after the boot. If
	 * these IRQs are handled by more modern controllers like IO-APIC,
	 * then this vector space can be freed and re-used dynamically as the
	 * irq's migrate etc.
	 */
	for (i = 0; i < nr_legacy_irqs(); i++)
		per_cpu(vector_irq, 0)[ISA_IRQ_VECTOR(i)] = irq_to_desc(i);

	BUG_ON(irq_init_percpu_irqstack(smp_processor_id()));

	x86_init.irqs.intr_init();
}

void __init native_init_IRQ(void)
{
	/* Execute any quirks before the call gates are initialised: */
	x86_init.irqs.pre_vector_init();

	if (cpu_feature_enabled(X86_FEATURE_FRED))
		fred_complete_exception_setup();
	else
		idt_setup_apic_and_irq_gates();

	lapic_assign_system_vectors();

	if (!acpi_ioapic && !of_ioapic && nr_legacy_irqs()) {
		/* IRQ2 is cascade interrupt to second interrupt controller */
		if (request_irq(2, no_action, IRQF_NO_THREAD, "cascade", NULL))
			pr_err("%s: request_irq() failed\n", "cascade");
	}
}