hpsim_irq.c 963 字节
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/*
 * Platform dependent support for HP simulator.
 *
 * Copyright (C) 1998-2001 Hewlett-Packard Co
 * Copyright (C) 1998-2001 David Mosberger-Tang <davidm@hpl.hp.com>
 */

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/irq.h>

static unsigned int
hpsim_irq_startup (unsigned int irq)
{
	return 0;
}

static void
hpsim_irq_noop (unsigned int irq)
{
}

24
static int
25
hpsim_set_affinity_noop(unsigned int a, const struct cpumask *b)
L
Linus Torvalds 已提交
26
{
27
	return 0;
L
Linus Torvalds 已提交
28 29
}

30
static struct irq_chip irq_type_hp_sim = {
I
Ingo Molnar 已提交
31
	.name =		"hpsim",
L
Linus Torvalds 已提交
32 33 34 35 36 37 38 39 40 41 42 43
	.startup =	hpsim_irq_startup,
	.shutdown =	hpsim_irq_noop,
	.enable =	hpsim_irq_noop,
	.disable =	hpsim_irq_noop,
	.ack =		hpsim_irq_noop,
	.end =		hpsim_irq_noop,
	.set_affinity =	hpsim_set_affinity_noop,
};

void __init
hpsim_irq_init (void)
{
44
	struct irq_desc *idesc;
L
Linus Torvalds 已提交
45 46 47
	int i;

	for (i = 0; i < NR_IRQS; ++i) {
48
		idesc = irq_desc + i;
49
		if (idesc->chip == &no_irq_chip)
50
			idesc->chip = &irq_type_hp_sim;
L
Linus Torvalds 已提交
51 52
	}
}