#include <linux/config.h>
#include <linux/ptrace.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/timex.h>
#include <linux/slab.h>
#include <linux/random.h>
#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/kernel_stat.h>
#include <linux/irq.h>
#include <linux/proc_fs.h>
#include <asm/atomic.h>
#include <asm/io.h>
#include <asm/smp.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/uaccess.h>
#include <asm/pgalloc.h>
#include <asm/delay.h>
#include <asm/desc.h>
#include <asm/irq.h>
#include <idbdef.h>
#include <ucbdef.h>
#include <crbdef.h>
#include <vecdef.h>
Go to the source code of this file.
Defines | |
#define | shutdown_none disable_none |
#define | end_none enable_none |
#define | HEX_DIGITS 8 |
#define | MAX_NAMELEN 10 |
Functions | |
void | vms_no_action (int cpl, void *dev_id, struct pt_regs *regs) |
int | vms_get_irq_list (char *buf) |
int | vms_handle_IRQ_event (struct _idb *idb, unsigned int irq, struct pt_regs *regs, struct irqaction *action) |
void | vms_disable_irq_nosync (unsigned int irq) |
void | vms_disable_irq (unsigned int irq) |
void | vms_enable_irq (unsigned int irq) |
asmlinkage unsigned int | vms_do_IRQ (struct pt_regs regs) |
int | vms_request_irq (struct _idb *idb, unsigned int irq, void(*handler)(int, void *, struct pt_regs *), unsigned long irqflags, const char *devname, void *dev_id) |
void | vms_free_irq (unsigned int irq, void *dev_id) |
unsigned long | vms_probe_irq_on (void) |
unsigned int | vms_probe_irq_mask (unsigned long val) |
int | vms_probe_irq_off (unsigned long val) |
int | vms_setup_irq (unsigned int irq, struct irqaction *new) |
void | vms_init_irq_proc (void) |
Variables | |
irq_desc_t vms_irq_desc[NR_IRQS] | __cacheline_aligned |
struct hw_interrupt_type | vms_no_irq_type |
atomic_t | vms_irq_err_count |
unsigned long | vms_prof_cpu_mask = -1 |
void vms_disable_irq | ( | unsigned int | irq | ) |
disable_irq - disable an irq and wait for completion : Interrupt to disable
Disable the selected interrupt line. Enables and Disables are nested. This function waits for any pending IRQ handlers for this interrupt to complete before returning. If you use this function while holding a resource the IRQ handler may need you will deadlock.
This function may be called - with care - from IRQ context.
void vms_disable_irq_nosync | ( | unsigned int | irq | ) | [inline] |
disable_irq_nosync - disable an irq without waiting : Interrupt to disable
Disable the selected interrupt line. Disables and Enables are nested. Unlike disable_irq(), this function does not ensure existing instances of the IRQ handler have completed before returning.
This function may be called from IRQ context.
asmlinkage unsigned int vms_do_IRQ | ( | struct pt_regs | regs | ) |
void vms_enable_irq | ( | unsigned int | irq | ) |
void vms_free_irq | ( | unsigned int | irq, | |
void * | dev_id | |||
) |
free_irq - free an interrupt : Interrupt line to free : Device identity to free
Remove an interrupt handler. The handler is removed and if the interrupt line is no longer in use by any driver it is disabled. On a shared IRQ the caller must ensure the interrupt is disabled on the card it drives before calling this function. The function does not return until any executing interrupts for this IRQ have completed.
This function may be called from interrupt context.
Bugs: Attempting to free an irq in a handler for the same irq hangs the machine.
Definition at line 755 of file vmsirq.c.
References kfree().
int vms_handle_IRQ_event | ( | struct _idb * | idb, | |
unsigned int | irq, | |||
struct pt_regs * | regs, | |||
struct irqaction * | action | |||
) |
void vms_no_action | ( | int | cpl, | |
void * | dev_id, | |||
struct pt_regs * | regs | |||
) |
unsigned int vms_probe_irq_mask | ( | unsigned long | val | ) |
probe_irq_mask - scan a bitmap of interrupt lines : mask of interrupts to consider
Scan the ISA bus interrupt lines and return a bitmap of active interrupts. The interrupt probe logic state is then returned to its previous value.
Note: we need to scan all the irq's even though we will only return ISA irq numbers - just so that we reset them all to a known state.
int vms_probe_irq_off | ( | unsigned long | val | ) |
probe_irq_off - end an interrupt autodetect : mask of potential interrupts (unused)
Scans the unused interrupt lines and returns the line which appears to have triggered the interrupt. If no interrupt was found then zero is returned. If more than one interrupt is found then minus the first candidate is returned to indicate their is doubt.
The interrupt probe logic state is returned to its previous value.
BUGS: When used in a module (which arguably shouldnt happen) nothing prevents two IRQ probe callers from overlapping. The results of this are non-optimal.
unsigned long vms_probe_irq_on | ( | void | ) |
int vms_request_irq | ( | struct _idb * | idb, | |
unsigned int | irq, | |||
void(*)(int, void *, struct pt_regs *) | handler, | |||
unsigned long | irqflags, | |||
const char * | devname, | |||
void * | dev_id | |||
) |
request_irq - allocate an interrupt line : Interrupt line to allocate : Function to be called when the IRQ occurs : Interrupt type flags : An ascii name for the claiming device : A cookie passed back to the handler function
This call allocates interrupt resources and enables the interrupt line and IRQ handling. From the point this call is made your handler function may be invoked. Since your handler function must clear any interrupt the board raises, you must take care both to initialise your hardware and to set up the interrupt handler in the right order.
Dev_id must be globally unique. Normally the address of the device data structure is used as the cookie. Since the handler receives this value it makes sense to use it.
If your interrupt is shared you must pass a non NULL dev_id as this is required when freeing the interrupt.
Flags:
SA_SHIRQ Interrupt is shared
SA_INTERRUPT Disable local interrupts while processing
SA_SAMPLE_RANDOM The interrupt can be used for entropy
int vms_setup_irq | ( | unsigned int | irq, | |
struct irqaction * | new | |||
) |
irq_desc_t vms_irq_desc [NR_IRQS] __cacheline_aligned |
atomic_t vms_irq_err_count |
struct hw_interrupt_type vms_no_irq_type |
Initial value:
{ "none", startup_none, shutdown_none, enable_none, disable_none, ack_none, end_none }
unsigned long vms_prof_cpu_mask = -1 |