Skip to contentSkip to conversation

ipipe fix for PowerPC & SMP

PATCH Applied Paul 2 participants 2 messages Dec 16, 2007 – Dec 23, 2007 PowerPC

lore
Share & tools
lore

Paul

author
#0 lore raw

PATCH 1/1 ipipe fix for PowerPC & SMP

Attached, a trivial patch to fix a compile time error when building an SMP kernel for powerpc - I suspect this affects all patches for this architecture, not just the current 2.6.21 & 2.6.23 releases.

Regards, Paul.

arch/powerpc/kernel/ipipe.c +3 -3
index e08301e..553157d 100644
@@ -120,9 +120,9 @@ static void __ipipe_ipi_demux(int irq)
 
 	kstat_cpu(cpu).irqs[irq]++;
 
-	while (per_cpu(ipipe_ipi_message.value, cpu) & IPIPE_MSG_IPI_MASK) {
+	while (per_cpu(ipipe_ipi_message, cpu).value & IPIPE_MSG_IPI_MASK) {
 		for (ipi = IPIPE_MSG_CRITICAL_IPI; ipi <= IPIPE_MSG_SERVICE_IPI4; ++ipi) {
-			if (test_and_clear_bit(ipi, &per_cpu(ipipe_ipi_message.value, cpu))) {
+			if (test_and_clear_bit(ipi, &per_cpu(ipipe_ipi_message, cpu).value)) {
 				mb();
 				__ipipe_handle_irq(ipi + IPIPE_MSG_IPI_OFFSET, NULL);
 			}
@@ -163,7 +163,7 @@ int __ipipe_send_ipi(unsigned ipi, cpumask_t cpumask)
 	ipi -= IPIPE_MSG_IPI_OFFSET;
 	for_each_online_cpu(cpu) {
 		if (cpu_isset(cpu, cpumask))
-			set_bit(ipi, &per_cpu(ipipe_ipi_message.value, cpu));
+			set_bit(ipi, &per_cpu(ipipe_ipi_message, cpu).value);
 	}
 	mb();	 
 	
#1 lore raw
Quoted 4 lines · Paul

Attached, a trivial patch to fix a compile time error when building an SMP kernel for powerpc - I suspect this affects all patches for this architecture, not just the current 2.6.21 & 2.6.23 releases.

We don't support SMP platforms over 2.6.2[01]/powerpc, but this is indeed applicable to 2.6.23. The funny thing is that GCC 4.2.0 for powerpc64 does not seem to have any problem with this, and fortunately generates the right offset out of a wrong expression...

Applied, thanks.

Signature · 1 line
Philippe.