[Cbe-oss-dev] [PATCH] cell: move SPU affinity init code to a separate file

André Detsch adetsch at br.ibm.com
Thu Jul 26 12:58:21 EST 2007


Michael Ellerman wrote:
> You're lucky I woke up in a bad mood this morning, so I thought I'd
> review your code ;) ...

Hi Michael,

Thanks for the comments. I which you several days of bad mood ;)

I've integrated your code style suggestions to the new version of the 
patch. I've kept two changes out of the patch for now, as they modify 
slightly the semantic of the functions:

>> +			name = get_property(vic_dn, "name", NULL);
> 
> name? not device_type/compatible ?

"device_type" would make more sense, but "name" is returning what I 
need. And, more important, mic-tm and bif0 device nodes (accessed within 
the algorithm) do not have the device_type field. At least in the 
simulator. Is this a simulator bug?

>> +static int init_spu_affinity(void)
>> +{
>> +	if (of_has_vicinity()) {
>> +		init_aff_fw_vicinity();
> 
> What happens if init_aff_fw_vicinity() fails? Shouldn't we drop back to
> the QS20 hardcoding? I prefer the model where we try
> init_aff_fw_vicinity() and if there's any error we drop back to hard
> coding.

Right now, the algorithm just gives up and stop adding spus to the 
affinity list.

Your suggestion is to use hardcoded information even if we are on a 
machine other than QS20?

--
Andre Detsch




More information about the cbe-oss-dev mailing list