Only one CPU is brought when using linux 4

Hi.

I tried to update the Linux version running on Altera arria 10 based board.
When the system is loading only one CPU is brought up.

If I switch back to Linux 3 everything is working well.

Any ideas?

Linux 3 boot log:
sched_clock: 32 bits at 100MHz, resolution 10ns, wraps every 42949ms
Console: colour dummy device 80x30
Calibrating delay loop… 1987.37 BogoMIPS (lpj=9936896)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
ftrace: allocating 18274 entries in 54 pages
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x804def98 - 0x804deff0
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (3981.31 BogoMIPS).
CPU: All CPU(s) started in SVC mode.

Linux 4 boot log:
[ 0.000004] sched_clock: 32 bits at 100MHz, resolution 10ns, wraps every 21474836475ns
[ 0.000012] Switching to timer-based delay loop, resolution 10ns
[ 0.000225] Console: colour dummy device 80x30
[ 0.000250] Calibrating delay loop (skipped), value calculated using timer frequency… 200.00 BogoMIPS (lpj=1000000)
[ 0.000259] pid_max: default: 32768 minimum: 301
[ 0.000353] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000362] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000782] CPU: Testing write buffer coherency: ok
[ 0.000994] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.001213] Setting up static identity map for 0x100000 - 0x100060
[ 0.001300] Hierarchical SRCU implementation.
[ 0.001636] smp: Bringing up secondary CPUs …
[ 0.001913] smp: Brought up 1 node, 1 CPU
[ 0.001922] SMP: Total of 1 processors activated (200.00 BogoMIPS).
[ 0.001928] CPU: All CPU(s) started in SVC mode.

Hello, farkash7,
could I ask You if You have changed DeviceTree Blob file (DTB), too? There are some differences in drivers of Linux kernel versions 3 and 4, so appropriate DTB file is needed.
To be able to bring both CPUs, there has to be a following item at the DTB file at cpu node:
enable-method = “altr,socfpga-smp”;
And, of course, You have to use Linux kernel compiled for Arria 10 SoC with all of its specialities.
The DTB file differs in some important detailes even among different versions of Linux kernel versions 4.x - e,g. You there are imcompatibilities between DTB file for Linux kernel 4.1.33-LTSI and 4.9.78-LTSI.
Best wishes.
Yours Jan Konečný.

Hi. You are right.
I needed to add a line in the DTS. First I tried the line you wrote, I also saw this line in another thread from the past with the same title. It didn’t worked… I looked on the DTS file for the Arria 10 from Rocketboards.org and I saw this line again but this time with different method. I copied the line:

enable-method = “altr,socfpga-a10-smp”
Now its working.

I looked in the linux kernel code, it’s seems that there are different macros for different chips that involve in enabling the CPU so when you try the wrong enable method it’s probably failed because it’s use the wrong macro, I think this is the reason that only on my second attempt it’s worked. I’m not sure about that because I didn’t really looked deep in the code.

Thank you.
Ofir.

Hello,
I am sorry, I had not known that You use Arria 10. I might confuse You a bit, not am I? My chip is Cyclone V, so the line for DeviceTree, which I mentioned, is for Cyclone V.
I am pleased to help You a bit.
Best wishes in advance.
Jan Konečný.