On Mon, 2009-08-03 at 12:57 -0500, Dave Kleikamp wrote: > > cpu_last_thread_in_core(cpu) is a moving target. You want something > > like: > > > > cpu = cpu_first_thread_in_core(cpu); > > last = cpu_last_thread_in_core(cpu); > > while (cpu <= last) { > > __clear_bit(id, stale_map[cpu]); > > cpu++; > > } > > Or, keeping the for loop: > > for (cpu = cpu_first_thread_in_core(cpu), last = > cpu_last_thread_in_core(cpu); > cpu <= last; cpu++) > cpu++;
Yeah, whatever form is good, I had a brain fart and didn't "see" that in the end of loop, cpu would have actually crossed the boundary to the next core and so cpu_last_thread_in_core() would change. Just some short circuit in a neuron somewhere. Cheers, Ben. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev