Re: [PATCH V2 16/19] csky: SMP support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 06, 2018 at 05:21:00PM +0100, Mark Rutland wrote:
> Please don't open-code this. Use of_device_is_available(), which checks
> the status property itself. e.g.
> 
> void __init setup_smp(void)
> {
> 	struct device_node *node = NULL;
> 
> 	while ((node = of_find_node_by_type(node, "cpu"))) {
> 		if (!of_device_is_available(node))
> 			continue;
> 
> 		...
> 	}
> }
Ok, approve.

> Please use the reg property, you need it to describe which particular
> CPUs are available.
> 
> You probably also want a mapping from Linux logical CPU id to your
> physical CPU id, and a sanity check on this. See arm64 for an example.
Yes, you are right. Reg property could determine which bit of CPU in
cr<0, 29> could be booted.

Thx for the tips.

 Guo Ren




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux