Re: [PATCH v3 part1 07/11] ARM64 / ACPI: Introduce arch_fix_phys_package_id() for cpu topology

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

 



Hi Mark,

On 2014-4-25 22:52, Mark Brown wrote:
> On Fri, Apr 25, 2014 at 09:20:13PM +0800, Hanjun Guo wrote:
> 
>> +/*
>> + * Use the CPU slot number provided by ACPI to update the physical
>> + * package id, then we can get the right value in the "physical id"
>> + * field of /proc/cpuinfo.
>> + */
>> +void arch_fix_phys_package_id(int num, u32 slot)
>> +{
>> +	struct cpu_topology *cpuid_topo = &cpu_topology[num];
>> +
>> +	if (cpuid_topo->cluster_id == -1)
>> +		cpuid_topo->cluster_id = slot;
>> +}
>> +EXPORT_SYMBOL_GPL(arch_fix_phys_package_id);
> 
> This isn't going to work once we parse the MPIDR - we will always have a
> cluster ID from MPIDR unless the system is uniprocessor (which doesn't
> seem like it's going to be a common or useful case).  We'll either need
> to have something in the topology parsing path which goes out and
> queries ACPI before we try to parse MPIDR or this will need to just set
> whatever it's told to set unconditionally.

I prefer the latter way.

Since platform software (firmware) knows the topology of the system, if
ACPI describes a slot number for this CPU, I think we can use it
unconditionally.

Thanks
Hanjun
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux