Thread (1 message) 1 message, 1 author, 2011-03-10

Re: [PATCH v4 2/2] powerpc: make MPIC honor the "pic-no-reset" device tree property

From: Benjamin Herrenschmidt <hidden>
Date: 2011-03-10 22:11:55
Also in: linuxppc-dev

Possibly related (same subject, not in this thread)

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help