Hi Here are some patches we've put together for bugs that we've encountered while getting Perfmon working on powerpc. There's no Cell-specific code yet, just base powerpc stuff. These also require the ppc.diff patch that Stephane posted on March 27.
1/6 Add an smp_call_function_single() to the powerpc architecture. Since this is very similar to the existing smp_call_function() routine, the common portions have been split out into __smp_call_function(). Since the spin_lock(&call_lock) was moved to __smp_call_function(), smp_call_function() now explicitly calls preempt_disable() before getting the count of online CPUs. 2/6 Change the powerpc version of topology_init() from an __initcall to a subsys_initcall to match all other architectures. 3/6 Load r3 with a pointer to the pt_regs that __pfm_handle_work() expects as an argument. 4/6 After loading the TIF flag with the new LOAD_TIF_KERNEL() macro, we need to do an "and." instruction. Without the "." after the instruction, the condition flags register will not be set, and the following branch instruction would be based on some previous instruction. 5/6 Powerpc does not have an explicit check for the TIF_PERFMON_WORK thread-info flag before calling __pfm_handle_work(), so add that check at the beginning of __pfm_handle_work. This is just a temporary fix. Obviously we'd like to fix the powerpc code to make that check before calling __pfm_handle_work() to prevent the function call overhead, but the call is made from assembly code, so it will take a little while to figure out how to perform the check correctly. For now, if you want to run perfmon on powerpc, you'll need to use this patch. 6/6 Just some coding style changes for the existing powerpc perfmon code. Thanks, -- Kevin Corry [EMAIL PROTECTED] http://www.ibm.com/linux/ _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
