Skip to content

Conversation

@opsiff
Copy link
Member

@opsiff opsiff commented Sep 6, 2024

workaround由于BIOS bug 导致 桌面版本 鲲鹏920 不能使能cppc-cpufreq的问题。

{

if (read_cpuid_implementor() == ARM_CPU_IMP_HISI) {
/* For normal memory we already have a cacheable mapping. */
Copy link

Choose a reason for hiding this comment

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

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

int ret = -ENODATA;

if (!osc_sb_cppc2_support_acked) {
if (read_cpuid_implementor() != ARM_CPU_IMP_HISI && !osc_sb_cppc2_support_acked) {
Copy link

Choose a reason for hiding this comment

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

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

@opsiff opsiff marked this pull request as draft September 6, 2024 19:30
…cess kernel memory

If we have a buggy bios,and we have no bios update for it,
we cannot access the _OSC map,
so the CPPC cpufreq driver will not probed in some case.
example: Kunpeng 920  8 core Desktop Board

Log:
ACPI CPPC: Failed to ioremap PCC comm region mem for 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0

Link:https://gitee.com/openeuler/kernel/issues/I39AN0
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
If we have a buggy bios,and we have no bios update for it,
we cannot acked CPPCv2.
so the CPPC cpufreq driver will not probed in some case.
example: Kunpeng 920  8 core Desktop Board

Test result: cpu freq can from 200Mhz to 2.6Ghz.

Log:
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
@opsiff opsiff force-pushed the opsiff-kp920-fixes-cpufreq branch from fcb93a6 to a52a204 Compare September 7, 2024 08:23
{
#ifdef CONFIG_ARM64
if (read_cpuid_implementor() == ARM_CPU_IMP_HISI) {
/* For normal memory we already have a cacheable mapping. */
Copy link

Choose a reason for hiding this comment

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

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

int ret = -ENODATA;

#ifdef CONFIG_ARM64
if (read_cpuid_implementor() != ARM_CPU_IMP_HISI && !osc_sb_cppc2_support_acked) {
Copy link

Choose a reason for hiding this comment

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

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details 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

@Avenger-285714 Avenger-285714 marked this pull request as ready for review September 9, 2024 07:33
@Avenger-285714 Avenger-285714 merged commit cce573f into linux-6.6.y Sep 9, 2024
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • acpi_os_ioremap函数中,对memblock_is_map_memory(phys)的检查可能不准确,因为它依赖于phys地址的内存属性。如果phys地址的内存属性与__acpi_get_mem_attribute(phys)不匹配,可能会导致问题。
  • acpi_cppc_processor_probe函数中,使用read_cpuid_implementor()来检查CPU架构是否为Hisi,但没有考虑到不同架构的兼容性。如果其他架构也支持CPPc2,那么这个检查可能会导致不正确的结果。
  • acpi_cppc_processor_probe函数中,osc_sb_cppc2_support_acked变量被检查,但没有考虑到这个变量的作用域。如果这个变量在其他地方被修改,那么这个检查可能会导致问题。

是否建议立即修改:

@opsiff opsiff deleted the opsiff-kp920-fixes-cpufreq branch September 16, 2024 14:30
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
…cess kernel memory

If we have a buggy bios,and we have no bios update for it,
we cannot access the _OSC map,
so the CPPC cpufreq driver will not probed in some case.
example: Kunpeng 920  8 core Desktop Board

Log:
ACPI CPPC: Failed to ioremap PCC comm region mem for 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0

Link: https://gitee.com/openeuler/kernel/issues/I39AN0
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: deepin-community#409
(cherry picked from commit 534de05)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
If we have a buggy bios,and we have no bios update for it,
we cannot acked CPPCv2.
so the CPPC cpufreq driver will not probed in some case.
example: Kunpeng 920  8 core Desktop Board

Test result: cpu freq can from 200Mhz to 2.6Ghz.

Log:
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked

Link: deepin-community#409
(cherry picked from commit 816c5ec)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
…cess kernel memory

If we have a buggy bios,and we have no bios update for it,
we cannot access the _OSC map,
so the CPPC cpufreq driver will not probed in some case.
example: Kunpeng 920  8 core Desktop Board

Log:
ACPI CPPC: Failed to ioremap PCC comm region mem for 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0

Link: https://gitee.com/openeuler/kernel/issues/I39AN0
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: deepin-community#409
(cherry picked from commit 534de05)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Dec 29, 2025
If we have a buggy bios,and we have no bios update for it,
we cannot acked CPPCv2.
so the CPPC cpufreq driver will not probed in some case.
example: Kunpeng 920  8 core Desktop Board

Test result: cpu freq can from 200Mhz to 2.6Ghz.

Log:
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked

Link: deepin-community#409
(cherry picked from commit 816c5ec)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Jan 4, 2026
…cess kernel memory

If we have a buggy bios,and we have no bios update for it,
we cannot access the _OSC map,
so the CPPC cpufreq driver will not probed in some case.
example: Kunpeng 920  8 core Desktop Board

Log:
ACPI CPPC: Failed to ioremap PCC comm region mem for 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0
ACPI CPPC: Failed to find PCC channel for subspace 0

Link: https://gitee.com/openeuler/kernel/issues/I39AN0
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: #409
(cherry picked from commit 534de05)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
lanlanxiyiji pushed a commit that referenced this pull request Jan 4, 2026
If we have a buggy bios,and we have no bios update for it,
we cannot acked CPPCv2.
so the CPPC cpufreq driver will not probed in some case.
example: Kunpeng 920  8 core Desktop Board

Test result: cpu freq can from 200Mhz to 2.6Ghz.

Log:
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked
cppc_acpi:acpi_cppc_processor_probe: ACPI CPPC: CPPC v2 _OSC not acked

Link: #409
(cherry picked from commit 816c5ec)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants