On Thu, Sep 15, 2016 at 02:45:56PM +0200, Cédric Le Goater wrote:
> On PowerNV, CPU ids start at 0x8 or 0x20, we don't have a CPU 0
> anymore. So let's use the first_cpu index to initialize the monitor.
> 
> Signed-off-by: Cédric Le Goater <c...@kaod.org>

I've rewritten the commit message to make the case for this without
the context of pnv and posted upstream.

> ---
>  monitor.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/monitor.c b/monitor.c
> index 5c003731e288..0192209a7915 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -1023,7 +1023,7 @@ int monitor_set_cpu(int cpu_index)
>  CPUState *mon_get_cpu(void)
>  {
>      if (!cur_mon->mon_cpu) {
> -        monitor_set_cpu(0);
> +        monitor_set_cpu(first_cpu->cpu_index);
>      }
>      cpu_synchronize_state(cur_mon->mon_cpu);
>      return cur_mon->mon_cpu;

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature

Reply via email to