Hi Kevin,

The patch "[PATCH] 7/7: Non-RTAS Cell signal routing" works on our platform.
Thank you really.

Then I noticed two issues.

First, when the argument 'num_signals' of celleb_activate_signals() is 0, 
an illegal value is returned. 

Second, I think that the argument to passthru_enable() in 
celleb_activate_signals() 
has a problem. The array index 'i' of the argument 'signals[i].cpu' doesn't 
indicate 
an effective "signals" array.

I made the patch for them.

Thanks,

Index: linux-2.6.22/arch/powerpc/perfmon/perfmon_cell.c
===================================================================
--- linux-2.6.22-newbase/arch/powerpc/perfmon/perfmon_cell.c
+++ linux-2.6.22/arch/powerpc/perfmon/perfmon_cell.c
@@ -375,7 +375,7 @@ static int ppu_selection(struct cell_rta
 static int celleb_activate_signals(struct cell_rtas_arg *signals,
                                   int num_signals)
 {
-       int i, rc;
+       int i, rc = -EINVAL;
 
        for (i = 0; i < num_signals; i++) {
                switch (signals[i].signal_group) {
@@ -395,7 +395,8 @@ static int celleb_activate_signals(struc
                }
        }
 
-       rc = passthru_enable(signals[i].cpu);
+       if (0 < i)
+               rc = passthru_enable(signals[0].cpu);
 
        return rc;
 }

-- Takaki Azuma

_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to