Documentation/arch/arm/interrupts.rst

Source file repositories/reference/linux-study-clean/Documentation/arch/arm/interrupts.rst

File Facts

System
Linux kernel
Corpus path
Documentation/arch/arm/interrupts.rst
Extension
.rst
Size
6881 bytes
Lines
170
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

struct irqchip {
          /*
           * Acknowledge the IRQ.
           * If this is a level-based IRQ, then it is expected to mask the IRQ
           * as well.
           */
          void (*ack)(unsigned int irq);
          /*
           * Mask the IRQ in hardware.
           */
          void (*mask)(unsigned int irq);
          /*
           * Unmask the IRQ in hardware.
           */
          void (*unmask)(unsigned int irq);
          /*
           * Re-run the IRQ
           */
          void (*rerun)(unsigned int irq);
          /*
           * Set the type of the IRQ.
           */
          int (*type)(unsigned int irq, unsigned int, type);
  };

ack
       - required.  May be the same function as mask for IRQs
         handled by do_level_IRQ.
mask
       - required.
unmask
       - required.
rerun
       - optional.  Not required if you're using do_level_IRQ for all
         IRQs that use this 'irqchip'.  Generally expected to re-trigger
         the hardware IRQ if possible.  If not, may call the handler
	 directly.
type
       - optional.  If you don't support changing the type of an IRQ,
         it should be null so people can detect if they are unable to
         set the IRQ type.

For each IRQ, we keep the following information:

        - "disable" depth (number of disable_irq()s without enable_irq()s)
        - flags indicating what we can do with this IRQ (valid, probe,
          noautounmask) as before
        - status of the IRQ (probing, enable, etc)
        - chip
        - per-IRQ handler
        - irqaction structure list

The handler can be one of the 3 standard handlers - "level", "edge" and
"simple", or your own specific handler if you need to do something special.

The "level" handler is what we currently have - its pretty simple.
"edge" knows about the brokenness of such IRQ implementations - that you
need to leave the hardware IRQ enabled while processing it, and queueing
further IRQ events should the IRQ happen again while processing.  The
"simple" handler is very basic, and does not perform any hardware
manipulation, nor state tracking.  This is useful for things like the
SMC9196 and USAR above.

So, what's changed?
===================

1. Machine implementations must not write to the irqdesc array.

2. New functions to manipulate the irqdesc array.  The first 4 are expected
   to be useful only to machine specific code.  The last is recommended to

Annotation

Implementation Notes