Skip to contentSkip to conversation

powerpc: Fix call to ibm,client-architecture-support

PATCH In review Benjamin Herrenschmidt 2 participants 2 messages Jun 7, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix call to ibm,client-architecture-support

The code in prom_init.c calling the firmware ibm,client-architecture-support on pSeries has a bug where it fails to properly pass the instance handle of the firmware object when trying to call a method. Result ranges from the call doing nothing to the firmware crashing. (Found by Segher, thanks !)

arch/powerpc/kernel/prom_init.c +1 -0
Index: linux-work/arch/powerpc/kernel/prom_init.c
===================================================================
@@ -822,6 +822,7 @@ static void __init prom_send_capabilitie
 		/* try calling the ibm,client-architecture-support method */
 		if (call_prom_ret("call-method", 3, 2, &ret,
 				  ADDR("ibm,client-architecture-support"),
+				  root,
 				  ADDR(ibm_architecture_vec)) == 0) {
 			/* the call exists... */
 			if (ret)
#1 lore raw
Quoted 5 lines

The code in prom_init.c calling the firmware ibm,client-architecture-support on pSeries has a bug where it fails to properly pass the instance handle of the firmware object when trying to call a method. Result ranges from the call doing nothing to the firmware crashing. (Found by Segher, thanks !)

Dry debugging is one of the most fun things in the world, second only to reverse engineering. Am I pathetic or what?

Quoted 1 line
Quoted 14 lines

Index: linux-work/arch/powerpc/kernel/prom_init.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/prom_init.c 2006-05-30
13:00:51.000000000 +1000
+++ linux-work/arch/powerpc/kernel/prom_init.c 2006-06-06
11:59:20.000000000 +1000

arch/powerpc/kernel/prom_init.c +1 -0
@@ -822,6 +822,7 @@ static void __init prom_send_capabilitie
 		/* try calling the ibm,client-architecture-support method */
 		if (call_prom_ret("call-method", 3, 2, &ret,
 				  ADDR("ibm,client-architecture-support"),
+				  root,
 				  ADDR(ibm_architecture_vec)) == 0) {
 			/* the call exists... */
 			if (ret)