Can cores have different CPU features in a SMP system?
Jun Sun
jsun at junsun.net
Wed Aug 3 21:14:58 PDT 2016
Maybe I'm missing something. read_system_reg() seems to be reading
the values initialized by cpu0. Not true?
Jun
On Wed, Aug 3, 2016 at 2:42 AM, Suzuki K Poulose <Suzuki.Poulose at arm.com> wrote:
> On 03/08/16 10:00, Suzuki K Poulose wrote:
>>
>> On 02/08/16 18:23, Jun Sun wrote:
>>>
>>> Hi, Suzuki,
>>>
>>> I was looking at kernel 3.18 and drew the earlier conclusion.
>>>
>>> I'm now looking at kernel v4.7-rc4. It appears the logic is
>>>
>>> - cpu 0 sets up elf_hwcap (init_cpu_ftr_reg(), init_cpu_features() )
>>
>>
>> On arm64 CPU 0 doesn't set up elf_hwcap. It initialises the CPU feature
>> register
>> infrastructure which keeps track of the system wide safe values for the ID
>> registers. init_cpu_features() initialises the table with the values from
>> the boot CPU. This will also be used to detect if any secondary CPU has
>> variations in features which could affect the normal functioning of Linux
>> (via
>> update_cpu_features() -> check_update_ftr_reg() ).
>>
>> The elf_hwcap and the system CPU_HWCAP bits are initialised only after all
>> the boot time active CPUs are online, from
>> setup_cpu_features()-> { setup_elf_hwcaps(), setup_feature_capabilities()
>> }
>
>
> And the values are set based on the system wide safe values from the CPU
> feature
> infrastructure (using read_system_reg()).
>
> Suzuki
>
More information about the linux-arm-kernel
mailing list