LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ibmebus: Change ibmebus_request_irq() to optionally return irq number
@ 2008-06-09 15:44 Stefan Roscher
  2008-06-09 15:57 ` Jan-Bernd Themann
  2008-06-09 23:15 ` Stephen Rothwell
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Roscher @ 2008-06-09 15:44 UTC (permalink / raw)
  To: Roland Dreier, OF-EWG, OF-General, LKML, LinuxPPC-Dev
  Cc: TKLEIN, fenkes, raisch, THEMANN

Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
---
 arch/powerpc/kernel/ibmebus.c        |    5 ++++-
 drivers/infiniband/hw/ehca/ehca_eq.c |    4 ++--
 drivers/net/ehea/ehea_main.c         |    6 +++---
 include/asm-powerpc/ibmebus.h        |    2 +-
 4 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 9971159..a002fdf 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -208,7 +208,7 @@ void ibmebus_unregister_driver(struct of_platform_driver *drv)
 }
 EXPORT_SYMBOL(ibmebus_unregister_driver);
 
-int ibmebus_request_irq(u32 ist, irq_handler_t handler,
+int ibmebus_request_irq(u32 ist, int *irq_number, irq_handler_t handler,
 			unsigned long irq_flags, const char *devname,
 			void *dev_id)
 {
@@ -217,6 +217,9 @@ int ibmebus_request_irq(u32 ist, irq_handler_t handler,
 	if (irq == NO_IRQ)
 		return -EINVAL;
 
+	if (irq_number)
+		*irq_number = irq;
+
 	return request_irq(irq, handler, irq_flags, devname, dev_id);
 }
 EXPORT_SYMBOL(ibmebus_request_irq);
diff --git a/drivers/infiniband/hw/ehca/ehca_eq.c b/drivers/infiniband/hw/ehca/ehca_eq.c
index 49660df..5bc494f 100644
--- a/drivers/infiniband/hw/ehca/ehca_eq.c
+++ b/drivers/infiniband/hw/ehca/ehca_eq.c
@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shca,
 
 	/* register interrupt handlers and initialize work queues */
 	if (type == EHCA_EQ) {
-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
+		ret = ibmebus_request_irq(eq->ist, NULL, ehca_interrupt_eq,
 					  IRQF_DISABLED, "ehca_eq",
 					  (void *)shca);
 		if (ret < 0)
@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shca,
 
 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
 	} else if (type == EHCA_NEQ) {
-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
+		ret = ibmebus_request_irq(eq->ist, NULL, ehca_interrupt_neq,
 					  IRQF_DISABLED, "ehca_neq",
 					  (void *)shca);
 		if (ret < 0)
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 287a619..102ffeb 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -1216,7 +1216,7 @@ static int ehea_reg_interrupts(struct net_device *dev)
 	snprintf(port->int_aff_name, EHEA_IRQ_NAME_SIZE - 1, "%s-aff",
 		 dev->name);
 
-	ret = ibmebus_request_irq(port->qp_eq->attr.ist1,
+	ret = ibmebus_request_irq(port->qp_eq->attr.ist1, NULL,
 				  ehea_qp_aff_irq_handler,
 				  IRQF_DISABLED, port->int_aff_name, port);
 	if (ret) {
@@ -1234,7 +1234,7 @@ static int ehea_reg_interrupts(struct net_device *dev)
 		pr = &port->port_res[i];
 		snprintf(pr->int_send_name, EHEA_IRQ_NAME_SIZE - 1,
 			 "%s-queue%d", dev->name, i);
-		ret = ibmebus_request_irq(pr->eq->attr.ist1,
+		ret = ibmebus_request_irq(pr->eq->attr.ist1, NULL,
 					  ehea_recv_irq_handler,
 					  IRQF_DISABLED, pr->int_send_name,
 					  pr);
@@ -3414,7 +3414,7 @@ static int __devinit ehea_probe_adapter(struct of_device *dev,
 	tasklet_init(&adapter->neq_tasklet, ehea_neq_tasklet,
 		     (unsigned long)adapter);
 
-	ret = ibmebus_request_irq(adapter->neq->attr.ist1,
+	ret = ibmebus_request_irq(adapter->neq->attr.ist1, NULL,
 				  ehea_interrupt_neq, IRQF_DISABLED,
 				  "ehea_neq", adapter);
 	if (ret) {
diff --git a/include/asm-powerpc/ibmebus.h b/include/asm-powerpc/ibmebus.h
index 1a9d9ae..3a2618a 100644
--- a/include/asm-powerpc/ibmebus.h
+++ b/include/asm-powerpc/ibmebus.h
@@ -51,7 +51,7 @@ extern struct bus_type ibmebus_bus_type;
 int ibmebus_register_driver(struct of_platform_driver *drv);
 void ibmebus_unregister_driver(struct of_platform_driver *drv);
 
-int ibmebus_request_irq(u32 ist, irq_handler_t handler,
+int ibmebus_request_irq(u32 ist, int *irq_number, irq_handler_t handler,
 			unsigned long irq_flags, const char *devname,
 			void *dev_id);
 void ibmebus_free_irq(u32 ist, void *dev_id);
-- 
1.5.5

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

* Re: [PATCH 1/2] ibmebus: Change ibmebus_request_irq() to optionally return irq number
  2008-06-09 15:44 [PATCH 1/2] ibmebus: Change ibmebus_request_irq() to optionally return irq number Stefan Roscher
@ 2008-06-09 15:57 ` Jan-Bernd Themann
  2008-06-09 23:15 ` Stephen Rothwell
  1 sibling, 0 replies; 3+ messages in thread
From: Jan-Bernd Themann @ 2008-06-09 15:57 UTC (permalink / raw)
  To: Stefan Roscher
  Cc: Thomas Q Klein, Joachim Fenkes, OF-EWG, LKML, LinuxPPC-Dev,
	Christoph Raisch, OF-General

[-- Attachment #1: Type: text/plain, Size: 4516 bytes --]

Stefan Roscher <ossrosch@linux.vnet.ibm.com> wrote on 09.06.2008 17:44:29:

> Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
> ---
>  arch/powerpc/kernel/ibmebus.c        |    5 ++++-
>  drivers/infiniband/hw/ehca/ehca_eq.c |    4 ++--
>  drivers/net/ehea/ehea_main.c         |    6 +++---
>  include/asm-powerpc/ibmebus.h        |    2 +-
>  4 files changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/ibmebus.c 
b/arch/powerpc/kernel/ibmebus.c
> index 9971159..a002fdf 100644
> --- a/arch/powerpc/kernel/ibmebus.c
> +++ b/arch/powerpc/kernel/ibmebus.c
> @@ -208,7 +208,7 @@ void ibmebus_unregister_driver(struct 
> of_platform_driver *drv)
>  }
>  EXPORT_SYMBOL(ibmebus_unregister_driver);
> 
> -int ibmebus_request_irq(u32 ist, irq_handler_t handler,
> +int ibmebus_request_irq(u32 ist, int *irq_number, irq_handler_t 
handler,
>           unsigned long irq_flags, const char *devname,
>           void *dev_id)
>  {
> @@ -217,6 +217,9 @@ int ibmebus_request_irq(u32 ist, irq_handler_t 
handler,
>     if (irq == NO_IRQ)
>        return -EINVAL;
> 
> +   if (irq_number)
> +      *irq_number = irq;
> +
>     return request_irq(irq, handler, irq_flags, devname, dev_id);
>  }
>  EXPORT_SYMBOL(ibmebus_request_irq);
> diff --git a/drivers/infiniband/hw/ehca/ehca_eq.c 
> b/drivers/infiniband/hw/ehca/ehca_eq.c
> index 49660df..5bc494f 100644
> --- a/drivers/infiniband/hw/ehca/ehca_eq.c
> +++ b/drivers/infiniband/hw/ehca/ehca_eq.c
> @@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shca,
> 
>     /* register interrupt handlers and initialize work queues */
>     if (type == EHCA_EQ) {
> -      ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
> +      ret = ibmebus_request_irq(eq->ist, NULL, ehca_interrupt_eq,
>                   IRQF_DISABLED, "ehca_eq",
>                   (void *)shca);
>        if (ret < 0)
> @@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shca,
> 
>        tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
>     } else if (type == EHCA_NEQ) {
> -      ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
> +      ret = ibmebus_request_irq(eq->ist, NULL, ehca_interrupt_neq,
>                   IRQF_DISABLED, "ehca_neq",
>                   (void *)shca);
>        if (ret < 0)
> diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
> index 287a619..102ffeb 100644
> --- a/drivers/net/ehea/ehea_main.c
> +++ b/drivers/net/ehea/ehea_main.c
> @@ -1216,7 +1216,7 @@ static int ehea_reg_interrupts(struct net_device 
*dev)
>     snprintf(port->int_aff_name, EHEA_IRQ_NAME_SIZE - 1, "%s-aff",
>         dev->name);
> 
> -   ret = ibmebus_request_irq(port->qp_eq->attr.ist1,
> +   ret = ibmebus_request_irq(port->qp_eq->attr.ist1, NULL,
>                ehea_qp_aff_irq_handler,
>                IRQF_DISABLED, port->int_aff_name, port);
>     if (ret) {
> @@ -1234,7 +1234,7 @@ static int ehea_reg_interrupts(struct net_device 
*dev)
>        pr = &port->port_res[i];
>        snprintf(pr->int_send_name, EHEA_IRQ_NAME_SIZE - 1,
>            "%s-queue%d", dev->name, i);
> -      ret = ibmebus_request_irq(pr->eq->attr.ist1,
> +      ret = ibmebus_request_irq(pr->eq->attr.ist1, NULL,
>                   ehea_recv_irq_handler,
>                   IRQF_DISABLED, pr->int_send_name,
>                   pr);
> @@ -3414,7 +3414,7 @@ static int __devinit ehea_probe_adapter(struct
> of_device *dev,
>     tasklet_init(&adapter->neq_tasklet, ehea_neq_tasklet,
>             (unsigned long)adapter);
> 
> -   ret = ibmebus_request_irq(adapter->neq->attr.ist1,
> +   ret = ibmebus_request_irq(adapter->neq->attr.ist1, NULL,
>                ehea_interrupt_neq, IRQF_DISABLED,
>                "ehea_neq", adapter);
>     if (ret) {
> diff --git a/include/asm-powerpc/ibmebus.h 
b/include/asm-powerpc/ibmebus.h
> index 1a9d9ae..3a2618a 100644
> --- a/include/asm-powerpc/ibmebus.h
> +++ b/include/asm-powerpc/ibmebus.h
> @@ -51,7 +51,7 @@ extern struct bus_type ibmebus_bus_type;
>  int ibmebus_register_driver(struct of_platform_driver *drv);
>  void ibmebus_unregister_driver(struct of_platform_driver *drv);
> 
> -int ibmebus_request_irq(u32 ist, irq_handler_t handler,
> +int ibmebus_request_irq(u32 ist, int *irq_number, irq_handler_t 
handler,
>           unsigned long irq_flags, const char *devname,
>           void *dev_id);
>  void ibmebus_free_irq(u32 ist, void *dev_id);
> -- 
> 1.5.5
> 

Concerning the eHEA part:

Acked-by: Jan-Bernd Themann <themann@de.ibm.com>

Regards,
Jan-Bernd

[-- Attachment #2: Type: text/html, Size: 6750 bytes --]

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

* Re: [PATCH 1/2] ibmebus: Change ibmebus_request_irq() to optionally return irq number
  2008-06-09 15:44 [PATCH 1/2] ibmebus: Change ibmebus_request_irq() to optionally return irq number Stefan Roscher
  2008-06-09 15:57 ` Jan-Bernd Themann
@ 2008-06-09 23:15 ` Stephen Rothwell
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2008-06-09 23:15 UTC (permalink / raw)
  To: Stefan Roscher
  Cc: TKLEIN, THEMANN, fenkes, OF-EWG, LKML, LinuxPPC-Dev, raisch,
	OF-General

[-- Attachment #1: Type: text/plain, Size: 374 bytes --]

Hi Stefan,

On Mon, 9 Jun 2008 17:44:29 +0200 Stefan Roscher <ossrosch@linux.vnet.ibm.com> wrote:
>
> Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>

Before Paulus gets to you:  Why are we doing this?  Please write an
explanatory commit message.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2008-06-09 23:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-09 15:44 [PATCH 1/2] ibmebus: Change ibmebus_request_irq() to optionally return irq number Stefan Roscher
2008-06-09 15:57 ` Jan-Bernd Themann
2008-06-09 23:15 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox