pseries: Abolish envs array
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 5 Apr 2011 05:12:09 +0000 (15:12 +1000)
committerAlexander Graf <agraf@suse.de>
Fri, 8 Apr 2011 09:32:21 +0000 (11:32 +0200)
commita4898807e8c8d3fe073c8c4c1aea82c61b7c4ac1
tree5530370b8dab8bd65e177a2bc7a1fdfe854d8b57
parent43221b11da1d1464cbc3faa40ec782f85293f39c
pseries: Abolish envs array

Currently the pseries machine init code builds up an array, envs, of
CPUState pointers for all the cpus in the system.  This is kind of
pointless, given the generic code already has a perfectly good linked list
of the cpus.

In addition, there are a number of places which assume that the cpu's
cpu_index field is equal to its index in this array.  This is true in
practice, because cpu_index values are just assigned sequentially, but
it's conceptually incorrect and may not always be true.

Therefore, this patch abolishes the envs array, and explicitly uses the
generic cpu linked list and cpu_index values throughout.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/spapr.c
hw/xics.c
hw/xics.h