This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Change Smp Mode Linux Configuration on K2E Evm

Hi all,

Im using 66AK2E evm. Evm comes with  U-Boot 2013.01 and smp mode Linux v3.10.10 on it (4 arm core running [arm0-to-3] ).  I download linux in here "https://git.ti.com/keystone-linux/linux/commits/v3.10.10/master".  

Im curious to change factory default smp mode linux. First, i changed "CONFIG_NR_CPUS" 4 to 2 in ".config" file. Rebuild Linux 3.10.10 and saw linux runs only 2 core(arm0 & arm1).

I want to change that like; linux runs arm1 & arm2. So Master core (arm0) will be free for my another arm project. How can i do that? I mean i couldnt find anything related this in configuration files.

Any suggestion would be helpful.

Best Regards.

Srt

  • Hi,
    Try to change the cpus entry in the following file.
    arch/arm/boot/dts/k2hk.dtsi
  • Hi Stalin,

    Thank you for your response. I search that file and change some lines. But i think this changes not enough.(i changed arch/arm/boot/dts/k2e.dtsi, related with my evm)

    Deleting the only cpu 3 entries causes smp linux runs on core0,1,2. Thats expected. But i could do that anyway with changing "CONFIG_NR_CPUS" inside of the ".config" file. If i give CONFIG_NR_CPUS=2, only core0,1 runs. What i want is run smp linux without core0.

    When i delete only cpu 0 entries inside of k2e.dtsi, its says "DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map" on linux open, and only core0 runs, the others not.

    I found that line inside of "arch/arm/kernel/devtree.c". Maybe when i change some line, it would be work. But when i start changing linux codes, i think it takes so many times. Is there any alternative way to do that? Like Changing some lines inside of config files?

    Also i found "scripts/mod/devicetable-offsets.c" some definitions, this "OFF_x86_cpu_id_vendor" represent core0? I just suggesting, how can i learn really what they are represent? Is there any document related?

    #define SIZE_x86_cpu_id 12 /* sizeof(struct x86_cpu_id) @ */
    #define OFF_x86_cpu_id_feature 6 /* offsetof(struct x86_cpu_id, feature) @ */
    #define OFF_x86_cpu_id_family 2 /* offsetof(struct x86_cpu_id, family) @ */
    #define OFF_x86_cpu_id_model 4 /* offsetof(struct x86_cpu_id, model) @ */
    #define OFF_x86_cpu_id_vendor 0 /* offsetof(struct x86_cpu_id, vendor) @ */

    Best Regards.

    Srt
  • Hi all,

    I was trying rebuild Linux v3.10.10 for 66AK2E(k2e-evm) (4 arm core [arm0-to-3] ). When i rebuild project with default specs, smp linux runs on 4 arm core.

    First I tried to rebuild Linux for different running arm number and i succeed that with changing ''CONFIG_NR_CPUS" in config" file. While CONFIG_NR_CPUS = 2, arm0 & arm1 runs. While CONFIG_NR_CPUS = 3, arm0 & arm1 & arm2 runs. While CONFIG_NR_CPUS = 4, arm0 & arm1 & arm2 & arm3 runs.

    Thanks to Stalin, I changed k2e.dtsi with no-change ''CONFIG_NR_CPUS=4". For example i deleted cpu0, and no-change cpu1, cpu2, cpu3 in k2e.dtsi, Linux printed that "DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map" and arm0 runs.

    I tried my linux files that way:
    I changed orjinal uboot to load my rebuilded loads. I tried that: i powered up evm, uboot runs on arm0, Linux files loading ram and stop before booting kernel, so promt comes ( uboot just waiting, do nothing ). I load my own rebuilded Linux files same adresses. So i write "bootm 0x88000000 - 0x87000000", booting kernel from that adresses and linux runs.

    I want to try "bootm" command on arm1 that way:
    I powered up evm, uboot runs on arm0, Linux files loading ram and stop before booting kernel, so promt comes ( uboot just waiting, do nothing ). I powered up arm1 with "mon_power 1 1", connect and load same uboot, uboot runs on arm1, Linux files loading ram and stop before booting kernel, so promt comes I load my own rebuilded Linux files same adresses. So i write "bootm 0x88000000 - 0x87000000", booting kernel from that adresses, successfully linux runs on arm1. But problem is Linux print that: "CPU0: thread -1, cpu 1, socket 0, mpidr 80000001; CPU1: failed to boot: -6; CPU2: failed to boot: -6; CPU3: failed to boot: -6". So i tried again the "bootm" command on arm1. I did extra power-on commands for other cores but nothing changed, same texts printed.

    Since the begining, I want to run that linux on secondary core(s). But i couldnt do that. Any suggestion would be helpfull.

    Best Regards.

    Srt
  • Hi Srt,
    We have not experimented and the current MCSDK does not support such configurations. My recommendation is to run the SMP linux on core 0, 1 & 2, and use the core 3 for your another ARM application development.

    Thank you.
  • Any reason why are you trying to keep ARM core0 for application development?
  • Hi Raja,

    Thank you for your response. The reason to trying to keep master core is that; the master core(application development) is always runs when the linux not. So i want to keep that core for application development.

    if i want to use linux, i changed a flag on uboot environment, so master core loads the smp mode linux on the other 3 secondary core. If i flipped this environment, the master core loads another application load on one of secondary cores.

    How can i changed linux codes like this? Is it possible to run smp mode linux on secondary cores?

    Best Regards,

    Srt