Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[linux-6.6.y] Add support for Zhaoxin Processors #253

Conversation

leoliu-oc
Copy link
Contributor

Let Linux supports new Zhaoxin CPU features and " Shanghai " CPU vendor ID;
let related drivers supports new Zhaoxin CPU FMS.
Fix a CPU topo limitation of Installed kernel use CPUID B leaf to get CPU topo as default,
add 4leaf get CPU cacheinfo additionally.

Note:
Support for the Zhaoxin processor includes two vendor IDs, zhaoxin and centaur, so we will synchronously modify centaur.c and zhaoxin.c.

Include:

  1. x86/cpufeatures: Add Zhaoxin feature bits
  2. x86/cpu: Add detect extended topology for Zhaoxin CPUs

@deepin-ci-robot
Copy link

Hi @leoliu-oc. Thanks for your PR. 😃

@deepin-ci-robot
Copy link

Hi @leoliu-oc. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@leoliu-oc leoliu-oc force-pushed the linux-6.6.y-01-cpu-topo-features branch from 5e6efc4 to f89189f Compare June 12, 2024 07:39
@opsiff
Copy link
Member

opsiff commented Jun 12, 2024

/ok-to-test

@@ -148,6 +148,8 @@
/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
#define X86_FEATURE_XSTORE ( 5*32+ 2) /* "rng" RNG present (xstore) */
#define X86_FEATURE_XSTORE_EN ( 5*32+ 3) /* "rng_en" RNG enabled */
#define X86_FEATURE_CCS (5*32+4) /* "sm3 sm4" present */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个(532+4)相比( 532+ 3) 格式不对。下面也需要改。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

未与文档既定格式保持一致的原因,是因为会导致checkpatch.pl脚本检查不通过。不过,这边会按照建议修改。

leoliu-oc added 2 commits July 3, 2024 10:58
zhaoxin inclusion
category: feature

-------------------

Add Zhaoxin feature bits on Zhaoxin CPUs.

Signed-off-by: leoliu-oc <[email protected]>
zhaoxin inclusion
category: feature

-------------------

Detect the extended topology information of Zhaoxin CPUs if available.

Signed-off-by: leoliu-oc <[email protected]>
@leoliu-oc leoliu-oc force-pushed the linux-6.6.y-01-cpu-topo-features branch from f89189f to 28abea9 Compare July 3, 2024 03:02
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • early_init_centaur函数中,新增的detect_extended_topology_early函数调用可能会导致未处理的初始化路径。
  • init_centaur函数中,移除了detect_num_cpu_cores函数的调用,但没有提供替代方案来处理这个功能。
  • init_zhaoxin函数中,新增的detect_extended_topology函数调用可能会导致未处理的初始化路径。
  • 新增的宏定义X86_FEATURE_CCSX86_FEATURE_CCS_EN可能缺少对应的注释说明,不利于代码的可读性和维护性。

是否建议立即修改:

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: opsiff
Once this PR has been reviewed and has the lgtm label, please assign yukarichiba for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@opsiff
Copy link
Member

opsiff commented Jul 3, 2024

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants