[Top] [All Lists]

Re: [PATCH V2] MIPS: Fix poweroff failure when HOTPLUG_CPU configured.

To: Linux MIPS Mailing List <>, Ralf Baechle <>
Subject: Re: [PATCH V2] MIPS: Fix poweroff failure when HOTPLUG_CPU configured.
From: Kevin Cernekee <>
Date: Sat, 18 Aug 2012 10:50:20 -0700
Cc:, Fuxin Zhang <>, Zhangjin Wu <>, Hongliang Tao <>, Hua Yan <>, Yong Zhang <>,
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5cbwiIiBjZYJxobxgmPJR56stCDW7dhU+YFdIT8yItM=; b=vlycQ3EGpPsBFeoOmUhZsfe21xg2/Q3Ehw3q+BozfsGAcnaSAPfNo0thndzXmt89R5 acAoUfyH+p4adCTwR9EzYALzYCd9WJ1XMJvFGaWoUDrNI/p15Two9z+ywCozpMVVwUWh I7cYnv5Fb2xZOzrNDKCoERY4y++7uWbRKHJ5HWLramC4J679tETOeyb/iBj7HsxcvLgq YzOjEwfARm9fxwVA1f08ucW4ioOnT3Q4UOCBXMmPV0wFzXnlR8Uzt5SFV6YMvF3+b5rK gfeQTxSyEWfAgWOjcYVnUu2+8Q9iXhqKFu2+cBaRpjWxr2cD1zpeNOY//kjI58mmdU99 CWig==
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
References: <>
On Mon, Aug 13, 2012 at 5:52 AM, Huacai Chen <> wrote:
> When poweroff machine, kernel_power_off() call disable_nonboot_cpus().
> And if we have HOTPLUG_CPU configured, disable_nonboot_cpus() is not an
> empty function but attempt to actually disable the nonboot cpus. Since
> system state is SYSTEM_POWER_OFF, play_dead() won't be called and thus
> disable_nonboot_cpus() hangs. Therefore, we make this patch to avoid
> poweroff failure.

I have seen the same problem; sometimes it causes a kernel oops too.

> -               if (!cpu_online(cpu) && !cpu_isset(cpu, cpu_callin_map) &&
> -                   (system_state == SYSTEM_RUNNING ||
> -                    system_state == SYSTEM_BOOTING))
> +               if (!cpu_online(cpu) && !cpu_isset(cpu, cpu_callin_map))
>                         play_dead();

This fix works for me.

Acked-by: Kevin Cernekee <>

I do see SMP boot problems ("Attempted to kill the idle task!" panic)
on a 4-way box if the !cpu_isset() check is removed.

<Prev in Thread] Current Thread [Next in Thread>