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

#if defined(CONFIG_X86_64) || defined(CONFIG_X86_LOCAL_APIC)
	init_bsp_APIC();
#endif
	legacy_pic->init(0);

	for (i = 0; i < nr_legacy_irqs(); i++)
		irq_set_chip_and_handler(i, chip, handle_level_irq);
}
Example #2
0
void __init init_ISA_irqs(void)
{
	struct irq_chip *chip = legacy_pic->chip;
	const char *name = chip->name;
	int i;

#if defined(CONFIG_X86_64) || defined(CONFIG_X86_LOCAL_APIC)
	init_bsp_APIC();
#endif
	legacy_pic->init(0);

	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++)
		irq_set_chip_and_handler_name(i, chip, handle_level_irq, name);
}
Example #3
0
/**
	@brief prepare goto the smp mode 
*/
static void x86_prepare_smp()
{
	/* Find and Analyze the table from BIOS AND ACPI*/
	mptable_find_smp_config();
	mptable_get_smp_config();

	/* This is called in init_IRQ */
	init_bsp_APIC();

	/* Connect apic */
	connect_bsp_APIC();	
	setup_local_APIC();
	bsp_end_local_APIC_setup();
	printk("\n%s->%s->%d.",__FILE__,__FUNCTION__,__LINE__);
}
Example #4
0
static void __init init_ISA_irqs(void)
{
	int i;

	init_bsp_APIC();
	init_8259A(0);

	for (i = 0; i < NR_IRQS_LEGACY; i++) {
		struct irq_desc *desc = irq_to_desc(i);

		desc->status = IRQ_DISABLED;
		desc->action = NULL;
		desc->depth = 1;

		/*
		 * 16 old-style INTA-cycle interrupts:
		 */
		set_irq_chip_and_handler_name(i, &i8259A_chip,
						      handle_level_irq, "XT");
	}
}
Example #5
0
void __init init_ISA_irqs(void)
{
	/* CHIP默认是i8259A_chip */
	struct irq_chip *chip = legacy_pic->chip;
	int i;

#if defined(CONFIG_X86_64) || defined(CONFIG_X86_LOCAL_APIC)
	/* 使用了CPU本地中断控制器 */
	/* 开启virtual wire mode */
	init_bsp_APIC();
#endif
	/* 其实就是调用init_8259A(),进行8259A硬件的初始化 */
	legacy_pic->init(0);

	for (i = 0; i < nr_legacy_irqs(); i++)
		/* i为中断号,chip是irq_chip结构,最后是中断回调函数 
		 * 设置了中断号i的中断描述符的irq_data.irq_chip = i8259A_chip
		 * 设置了中断回调函数为handle_level_irq
		 */
		irq_set_chip_and_handler(i, chip, handle_level_irq);
}
void __init init_ISA_irqs(void)
{
	int i;

#if defined(CONFIG_X86_64) || defined(CONFIG_X86_LOCAL_APIC)
	init_bsp_APIC();
#endif
	legacy_pic->init(0);

	/*
	 * 16 old-style INTA-cycle interrupts:
	 */
	for (i = 0; i < legacy_pic->nr_legacy_irqs; i++) {
		struct irq_desc *desc = irq_to_desc(i);

		desc->status = IRQ_DISABLED;
		desc->action = NULL;
		desc->depth = 1;

		set_irq_chip_and_handler_name(i, &i8259A_chip,
					      handle_level_irq, "XT");
	}
}
Example #7
0
void __init init_ISA_irqs (void)
{
	int i;

#ifdef CONFIG_X86_LOCAL_APIC
	init_bsp_APIC();
#endif
	init_8259A(0);

	/*
	 * 16 old-style INTA-cycle interrupts:
	 */
	for (i = 0; i < 16; i++) {
		/* first time call this irq_desc */
		struct irq_desc *desc = irq_to_desc(i);

		desc->status = IRQ_DISABLED;
		desc->action = NULL;
		desc->depth = 1;

		set_irq_chip_and_handler_name(i, &i8259A_chip,
					      handle_level_irq, "XT");
	}
}