All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geoff Levand <geoffrey.levand@am.sony.com>
To: paulus@samba.org
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH 5/14] ps3: rename interrupt symbols
Date: Wed, 24 Jan 2007 18:39:59 -0800	[thread overview]
Message-ID: <45B8187F.5060007@am.sony.com> (raw)

Rename some PS3 interrupt symbols to avoid name clashes and aid debugging.
No change to code.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>

---
 arch/powerpc/platforms/ps3/interrupt.c |   66 ++++++++++++++++-----------------
 1 files changed, 33 insertions(+), 33 deletions(-)

--- ps3-linux-dev.orig/arch/powerpc/platforms/ps3/interrupt.c
+++ ps3-linux-dev/arch/powerpc/platforms/ps3/interrupt.c
@@ -288,7 +288,7 @@ int ps3_free_spe_irq(unsigned int virq)
 #define PS3_PLUG_MAX 63
 
 /**
- * struct bmp - a per cpu irq status and mask bitmap structure
+ * struct ps3_bmp - a per cpu irq status and mask bitmap structure
  * @status: 256 bit status bitmap indexed by plug
  * @unused_1:
  * @mask: 256 bit mask bitmap indexed by plug
@@ -311,7 +311,7 @@ int ps3_free_spe_irq(unsigned int virq)
  * can aquire.
  */
 
-struct bmp {
+struct ps3_bmp {
 	struct {
 		unsigned long status;
 		unsigned long unused_1[3];
@@ -323,16 +323,16 @@ struct bmp {
 };
 
 /**
- * struct private - a per cpu data structure
+ * struct ps3_private - a per cpu data structure
  * @node: HV node id
  * @cpu: HV thread id
- * @bmp: an HV bmp structure
+ * @bmp: an HV ps3_bmp structure
  */
 
-struct private {
+struct ps3_private {
 	unsigned long node;
 	unsigned int cpu;
-	struct bmp bmp;
+	struct ps3_bmp bmp;
 };
 
 #if defined(DEBUG)
@@ -353,7 +353,7 @@ static void __attribute__ ((unused)) _du
 }
 
 #define dump_bmp(_x) _dump_bmp(_x, __func__, __LINE__)
-static void _dump_bmp(struct private* pd, const char* func, int line)
+static void _dump_bmp(struct ps3_private* pd, const char* func, int line)
 {
 	unsigned long flags;
 
@@ -364,7 +364,7 @@ static void _dump_bmp(struct private* pd
 }
 
 #define dump_mask(_x) _dump_mask(_x, __func__, __LINE__)
-static void __attribute__ ((unused)) _dump_mask(struct private* pd,
+static void __attribute__ ((unused)) _dump_mask(struct ps3_private* pd,
 	const char* func, int line)
 {
 	unsigned long flags;
@@ -374,13 +374,13 @@ static void __attribute__ ((unused)) _du
 	spin_unlock_irqrestore(&pd->bmp.lock, flags);
 }
 #else
-static void dump_bmp(struct private* pd) {};
+static void dump_bmp(struct ps3_private* pd) {};
 #endif /* defined(DEBUG) */
 
-static void chip_mask(unsigned int virq)
+static void ps3_chip_mask(unsigned int virq)
 {
 	unsigned long flags;
-	struct private *pd = get_irq_chip_data(virq);
+	struct ps3_private *pd = get_irq_chip_data(virq);
 
 	pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
 
@@ -394,10 +394,10 @@ static void chip_mask(unsigned int virq)
 	lv1_did_update_interrupt_mask(pd->node, pd->cpu);
 }
 
-static void chip_unmask(unsigned int virq)
+static void ps3_chip_unmask(unsigned int virq)
 {
 	unsigned long flags;
-	struct private *pd = get_irq_chip_data(virq);
+	struct ps3_private *pd = get_irq_chip_data(virq);
 
 	pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
 
@@ -411,19 +411,19 @@ static void chip_unmask(unsigned int vir
 	lv1_did_update_interrupt_mask(pd->node, pd->cpu);
 }
 
-static void chip_eoi(unsigned int virq)
+static void ps3_chip_eoi(unsigned int virq)
 {
 	lv1_end_of_interrupt(virq);
 }
 
 static struct irq_chip irq_chip = {
 	.typename = "ps3",
-	.mask = chip_mask,
-	.unmask = chip_unmask,
-	.eoi = chip_eoi,
+	.mask = ps3_chip_mask,
+	.unmask = ps3_chip_unmask,
+	.eoi = ps3_chip_eoi,
 };
 
-static void host_unmap(struct irq_host *h, unsigned int virq)
+static void ps3_host_unmap(struct irq_host *h, unsigned int virq)
 {
 	int result;
 
@@ -435,9 +435,9 @@ static void host_unmap(struct irq_host *
 	BUG_ON(result);
 }
 
-static DEFINE_PER_CPU(struct private, private);
+static DEFINE_PER_CPU(struct ps3_private, ps3_private);
 
-static int host_map(struct irq_host *h, unsigned int virq,
+static int ps3_host_map(struct irq_host *h, unsigned int virq,
 	irq_hw_number_t hwirq)
 {
 	int result;
@@ -460,7 +460,7 @@ static int host_map(struct irq_host *h, 
 		return -EPERM;
 	}
 
-	result = set_irq_chip_data(virq, &per_cpu(private, cpu));
+	result = set_irq_chip_data(virq, &per_cpu(ps3_private, cpu));
 	BUG_ON(result);
 
 	set_irq_chip_and_handler(virq, &irq_chip, handle_fasteoi_irq);
@@ -469,14 +469,14 @@ static int host_map(struct irq_host *h, 
 	return result;
 }
 
-static struct irq_host_ops host_ops = {
-	.map = host_map,
-	.unmap = host_unmap,
+static struct irq_host_ops ps3_host_ops = {
+	.map = ps3_host_map,
+	.unmap = ps3_host_unmap,
 };
 
 void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
 {
-	struct private *pd = &per_cpu(private, cpu);
+	struct ps3_private *pd = &per_cpu(ps3_private, cpu);
 
 	pd->bmp.ipi_debug_brk_mask = 0x8000000000000000UL >> virq;
 
@@ -484,7 +484,7 @@ void __init ps3_register_ipi_debug_brk(u
 		cpu, virq, pd->bmp.ipi_debug_brk_mask);
 }
 
-static int bmp_get_and_clear_status_bit(struct bmp *m)
+static int bmp_get_and_clear_status_bit(struct ps3_bmp *m)
 {
 	unsigned long flags;
 	unsigned int bit;
@@ -519,22 +519,22 @@ unsigned int ps3_get_irq(void)
 {
 	int plug;
 
-	struct private *pd = &__get_cpu_var(private);
+	struct ps3_private *pd = &__get_cpu_var(ps3_private);
 
 	plug = bmp_get_and_clear_status_bit(&pd->bmp);
 
 	if (plug < 1) {
 		pr_debug("%s:%d: no plug found: cpu %u\n", __func__, __LINE__,
 			pd->cpu);
-		dump_bmp(&per_cpu(private, 0));
-		dump_bmp(&per_cpu(private, 1));
+		dump_bmp(&per_cpu(ps3_private, 0));
+		dump_bmp(&per_cpu(ps3_private, 1));
 		return NO_IRQ;
 	}
 
 #if defined(DEBUG)
 	if (plug < NUM_ISA_INTERRUPTS || plug > PS3_PLUG_MAX) {
-		dump_bmp(&per_cpu(private, 0));
-		dump_bmp(&per_cpu(private, 1));
+		dump_bmp(&per_cpu(ps3_private, 0));
+		dump_bmp(&per_cpu(ps3_private, 1));
 		BUG();
 	}
 #endif
@@ -550,13 +550,13 @@ void __init ps3_init_IRQ(void)
 
 	lv1_get_logical_ppe_id(&node);
 
-	host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &host_ops,
+	host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops,
 		PS3_INVALID_OUTLET);
 	irq_set_default_host(host);
 	irq_set_virq_count(PS3_PLUG_MAX + 1);
 
 	for_each_possible_cpu(cpu) {
-		struct private *pd = &per_cpu(private, cpu);
+		struct ps3_private *pd = &per_cpu(ps3_private, cpu);
 
 		pd->node = node;
 		pd->cpu = cpu;

             reply	other threads:[~2007-01-25  2:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25  2:39 Geoff Levand [this message]
2007-01-25  3:50 ` [PATCH 5/14] ps3: rename interrupt symbols Benjamin Herrenschmidt
2007-01-25  6:00   ` 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=45B8187F.5060007@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.