linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Stop people including linux/irq.h
@ 2004-10-20 18:16 Russell King
  2004-10-20 22:19 ` Nigel Cunningham
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2004-10-20 18:16 UTC (permalink / raw)
  To: Linux Kernel List, Linus Torvalds, Andrew Morton

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.

--- linux/include/linux/irq.h	Tue Apr 13 14:10:15 2004
+++ /dev/null	Sat Apr 26 08:56:46 1997
@@ -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 */


-- 
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 core

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Stop people including linux/irq.h
  2004-10-20 18:16 Stop people including linux/irq.h Russell King
@ 2004-10-20 22:19 ` Nigel Cunningham
  0 siblings, 0 replies; 2+ messages in thread
From: Nigel Cunningham @ 2004-10-20 22:19 UTC (permalink / raw)
  To: Russell King; +Cc: Linux Kernel Mailing List, Linus Torvalds, Andrew Morton

Hi.

On Thu, 2004-10-21 at 04:16, Russell King wrote:
> -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];
> -

Hmm. How about suspend-to-disk (and -ram?), lkcd and the like saving and
restoring IRQ affinities?

Regards,

Nigel
-- 
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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-20 22:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 18:16 Stop people including linux/irq.h Russell King
2004-10-20 22:19 ` Nigel Cunningham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).