[lkml]   [2018]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH V2 16/19] csky: SMP support
On Fri, Jul 06, 2018 at 12:43:52PM +0100, Mark Rutland wrote:
> Please see the devicetree spec [1], section 2.3.4. Valid values are:
> * "okay" // equivalent to no status property present
> * "disabled"
> * "fail"
> * "fail-sss"
Nice tip, thx.

> I'm a bit confused. You write (1 << cpu) into cv<29, 0>, to enable a
> particular CPU, so I assume that bit uniquely identifies a CPU,
Yes, you're right and cr<29, 0>'s bit uniquely identifies a cpu.

> and
> therefore the reg is some unique ID for the CPU.
static int csky_of_cpu(struct device_node *node)
const char *status;

if (of_property_read_string(node, "status", &status))
status = "okay";

if (strcmp(status, "disabled") == 0)
goto error;

return 1;
return 0;

void __init setup_smp(void)
struct device_node *node = NULL;
int i = 0;

while ((node = of_find_node_by_type(node, "cpu"))) {
if (!csky_of_cpu(node))

set_cpu_possible(i, true);
set_cpu_present(i, true);


No <reg> in next version patch, it's no use.

> I see.
> Is this SMP bringup mechanism architectual, or are you likely to need
> another mechanism to turn on CPUs on future chips?
It's the only SMP bringup mechanism architectual for C-SKY SMP. There is
no another way in future and SOC vendor couldn't change it.

> You probably want to use an enable-method property to describe this.
No, thx.

Guo Ren

 \ /
  Last update: 2018-07-06 14:27    [W:0.155 / U:2.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site