lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061002162049.17763.39576.stgit@warthog.cambridge.redhat.com>
Date:	Mon, 02 Oct 2006 17:20:49 +0100
From:	David Howells <dhowells@...hat.com>
To:	torvalds@...l.org, akpm@...l.org
Cc:	dhowells@...hat.com, linux-kernel@...r.kernel.org,
	linux-arch@...r.kernel.org
Subject: [PATCH 1/3] IRQ: Typedef the IRQ flow handler function type

From: David Howells <dhowells@...hat.com>

Typedef the IRQ flow handler function type.

Signed-Off-By: David Howells <dhowells@...hat.com>
---

 include/linux/irq.h |   30 ++++++++++++------------------
 kernel/irq/chip.c   |   12 +++---------
 2 files changed, 15 insertions(+), 27 deletions(-)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 48d3cb3..8e1e1d8 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -22,6 +22,12 @@ #include <linux/irqreturn.h>
 #include <asm/irq.h>
 #include <asm/ptrace.h>
 
+struct irq_desc;
+typedef	void fastcall (*irq_flow_handler_t)(unsigned int irq,
+					    struct irq_desc *desc,
+					    struct pt_regs *regs);
+
+
 /*
  * IRQ line status.
  *
@@ -139,9 +145,7 @@ #endif
  * Pad this out to 32 bytes for cache and indexing reasons.
  */
 struct irq_desc {
-	void fastcall		(*handle_irq)(unsigned int irq,
-					      struct irq_desc *desc,
-					      struct pt_regs *regs);
+	irq_flow_handler_t	handle_irq;
 	struct irq_chip		*chip;
 	void			*handler_data;
 	void			*chip_data;
@@ -312,9 +316,7 @@ handle_bad_irq(unsigned int irq, struct 
  * Get a descriptive string for the highlevel handler, for
  * /proc/interrupts output:
  */
-extern const char *
-handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *,
-					struct pt_regs *));
+extern const char *handle_irq_name(irq_flow_handler_t handle);
 
 /*
  * Monolithic do_IRQ implementation.
@@ -366,22 +368,15 @@ extern struct irq_chip dummy_irq_chip;
 
 extern void
 set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
-			 void fastcall (*handle)(unsigned int,
-						 struct irq_desc *,
-						 struct pt_regs *));
+			 irq_flow_handler_t handle);
 extern void
-__set_irq_handler(unsigned int irq,
-		  void fastcall (*handle)(unsigned int, struct irq_desc *,
-					  struct pt_regs *),
-		  int is_chained);
+__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained);
 
 /*
  * Set a highlevel flow handler for a given IRQ:
  */
 static inline void
-set_irq_handler(unsigned int irq,
-		void fastcall (*handle)(unsigned int, struct irq_desc *,
-					struct pt_regs *))
+set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
 {
 	__set_irq_handler(irq, handle, 0);
 }
@@ -393,8 +388,7 @@ set_irq_handler(unsigned int irq,
  */
 static inline void
 set_irq_chained_handler(unsigned int irq,
-			void fastcall (*handle)(unsigned int, struct irq_desc *,
-						struct pt_regs *))
+			irq_flow_handler_t handle)
 {
 	__set_irq_handler(irq, handle, 1);
 }
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 736cb0b..ca8a28d 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -442,10 +442,7 @@ handle_percpu_irq(unsigned int irq, stru
 #endif /* CONFIG_SMP */
 
 void
-__set_irq_handler(unsigned int irq,
-		  void fastcall (*handle)(unsigned int, irq_desc_t *,
-					  struct pt_regs *),
-		  int is_chained)
+__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained)
 {
 	struct irq_desc *desc;
 	unsigned long flags;
@@ -498,9 +495,7 @@ __set_irq_handler(unsigned int irq,
 
 void
 set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
-			 void fastcall (*handle)(unsigned int,
-						 struct irq_desc *,
-						 struct pt_regs *))
+			 irq_flow_handler_t handle)
 {
 	set_irq_chip(irq, chip);
 	__set_irq_handler(irq, handle, 0);
@@ -511,8 +506,7 @@ set_irq_chip_and_handler(unsigned int ir
  * /proc/interrupts output:
  */
 const char *
-handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *,
-					struct pt_regs *))
+handle_irq_name(irq_flow_handler_t handle)
 {
 	if (handle == handle_level_irq)
 		return "level  ";
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ