[PATCH 2/2] powerpc/cpu: post the event cpux add/remove instead of online/offline during hotplug

Pingfan Liu kernelfans at gmail.com
Sun Aug 5 12:52:24 AEST 2018


On Sat, Aug 4, 2018 at 10:48 AM Michael Ellerman <mpe at ellerman.id.au> wrote:
>
> Hi Pingfan,
>
> Pingfan Liu <kernelfans at gmail.com> writes:
> > Technically speaking, echo 1/0 > cpuX/online is only a subset of cpu
> > hotplug/unplug, i.e. add/remove. The latter one includes the physical
> > adding/removing of a cpu device. Some user space tools such as kexec-tools
> > resort to the event add/remove to automatically rebuild dtb.
> > If the dtb is not rebuilt correctly, we may hang on 2nd kernel due to
> > lack the info of boot-cpu-hwid in dtb.
>
> I notice you also sent a patch for ppc64_cpu to deal with CPUs being
> removed rather than just offlined.
>
> If I apply this patch then existing ppc64_cpu (without your other patch)
> will break. Is that right?
>
Yes. Since removing cpu will make a hole in cpu map, but ppc64_cpu
code takes the assumption that the cpu map is contiguous.

Thanks,
Pingfan


More information about the Linuxppc-dev mailing list