aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2007-06-15 18:06:04 -0400
committerPaul Mackerras <paulus@samba.org>2007-06-28 05:16:44 -0400
commitaab835007097122c3a1e7a7dddda0cf89a94cd4e (patch)
tree9940fb1177efe50b2b91d93967cfee8174c90ea2
parentffbdd246478693673adcfe1c34b29714cf25dadd (diff)
[POWERPC] PS3: Rename processor id symbols
Rename the PS3 static symbols node to ppe_id and cpu to thread_id to clarify usage. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/platforms/ps3/interrupt.c55
1 files changed, 29 insertions, 26 deletions
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index 99a0826c8d90..e2de899d7463 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -78,14 +78,14 @@ struct ps3_bmp {
78/** 78/**
79 * struct ps3_private - a per cpu data structure 79 * struct ps3_private - a per cpu data structure
80 * @bmp: ps3_bmp structure 80 * @bmp: ps3_bmp structure
81 * @node: HV logical_ppe_id 81 * @ppe_id: HV logical_ppe_id
82 * @cpu: HV thread_id 82 * @thread_id: HV thread_id
83 */ 83 */
84 84
85struct ps3_private { 85struct ps3_private {
86 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN))); 86 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN)));
87 u64 node; 87 u64 ppe_id;
88 unsigned int cpu; 88 u64 thread_id;
89}; 89};
90 90
91static DEFINE_PER_CPU(struct ps3_private, ps3_private); 91static DEFINE_PER_CPU(struct ps3_private, ps3_private);
@@ -105,7 +105,8 @@ static void ps3_chip_mask(unsigned int virq)
105 u64 old; 105 u64 old;
106 unsigned long flags; 106 unsigned long flags;
107 107
108 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq); 108 pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__,
109 pd->thread_id, virq);
109 110
110 local_irq_save(flags); 111 local_irq_save(flags);
111 asm volatile( 112 asm volatile(
@@ -117,7 +118,7 @@ static void ps3_chip_mask(unsigned int virq)
117 : "r" (bit), "r" (p) 118 : "r" (bit), "r" (p)
118 : "cc" ); 119 : "cc" );
119 120
120 lv1_did_update_interrupt_mask(pd->node, pd->cpu); 121 lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
121 local_irq_restore(flags); 122 local_irq_restore(flags);
122} 123}
123 124
@@ -136,7 +137,8 @@ static void ps3_chip_unmask(unsigned int virq)
136 u64 old; 137 u64 old;
137 unsigned long flags; 138 unsigned long flags;
138 139
139 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq); 140 pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__,
141 pd->thread_id, virq);
140 142
141 local_irq_save(flags); 143 local_irq_save(flags);
142 asm volatile( 144 asm volatile(
@@ -148,7 +150,7 @@ static void ps3_chip_unmask(unsigned int virq)
148 : "r" (bit), "r" (p) 150 : "r" (bit), "r" (p)
149 : "cc" ); 151 : "cc" );
150 152
151 lv1_did_update_interrupt_mask(pd->node, pd->cpu); 153 lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
152 local_irq_restore(flags); 154 local_irq_restore(flags);
153} 155}
154 156
@@ -162,7 +164,7 @@ static void ps3_chip_unmask(unsigned int virq)
162static void ps3_chip_eoi(unsigned int virq) 164static void ps3_chip_eoi(unsigned int virq)
163{ 165{
164 const struct ps3_private *pd = get_irq_chip_data(virq); 166 const struct ps3_private *pd = get_irq_chip_data(virq);
165 lv1_end_of_interrupt_ext(pd->node, pd->cpu, virq); 167 lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, virq);
166} 168}
167 169
168/** 170/**
@@ -241,8 +243,8 @@ int ps3_virq_destroy(unsigned int virq)
241{ 243{
242 const struct ps3_private *pd = get_irq_chip_data(virq); 244 const struct ps3_private *pd = get_irq_chip_data(virq);
243 245
244 pr_debug("%s:%d: node %lu, cpu %d, virq %u\n", __func__, __LINE__, 246 pr_debug("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n", __func__,
245 pd->node, pd->cpu, virq); 247 __LINE__, pd->ppe_id, pd->thread_id, virq);
246 248
247 set_irq_chip_data(virq, NULL); 249 set_irq_chip_data(virq, NULL);
248 irq_dispose_mapping(virq); 250 irq_dispose_mapping(virq);
@@ -278,7 +280,8 @@ int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
278 280
279 /* Binds outlet to cpu + virq. */ 281 /* Binds outlet to cpu + virq. */
280 282
281 result = lv1_connect_irq_plug_ext(pd->node, pd->cpu, *virq, outlet, 0); 283 result = lv1_connect_irq_plug_ext(pd->ppe_id, pd->thread_id, *virq,
284 outlet, 0);
282 285
283 if (result) { 286 if (result) {
284 pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n", 287 pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n",
@@ -310,12 +313,12 @@ int ps3_irq_plug_destroy(unsigned int virq)
310 int result; 313 int result;
311 const struct ps3_private *pd = get_irq_chip_data(virq); 314 const struct ps3_private *pd = get_irq_chip_data(virq);
312 315
313 pr_debug("%s:%d: node %lu, cpu %d, virq %u\n", __func__, __LINE__, 316 pr_debug("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n", __func__,
314 pd->node, pd->cpu, virq); 317 __LINE__, pd->ppe_id, pd->thread_id, virq);
315 318
316 ps3_chip_mask(virq); 319 ps3_chip_mask(virq);
317 320
318 result = lv1_disconnect_irq_plug_ext(pd->node, pd->cpu, virq); 321 result = lv1_disconnect_irq_plug_ext(pd->ppe_id, pd->thread_id, virq);
319 322
320 if (result) 323 if (result)
321 pr_info("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n", 324 pr_info("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n",
@@ -657,8 +660,8 @@ static void _dump_bmp(struct ps3_private* pd, const char* func, int line)
657 unsigned long flags; 660 unsigned long flags;
658 661
659 spin_lock_irqsave(&pd->bmp.lock, flags); 662 spin_lock_irqsave(&pd->bmp.lock, flags);
660 _dump_64_bmp("stat", &pd->bmp.status, pd->cpu, func, line); 663 _dump_64_bmp("stat", &pd->bmp.status, pd->thread_id, func, line);
661 _dump_64_bmp("mask", &pd->bmp.mask, pd->cpu, func, line); 664 _dump_64_bmp("mask", &pd->bmp.mask, pd->thread_id, func, line);
662 spin_unlock_irqrestore(&pd->bmp.lock, flags); 665 spin_unlock_irqrestore(&pd->bmp.lock, flags);
663} 666}
664 667
@@ -669,7 +672,7 @@ static void __maybe_unused _dump_mask(struct ps3_private *pd,
669 unsigned long flags; 672 unsigned long flags;
670 673
671 spin_lock_irqsave(&pd->bmp.lock, flags); 674 spin_lock_irqsave(&pd->bmp.lock, flags);
672 _dump_64_bmp("mask", &pd->bmp.mask, pd->cpu, func, line); 675 _dump_64_bmp("mask", &pd->bmp.mask, pd->thread_id, func, line);
673 spin_unlock_irqrestore(&pd->bmp.lock, flags); 676 spin_unlock_irqrestore(&pd->bmp.lock, flags);
674} 677}
675#else 678#else
@@ -722,8 +725,8 @@ static unsigned int ps3_get_irq(void)
722 plug &= 0x3f; 725 plug &= 0x3f;
723 726
724 if (unlikely(plug) == NO_IRQ) { 727 if (unlikely(plug) == NO_IRQ) {
725 pr_debug("%s:%d: no plug found: cpu %u\n", __func__, __LINE__, 728 pr_debug("%s:%d: no plug found: thread_id %lu\n", __func__,
726 pd->cpu); 729 __LINE__, pd->thread_id);
727 dump_bmp(&per_cpu(ps3_private, 0)); 730 dump_bmp(&per_cpu(ps3_private, 0));
728 dump_bmp(&per_cpu(ps3_private, 1)); 731 dump_bmp(&per_cpu(ps3_private, 1));
729 return NO_IRQ; 732 return NO_IRQ;
@@ -753,16 +756,16 @@ void __init ps3_init_IRQ(void)
753 for_each_possible_cpu(cpu) { 756 for_each_possible_cpu(cpu) {
754 struct ps3_private *pd = &per_cpu(ps3_private, cpu); 757 struct ps3_private *pd = &per_cpu(ps3_private, cpu);
755 758
756 lv1_get_logical_ppe_id(&pd->node); 759 lv1_get_logical_ppe_id(&pd->ppe_id);
757 pd->cpu = get_hard_smp_processor_id(cpu); 760 pd->thread_id = get_hard_smp_processor_id(cpu);
758 spin_lock_init(&pd->bmp.lock); 761 spin_lock_init(&pd->bmp.lock);
759 762
760 pr_debug("%s:%d: node %lu, cpu %d, bmp %lxh\n", __func__, 763 pr_debug("%s:%d: ppe_id %lu, thread_id %lu, bmp %lxh\n",
761 __LINE__, pd->node, pd->cpu, 764 __func__, __LINE__, pd->ppe_id, pd->thread_id,
762 ps3_mm_phys_to_lpar(__pa(&pd->bmp))); 765 ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
763 766
764 result = lv1_configure_irq_state_bitmap(pd->node, pd->cpu, 767 result = lv1_configure_irq_state_bitmap(pd->ppe_id,
765 ps3_mm_phys_to_lpar(__pa(&pd->bmp))); 768 pd->thread_id, ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
766 769
767 if (result) 770 if (result)
768 pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:" 771 pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:"