Stop people including linux/irq.h
Linus, Andrew,
Here is an extreme attempt at preventing the fuckage known as including linux/irq.h inappropriately. Since people don't seem to get the message, the only option is to remove the bloody file.
Shame this breaks everyone using the generic IRQ infrastructure, but I see no other option to educate people.
Maybe someone can add it back as linux/include/asm-generic/irq.h, which is where it should've been in the first place.
include/linux/irq.h deleted +0 -80
@@ -1,80 +0,0 @@ -#ifndef __irq_h -#define __irq_h - -/* -* Please do not include this file in generic code. There is currently -* no requirement for any architecture to implement anything held -* within this file. -* -* Thanks. --rmk -*/ - -#include <linux/config.h> - -#if !defined(CONFIG_ARCH_S390 ) - -#include <linux/cache.h> -#include <linux/spinlock.h> -#include <linux/cpumask.h> - -#include <asm/irq.h> -#include <asm/ptrace.h> - -/* -* IRQ line status. -*/ -#define IRQ_INPROGRESS 1/* IRQ handler active - do not enter! */ -#define IRQ_DISABLED 2/* IRQ disabled - do not enter! */ -#define IRQ_PENDING 4/* IRQ pending - replay on enable */ -#define IRQ_REPLAY 8/* IRQ has been replayed but not acked yet */ -#define IRQ_AUTODETECT 16/* IRQ is being autodetected */ -#define IRQ_WAITING 32/* IRQ not yet seen - for autodetection */ -#define IRQ_LEVEL 64/* IRQ level triggered */ -#define IRQ_MASKED 128/* IRQ masked - shouldn't be seen again */ -#define IRQ_PER_CPU 256/* IRQ is per CPU */ - -/* -* Interrupt controller descriptor. This is all we need -* to describe about the low-level hardware. -*/ -struct hw_interrupt_type { -const char * typename; -unsigned int (*startup)(unsigned int irq); -void (*shutdown)(unsigned int irq); -void (*enable)(unsigned int irq); -void (*disable)(unsigned int irq); -void (*ack)(unsigned int irq); -void (*end)(unsigned int irq); -void (*set_affinity)(unsigned int irq,cpumask_t dest); -}; - -typedef struct hw_interrupt_type hw_irq_controller ; - -/* -* This is the "IRQ descriptor", which contains various information -* about the irq, including what kind of hardware handling it has, -* whether it is disabled etc etc. -* -* Pad this out to 32 bytes for cache and indexing reasons. -*/ -typedef struct irq_desc { -unsigned int status;/* IRQ status */ -hw_irq_controller *handler; -struct irqaction *action;/* IRQ action list */ -unsigned int depth;/* nested irq disables */ -unsigned int irq_count;/* For detecting broken interrupts */ -unsigned int irqs_unhandled; -spinlock_t lock; -}____cacheline_aligned irq_desc_t ; - -extern irq_desc_t irq_desc [NR_IRQS ]; - -#include <asm/hw_irq.h> /* the arch dependent stuff */ - -extern int setup_irq (unsigned int ,struct irqaction * ); - -extern hw_irq_controller no_irq_type;/* needed in every arch ? */ - -#endif - -#endif /* __irq_h */
Signature · 4 lines
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial coreHi.
Quoted 22 lines · Russell King
include/linux/irq.h deleted +0
-22-struct hw_interrupt_type { -const char * typename; -unsigned int (*startup)(unsigned int irq); -void (*shutdown)(unsigned int irq); -void (*enable)(unsigned int irq); -void (*disable)(unsigned int irq); -void (*ack)(unsigned int irq); -void (*end)(unsigned int irq); -void (*set_affinity)(unsigned int irq,cpumask_t dest); -}; - -typedef struct hw_interrupt_type hw_irq_controller ; - -/* -* This is the "IRQ descriptor", which contains various information -* about the irq, including what kind of hardware handling it has, -* whether it is disabled etc etc. -* -* Pad this out to 32 bytes for cache and indexing reasons. -*/ -typedef struct irq_desc { - unsigned int status; /* IRQ status */
include/linux/irq.h line 71
Quoted 10 lines
include/linux/irq.h deleted +0
-10-hw_irq_controller *handler; -struct irqaction *action;/* IRQ action list */ -unsigned int depth;/* nested irq disables */ -unsigned int irq_count;/* For detecting broken interrupts */ -unsigned int irqs_unhandled; -spinlock_t lock; -}____cacheline_aligned irq_desc_t; - -extern irq_desc_t irq_desc [NR_IRQS ]; -
Hmm. How about suspend-to-disk (and -ram?), lkcd and the like saving and restoring IRQ affinities?
Regards,
Nigel
Signature · 7 lines
Nigel Cunningham Pastoral Worker Christian Reformed Church of Tuggeranong PO Box 1004, Tuggeranong, ACT 2901 Many today claim to be tolerant. True tolerance, however, can cope with others being intolerant.