[PATCH v4 2/2] powerpc: make MPIC honor the "pic-no-reset"	device tree property
    Benjamin Herrenschmidt 
    benh at kernel.crashing.org
       
    Fri Mar 11 09:11:55 EST 2011
    
    
  
On Thu, 2011-03-10 at 11:23 -0600, Meador Inge wrote:
> I agree.  I shouldn't have cached that.  We should probably introduce a 
> helper function to get the cpuid, though.  The:
> 
>         unsigned int cpu = 0;
> 
>         if (mpic->flags & MPIC_PRIMARY)
>                 cpu = hard_smp_processor_id();
> 
> code is scattered in three places: '_mpic_cpu_write', '_mpic_cpu_read', 
> and 'mpic_init'. 
Right, but that code must act on the current CPU, not a cached per-MPIC
variant. Doing a helper to factor the above 2 lines is fine if you wish
to do so but then make it a separate patch.
Cheers,
Ben.
    
    
More information about the Linuxppc-dev
mailing list