Page MenuHomePhabricator

TF-A Bug
Closed, ResolvedPublic


Recently, we notice that the member of struct "non_cpu_pwr_domain_node", called lock_index, is assigned to "unsigned char", that means the psci or pwr_domain most support system with 2^8 cores.
when the feature is applies to a complex system, the data might be unexpected.
we just wonder the type of "lock_index" can be expanded to "unsigned int".


Event Timeline

The struct "non_cpu_pwr_domain_node" represents a non-leaf power domain in an SoC such as a logical cluster. As you mentioned, the lock_index declaration with "unsigned char" limits such non-cpu power domains to 64. I believe it doesn't restrict the number of CPUs in a system to be <= 64. Do you currently face an issue with PSCI implementation due to the above constraint? Can you advise what is the power domain topology of your system? I think the lock_index can be expanded using "unsigned int" if needed.

Yes, The power domain topology of the system can be described as 8 sockets, each socket with 10 clusters and each cluster with 8 cores. We just consider a system like this might face the constraint mentioned above, and we must modify the declaration of lock_index to solve this problem. Feature, more and more interconnected system, with numerous cpus, might face the same problem.


Yeah, looks like such a large system with numerous clusters will run into an issue with the current limitation of "lock_index" being "unsigned char". Please go ahead and submit a patch for review:

Thanks for your reply. It is difficult to submit code to community or Gerrit using company's account and system. So, I wonder whether it's permitted to upload by providing modifications or “git send-email” with patches.

Thanks a lot.

This comment was removed by joannafarley-arm.

Please use personal email and git configs/identity to push the patch to Few developers from the tf-a community have done this. Here is a link to contribution guidelines:

A developer submitted a patch which closely relates to this issue. Please give your feedback here:

yuezhiran closed this task as Resolved.May 11 2021, 1:40 PM

The problem has been solved.