Blame view

kernel/irq/dummychip.c 1.26 KB
3795de236   Thomas Gleixner   genirq: Distangle...
1
2
3
4
5
6
7
8
  /*
   * 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>
17d83127d   Kuninori Morimoto   genirq: Export du...
9
  #include <linux/export.h>
3795de236   Thomas Gleixner   genirq: Distangle...
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  
  #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;
  }
3795de236   Thomas Gleixner   genirq: Distangle...
34
35
36
37
38
39
40
41
42
43
  /*
   * 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,
3795de236   Thomas Gleixner   genirq: Distangle...
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
  };
  
  /*
   * 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,
10a50f1ab   Roger Quadros   genirq: Set IRQCH...
59
  	.flags		= IRQCHIP_SKIP_SET_WAKE,
3795de236   Thomas Gleixner   genirq: Distangle...
60
  };
17d83127d   Kuninori Morimoto   genirq: Export du...
61
  EXPORT_SYMBOL_GPL(dummy_irq_chip);