Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212162
b: refs/heads/master
c: 3795de2
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Oct 12, 2010
1 parent ab408e5 commit 0b75590
Show file tree
Hide file tree
Showing 5 changed files with 341 additions and 333 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f303a6dd127b5ec6de90d1cd79ed19820c7e9658
refs/heads/master: 3795de236d67a05994a1a12759db9d4dd9ffc42c
2 changes: 1 addition & 1 deletion trunk/kernel/irq/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

obj-y := handle.o manage.o spurious.o resend.o chip.o devres.o
obj-y := irqdesc.o handle.o manage.o spurious.o resend.o chip.o dummychip.o devres.o
obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o
obj-$(CONFIG_PROC_FS) += proc.o
obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o
Expand Down
68 changes: 68 additions & 0 deletions trunk/kernel/irq/dummychip.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar
* Copyright (C) 2005-2006, Thomas Gleixner, Russell King
*
* This file contains the dummy interrupt chip implementation
*/
#include <linux/interrupt.h>
#include <linux/irq.h>

#include "internals.h"

/*
* What should we do if we get a hw irq event on an illegal vector?
* Each architecture has to answer this themself.
*/
static void ack_bad(struct irq_data *data)
{
struct irq_desc *desc = irq_data_to_desc(data);

print_irq_desc(data->irq, desc);
ack_bad_irq(data->irq);
}

/*
* NOP functions
*/
static void noop(struct irq_data *data) { }

static unsigned int noop_ret(struct irq_data *data)
{
return 0;
}

#ifndef CONFIG_GENERIC_HARDIRQS_NO_CRUFT
static void compat_noop(unsigned int irq) { }
#define END_INIT .end = compat_noop
#else
#define END_INIT
#endif

/*
* Generic no controller implementation
*/
struct irq_chip no_irq_chip = {
.name = "none",
.irq_startup = noop_ret,
.irq_shutdown = noop,
.irq_enable = noop,
.irq_disable = noop,
.irq_ack = ack_bad,
END_INIT
};

/*
* Generic dummy implementation which can be used for
* real dumb interrupt sources
*/
struct irq_chip dummy_irq_chip = {
.name = "dummy",
.irq_startup = noop_ret,
.irq_shutdown = noop,
.irq_enable = noop,
.irq_disable = noop,
.irq_ack = noop,
.irq_mask = noop,
.irq_unmask = noop,
END_INIT
};
Loading

0 comments on commit 0b75590

Please sign in to comment.