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