This repository was archived by the owner on Nov 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1743,6 +1743,20 @@ static int __init amd_pstate_set_driver(int mode_idx)
1743
1743
return - EINVAL ;
1744
1744
}
1745
1745
1746
+ /**
1747
+ * CPPC function is not supported for family ID 17H with model_ID ranging from 0x10 to 0x2F.
1748
+ * show the debug message that helps to check if the CPU has CPPC support for loading issue.
1749
+ */
1750
+ static bool amd_cppc_supported (void )
1751
+ {
1752
+ if ((boot_cpu_data .x86 == 0x17 ) && (boot_cpu_data .x86_model < 0x30 )) {
1753
+ pr_debug_once ("CPPC feature is not supported by the processor\n" );
1754
+ return false;
1755
+ }
1756
+
1757
+ return true;
1758
+ }
1759
+
1746
1760
static int __init amd_pstate_init (void )
1747
1761
{
1748
1762
struct device * dev_root ;
@@ -1751,6 +1765,11 @@ static int __init amd_pstate_init(void)
1751
1765
if (boot_cpu_data .x86_vendor != X86_VENDOR_AMD )
1752
1766
return - ENODEV ;
1753
1767
1768
+ /* show debug message only if CPPC is not supported */
1769
+ if (!amd_cppc_supported ())
1770
+ return - EOPNOTSUPP ;
1771
+
1772
+ /* show warning message when BIOS broken or ACPI disabled */
1754
1773
if (!acpi_cpc_valid ()) {
1755
1774
pr_warn_once ("the _CPC object is not present in SBIOS or ACPI disabled\n" );
1756
1775
return - ENODEV ;
You can’t perform that action at this time.
0 commit comments