From: Geoff Levand <geoffrey.levand@am.sony.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH 10/16] ps3: add interrupt alloc for outlets
Date: Fri, 26 Jan 2007 19:08:12 -0800 [thread overview]
Message-ID: <45BAC21C.7000104@am.sony.com> (raw)
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
PS3 interrupt core update:
- Add ps3_alloc_irq() and ps3_free_irq(), to allocate a virtual interrupt
number for an interrupt outlet, which is needed by the PS3 GPU frame
buffer device and audio drivers
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
Got rid of the redundent symbols ps3_connect_irq & ps3_disconnect_irq
as requested by Ben and Geert.
arch/powerpc/platforms/ps3/interrupt.c | 24 ++++++++++++++----------
include/asm-powerpc/ps3.h | 3 +++
2 files changed, 17 insertions(+), 10 deletions(-)
--- ps3-linux-dev.orig/arch/powerpc/platforms/ps3/interrupt.c
+++ ps3-linux-dev/arch/powerpc/platforms/ps3/interrupt.c
@@ -85,7 +85,7 @@ struct ps3_private {
static DEFINE_PER_CPU(struct ps3_private, ps3_private);
-static int ps3_connect_irq(enum ps3_cpu_binding cpu, unsigned long outlet,
+int ps3_alloc_irq(enum ps3_cpu_binding cpu, unsigned long outlet,
unsigned int *virq)
{
int result;
@@ -138,8 +138,9 @@ fail_connect:
fail_create:
return result;
}
+EXPORT_SYMBOL_GPL(ps3_alloc_irq);
-static void ps3_disconnect_irq(unsigned int virq)
+int ps3_free_irq(unsigned int virq)
{
int result;
const struct ps3_private *pd = get_irq_chip_data(virq);
@@ -155,7 +156,9 @@ static void ps3_disconnect_irq(unsigned
set_irq_chip_data(virq, NULL);
irq_dispose_mapping(virq);
+ return result;
}
+EXPORT_SYMBOL_GPL(ps3_free_irq);
/**
* ps3_alloc_io_irq - Assign a virq to a system bus device.
@@ -182,7 +185,7 @@ int ps3_alloc_io_irq(enum ps3_cpu_bindin
return result;
}
- result = ps3_connect_irq(cpu, outlet, virq);
+ result = ps3_alloc_irq(cpu, outlet, virq);
BUG_ON(result);
return result;
@@ -198,7 +201,7 @@ int ps3_free_io_irq(unsigned int virq)
pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n",
__func__, __LINE__, ps3_result(result));
- ps3_disconnect_irq(virq);
+ ps3_free_irq(virq);
return result;
}
@@ -228,7 +231,7 @@ int ps3_alloc_event_irq(enum ps3_cpu_bin
return result;
}
- result = ps3_connect_irq(cpu, outlet, virq);
+ result = ps3_alloc_irq(cpu, outlet, virq);
BUG_ON(result);
return result;
@@ -246,7 +249,7 @@ int ps3_free_event_irq(unsigned int virq
pr_debug("%s:%d: lv1_destruct_event_receive_port failed: %s\n",
__func__, __LINE__, ps3_result(result));
- ps3_disconnect_irq(virq);
+ ps3_free_irq(virq);
pr_debug(" <- %s:%d\n", __func__, __LINE__);
return result;
@@ -350,7 +353,7 @@ int ps3_alloc_vuart_irq(enum ps3_cpu_bin
return result;
}
- result = ps3_connect_irq(cpu, outlet, virq);
+ result = ps3_alloc_irq(cpu, outlet, virq);
BUG_ON(result);
return result;
@@ -368,7 +371,7 @@ int ps3_free_vuart_irq(unsigned int virq
return result;
}
- ps3_disconnect_irq(virq);
+ ps3_free_irq(virq);
return result;
}
@@ -399,7 +402,7 @@ int ps3_alloc_spe_irq(enum ps3_cpu_bindi
return result;
}
- result = ps3_connect_irq(cpu, outlet, virq);
+ result = ps3_alloc_irq(cpu, outlet, virq);
BUG_ON(result);
return result;
@@ -407,10 +410,11 @@ int ps3_alloc_spe_irq(enum ps3_cpu_bindi
int ps3_free_spe_irq(unsigned int virq)
{
- ps3_disconnect_irq(virq);
+ ps3_free_irq(virq);
return 0;
}
+
#define PS3_INVALID_OUTLET ((irq_hw_number_t)-1)
#define PS3_PLUG_MAX 63
--- ps3-linux-dev.orig/include/asm-powerpc/ps3.h
+++ ps3-linux-dev/include/asm-powerpc/ps3.h
@@ -163,6 +163,9 @@ int ps3_free_vuart_irq(unsigned int virq
int ps3_alloc_spe_irq(enum ps3_cpu_binding cpu, unsigned long spe_id,
unsigned int class, unsigned int *virq);
int ps3_free_spe_irq(unsigned int virq);
+int ps3_alloc_irq(enum ps3_cpu_binding cpu, unsigned long outlet,
+ unsigned int *virq);
+int ps3_free_irq(unsigned int virq);
/* lv1 result codes */
next reply other threads:[~2007-01-27 3:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-27 3:08 Geoff Levand [this message]
2007-01-27 11:26 ` [PATCH 10/16] ps3: add interrupt alloc for outlets Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45BAC21C.7000104@am.sony.com \
--to=geoffrey.levand@am.sony.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.