[PATCH 12/15] ppc64: Simplify counting of lpevents, remove lpevent_count from paca

Stephen Rothwell sfr at canb.auug.org.au
Tue Jun 28 15:26:09 EST 2005


On Tue, 28 Jun 2005 09:18:12 +1000 Michael Ellerman <michael at ellerman.id.au> wrote:
>
> Currently there's a per-cpu count of lpevents processed, a per-queue (ie.
> global) total count, and a count by event type.
> 
> Replace all that with a count by event for each cpu. We only need to add
> it up int the proc code.
> 
> Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
Acked-by: Stephen Rothwell <sfr at canb.auug.org.au>

> +	for_each_online_cpu(cpu) {
> +		cpu_totals[cpu] = 0;
> +		for (i = 0; i < HvLpEvent_Type_NumTypes; i++) {
> +			cpu_totals[cpu] += per_cpu(hvlpevent_counts, cpu)[i];
> +		}

You don't really need to bracket these simple for loop bodies.

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050628/46a66775/attachment.pgp 


More information about the Linuxppc64-dev mailing list