riscv: hart: Extract hart realize to a separate routine
commit91c985851dd57df3b003e7bd91f1cf544b3a288d
authorBin Meng <bmeng.cn@gmail.com>
Fri, 6 Sep 2019 16:20:03 +0000 (6 09:20 -0700)
committerPalmer Dabbelt <palmer@sifive.com>
Tue, 17 Sep 2019 15:42:46 +0000 (17 08:42 -0700)
treee6ffda5ae64dec6db9d71b5bdfaf3f55c62deb98
parent20f41c869830fdf0ac9aec8d14b766167f47ce7d
riscv: hart: Extract hart realize to a separate routine

Currently riscv_harts_realize() creates all harts based on the
same cpu type given in the hart array property. With current
implementation it can only create homogeneous harts. Exact the
hart realize to a separate routine in preparation for supporting
multiple hart arrays.

Note the file header says the RISC-V hart array holds the state
of a heterogeneous array of RISC-V harts, which is not true.
Update the comment to mention homogeneous array of RISC-V harts.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
hw/riscv/riscv_hart.c