Re: [PATCH v11 00/11] Add support for SBI v0.2 and CPU hotplug

From: Atish Patra
Date: Sun Mar 22 2020 - 23:03:33 EST


On Sun, Mar 22, 2020 at 10:49 AM Emil Renner Berthing
<emil.renner.berthing@xxxxxxxxx> wrote:
>
> Hi Atish,
>
> On Wed, 18 Mar 2020 at 02:12, Atish Patra <atish.patra@xxxxxxx> wrote:
> >
> > The Supervisor Binary Interface(SBI) specification[1] now defines a
> > base extension that provides extendability to add future extensions
> > while maintaining backward compatibility with previous versions.
> > The new version is defined as 0.2 and older version is marked as 0.1.
> >
> > This series adds following features to RISC-V Linux.
> > 1. Adds support for SBI v0.2
> > 2. A Unified calling convention implementation between 0.1 and 0.2.
> > 3. SBI Hart state management extension (HSM)
> > 4. Ordered booting of harts
> > 4. CPU hotplug
>
> If it's any help I tried this series with both OpenSBI v0.6 and master
> (9a74a64ae08),
> and in both cases Linux found all four cpus. I can test the hotplug
> stuff too if you send
> me instructions. In any case you can add my
>
> Tested-by: Emil Renner Berthing <kernel@xxxxxxxx>
>

Thanks for testing the patches. Here are the steps to online/offline a cpu.

To mark a cpu offline
$echo 0 > /sys/devices/system/cpu/cpuX/online

To mark a cpu online
$echo 1 > /sys/devices/system/cpu/cpuX/online

Here are the official kernel documentation.
https://www.kernel.org/doc/html/latest/core-api/cpu_hotplug.html

> /Emil
>


--
Regards,
Atish