tangled
alpha
login
or
join now
tjh.dev
/
kernel
1
fork
atom
Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1
fork
atom
overview
issues
pulls
pipelines
Merge back cpufreq material for 6.13
Rafael J. Wysocki
1 year ago
22077269
92447aa5
+118
-159
23 changed files
expand all
collapse all
unified
split
drivers
cpufreq
acpi-cpufreq.c
amd-pstate-ut.c
amd-pstate.c
brcmstb-avs-cpufreq.c
cpufreq-dt.c
cpufreq.c
davinci-cpufreq.c
imx-cpufreq-dt.c
imx6q-cpufreq.c
kirkwood-cpufreq.c
loongson3_cpufreq.c
mediatek-cpufreq-hw.c
omap-cpufreq.c
pcc-cpufreq.c
qcom-cpufreq-hw.c
qcom-cpufreq-nvmem.c
qoriq-cpufreq.c
raspberrypi-cpufreq.c
scpi-cpufreq.c
sun50i-cpufreq-nvmem.c
tegra186-cpufreq.c
tegra194-cpufreq.c
vexpress-spc-cpufreq.c
+1
-1
drivers/cpufreq/acpi-cpufreq.c
reviewed
···
1028
1028
.driver = {
1029
1029
.name = "acpi-cpufreq",
1030
1030
},
1031
1031
-
.remove_new = acpi_cpufreq_remove,
1031
1031
+
.remove = acpi_cpufreq_remove,
1032
1032
};
1033
1033
1034
1034
static int __init acpi_cpufreq_init(void)
+3
-3
drivers/cpufreq/amd-pstate-ut.c
reviewed
···
227
227
goto skip_test;
228
228
}
229
229
230
230
-
if (cpudata->min_freq != policy->min) {
230
230
+
if (cpudata->lowest_nonlinear_freq != policy->min) {
231
231
amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_FAIL;
232
232
-
pr_err("%s cpu%d cpudata_min_freq=%d policy_min=%d, they should be equal!\n",
233
233
-
__func__, cpu, cpudata->min_freq, policy->min);
232
232
+
pr_err("%s cpu%d cpudata_lowest_nonlinear_freq=%d policy_min=%d, they should be equal!\n",
233
233
+
__func__, cpu, cpudata->lowest_nonlinear_freq, policy->min);
234
234
goto skip_test;
235
235
}
236
236
+94
-135
drivers/cpufreq/amd-pstate.c
reviewed
···
233
233
return index;
234
234
}
235
235
236
236
-
static void pstate_update_perf(struct amd_cpudata *cpudata, u32 min_perf,
236
236
+
static void msr_update_perf(struct amd_cpudata *cpudata, u32 min_perf,
237
237
u32 des_perf, u32 max_perf, bool fast_switch)
238
238
{
239
239
if (fast_switch)
···
243
243
READ_ONCE(cpudata->cppc_req_cached));
244
244
}
245
245
246
246
-
DEFINE_STATIC_CALL(amd_pstate_update_perf, pstate_update_perf);
246
246
+
DEFINE_STATIC_CALL(amd_pstate_update_perf, msr_update_perf);
247
247
248
248
static inline void amd_pstate_update_perf(struct amd_cpudata *cpudata,
249
249
u32 min_perf, u32 des_perf,
···
306
306
return ret;
307
307
}
308
308
309
309
-
static inline int pstate_enable(bool enable)
309
309
+
static inline int msr_cppc_enable(bool enable)
310
310
{
311
311
int ret, cpu;
312
312
unsigned long logical_proc_id_mask = 0;
313
313
+
314
314
+
/*
315
315
+
* MSR_AMD_CPPC_ENABLE is write-once, once set it cannot be cleared.
316
316
+
*/
317
317
+
if (!enable)
318
318
+
return 0;
313
319
314
320
if (enable == cppc_enabled)
315
321
return 0;
···
338
332
return 0;
339
333
}
340
334
341
341
-
static int cppc_enable(bool enable)
335
335
+
static int shmem_cppc_enable(bool enable)
342
336
{
343
337
int cpu, ret = 0;
344
338
struct cppc_perf_ctrls perf_ctrls;
···
365
359
return ret;
366
360
}
367
361
368
368
-
DEFINE_STATIC_CALL(amd_pstate_enable, pstate_enable);
362
362
+
DEFINE_STATIC_CALL(amd_pstate_cppc_enable, msr_cppc_enable);
369
363
370
370
-
static inline int amd_pstate_enable(bool enable)
364
364
+
static inline int amd_pstate_cppc_enable(bool enable)
371
365
{
372
372
-
return static_call(amd_pstate_enable)(enable);
366
366
+
return static_call(amd_pstate_cppc_enable)(enable);
373
367
}
374
368
375
375
-
static int pstate_init_perf(struct amd_cpudata *cpudata)
369
369
+
static int msr_init_perf(struct amd_cpudata *cpudata)
376
370
{
377
371
u64 cap1;
378
372
···
391
385
return 0;
392
386
}
393
387
394
394
-
static int cppc_init_perf(struct amd_cpudata *cpudata)
388
388
+
static int shmem_init_perf(struct amd_cpudata *cpudata)
395
389
{
396
390
struct cppc_perf_caps cppc_perf;
397
391
···
426
420
return ret;
427
421
}
428
422
429
429
-
DEFINE_STATIC_CALL(amd_pstate_init_perf, pstate_init_perf);
423
423
+
DEFINE_STATIC_CALL(amd_pstate_init_perf, msr_init_perf);
430
424
431
425
static inline int amd_pstate_init_perf(struct amd_cpudata *cpudata)
432
426
{
433
427
return static_call(amd_pstate_init_perf)(cpudata);
434
428
}
435
429
436
436
-
static void cppc_update_perf(struct amd_cpudata *cpudata,
430
430
+
static void shmem_update_perf(struct amd_cpudata *cpudata,
437
431
u32 min_perf, u32 des_perf,
438
432
u32 max_perf, bool fast_switch)
439
433
{
···
533
527
cpufreq_cpu_put(policy);
534
528
}
535
529
536
536
-
static int amd_pstate_verify(struct cpufreq_policy_data *policy)
530
530
+
static int amd_pstate_verify(struct cpufreq_policy_data *policy_data)
537
531
{
538
538
-
cpufreq_verify_within_cpu_limits(policy);
532
532
+
/*
533
533
+
* Initialize lower frequency limit (i.e.policy->min) with
534
534
+
* lowest_nonlinear_frequency which is the most energy efficient
535
535
+
* frequency. Override the initial value set by cpufreq core and
536
536
+
* amd-pstate qos_requests.
537
537
+
*/
538
538
+
if (policy_data->min == FREQ_QOS_MIN_DEFAULT_VALUE) {
539
539
+
struct cpufreq_policy *policy = cpufreq_cpu_get(policy_data->cpu);
540
540
+
struct amd_cpudata *cpudata;
541
541
+
542
542
+
if (!policy)
543
543
+
return -EINVAL;
544
544
+
545
545
+
cpudata = policy->driver_data;
546
546
+
policy_data->min = cpudata->lowest_nonlinear_freq;
547
547
+
cpufreq_cpu_put(policy);
548
548
+
}
549
549
+
550
550
+
cpufreq_verify_within_cpu_limits(policy_data);
551
551
+
pr_debug("policy_max =%d, policy_min=%d\n", policy_data->max, policy_data->min);
539
552
540
553
return 0;
541
554
}
···
690
665
static int amd_pstate_cpu_boost_update(struct cpufreq_policy *policy, bool on)
691
666
{
692
667
struct amd_cpudata *cpudata = policy->driver_data;
693
693
-
struct cppc_perf_ctrls perf_ctrls;
694
694
-
u32 highest_perf, nominal_perf, nominal_freq, max_freq;
668
668
+
u32 nominal_freq, max_freq;
695
669
int ret = 0;
696
670
697
697
-
highest_perf = READ_ONCE(cpudata->highest_perf);
698
698
-
nominal_perf = READ_ONCE(cpudata->nominal_perf);
699
671
nominal_freq = READ_ONCE(cpudata->nominal_freq);
700
672
max_freq = READ_ONCE(cpudata->max_freq);
701
701
-
702
702
-
if (boot_cpu_has(X86_FEATURE_CPPC)) {
703
703
-
u64 value = READ_ONCE(cpudata->cppc_req_cached);
704
704
-
705
705
-
value &= ~GENMASK_ULL(7, 0);
706
706
-
value |= on ? highest_perf : nominal_perf;
707
707
-
WRITE_ONCE(cpudata->cppc_req_cached, value);
708
708
-
709
709
-
wrmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, value);
710
710
-
} else {
711
711
-
perf_ctrls.max_perf = on ? highest_perf : nominal_perf;
712
712
-
ret = cppc_set_perf(cpudata->cpu, &perf_ctrls);
713
713
-
if (ret) {
714
714
-
cpufreq_cpu_release(policy);
715
715
-
pr_debug("Failed to set max perf on CPU:%d. ret:%d\n",
716
716
-
cpudata->cpu, ret);
717
717
-
return ret;
718
718
-
}
719
719
-
}
720
673
721
674
if (on)
722
675
policy->cpuinfo.max_freq = max_freq;
···
1004
1001
policy->fast_switch_possible = true;
1005
1002
1006
1003
ret = freq_qos_add_request(&policy->constraints, &cpudata->req[0],
1007
1007
-
FREQ_QOS_MIN, policy->cpuinfo.min_freq);
1004
1004
+
FREQ_QOS_MIN, FREQ_QOS_MIN_DEFAULT_VALUE);
1008
1005
if (ret < 0) {
1009
1006
dev_err(dev, "Failed to add min-freq constraint (%d)\n", ret);
1010
1007
goto free_cpudata1;
···
1048
1045
{
1049
1046
int ret;
1050
1047
1051
1051
-
ret = amd_pstate_enable(true);
1048
1048
+
ret = amd_pstate_cppc_enable(true);
1052
1049
if (ret)
1053
1050
pr_err("failed to enable amd-pstate during resume, return %d\n", ret);
1054
1051
···
1059
1056
{
1060
1057
int ret;
1061
1058
1062
1062
-
ret = amd_pstate_enable(false);
1059
1059
+
ret = amd_pstate_cppc_enable(false);
1063
1060
if (ret)
1064
1061
pr_err("failed to disable amd-pstate during suspend, return %d\n", ret);
1065
1062
···
1192
1189
1193
1190
static void amd_pstate_driver_cleanup(void)
1194
1191
{
1195
1195
-
amd_pstate_enable(false);
1192
1192
+
amd_pstate_cppc_enable(false);
1196
1193
cppc_state = AMD_PSTATE_DISABLE;
1197
1194
current_pstate_driver = NULL;
1195
1195
+
}
1196
1196
+
1197
1197
+
static int amd_pstate_set_driver(int mode_idx)
1198
1198
+
{
1199
1199
+
if (mode_idx >= AMD_PSTATE_DISABLE && mode_idx < AMD_PSTATE_MAX) {
1200
1200
+
cppc_state = mode_idx;
1201
1201
+
if (cppc_state == AMD_PSTATE_DISABLE)
1202
1202
+
pr_info("driver is explicitly disabled\n");
1203
1203
+
1204
1204
+
if (cppc_state == AMD_PSTATE_ACTIVE)
1205
1205
+
current_pstate_driver = &amd_pstate_epp_driver;
1206
1206
+
1207
1207
+
if (cppc_state == AMD_PSTATE_PASSIVE || cppc_state == AMD_PSTATE_GUIDED)
1208
1208
+
current_pstate_driver = &amd_pstate_driver;
1209
1209
+
1210
1210
+
return 0;
1211
1211
+
}
1212
1212
+
1213
1213
+
return -EINVAL;
1198
1214
}
1199
1215
1200
1216
static int amd_pstate_register_driver(int mode)
1201
1217
{
1202
1218
int ret;
1203
1219
1204
1204
-
if (mode == AMD_PSTATE_PASSIVE || mode == AMD_PSTATE_GUIDED)
1205
1205
-
current_pstate_driver = &amd_pstate_driver;
1206
1206
-
else if (mode == AMD_PSTATE_ACTIVE)
1207
1207
-
current_pstate_driver = &amd_pstate_epp_driver;
1208
1208
-
else
1209
1209
-
return -EINVAL;
1220
1220
+
ret = amd_pstate_set_driver(mode);
1221
1221
+
if (ret)
1222
1222
+
return ret;
1210
1223
1211
1224
cppc_state = mode;
1212
1225
1213
1213
-
ret = amd_pstate_enable(true);
1226
1226
+
ret = amd_pstate_cppc_enable(true);
1214
1227
if (ret) {
1215
1228
pr_err("failed to enable cppc during amd-pstate driver registration, return %d\n",
1216
1229
ret);
···
1504
1485
WRITE_ONCE(cpudata->cppc_cap1_cached, value);
1505
1486
}
1506
1487
1488
1488
+
current_pstate_driver->adjust_perf = NULL;
1489
1489
+
1507
1490
return 0;
1508
1491
1509
1492
free_cpudata1:
···
1528
1507
static int amd_pstate_epp_update_limit(struct cpufreq_policy *policy)
1529
1508
{
1530
1509
struct amd_cpudata *cpudata = policy->driver_data;
1531
1531
-
u32 max_perf, min_perf, min_limit_perf, max_limit_perf;
1510
1510
+
u32 max_perf, min_perf;
1532
1511
u64 value;
1533
1512
s16 epp;
1534
1513
1535
1535
-
if (cpudata->boost_supported && !policy->boost_enabled)
1536
1536
-
max_perf = READ_ONCE(cpudata->nominal_perf);
1537
1537
-
else
1538
1538
-
max_perf = READ_ONCE(cpudata->highest_perf);
1514
1514
+
max_perf = READ_ONCE(cpudata->highest_perf);
1539
1515
min_perf = READ_ONCE(cpudata->lowest_perf);
1540
1540
-
max_limit_perf = div_u64(policy->max * max_perf, policy->cpuinfo.max_freq);
1541
1541
-
min_limit_perf = div_u64(policy->min * max_perf, policy->cpuinfo.max_freq);
1542
1542
-
1543
1543
-
if (min_limit_perf < min_perf)
1544
1544
-
min_limit_perf = min_perf;
1545
1545
-
1546
1546
-
if (max_limit_perf < min_limit_perf)
1547
1547
-
max_limit_perf = min_limit_perf;
1548
1548
-
1549
1549
-
WRITE_ONCE(cpudata->max_limit_perf, max_limit_perf);
1550
1550
-
WRITE_ONCE(cpudata->min_limit_perf, min_limit_perf);
1516
1516
+
amd_pstate_update_min_max_limit(policy);
1551
1517
1552
1518
max_perf = clamp_t(unsigned long, max_perf, cpudata->min_limit_perf,
1553
1519
cpudata->max_limit_perf);
···
1543
1535
value = READ_ONCE(cpudata->cppc_req_cached);
1544
1536
1545
1537
if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE)
1546
1546
-
min_perf = max_perf;
1538
1538
+
min_perf = min(cpudata->nominal_perf, max_perf);
1547
1539
1548
1540
/* Initial min/max values for CPPC Performance Controls Register */
1549
1541
value &= ~AMD_CPPC_MIN_PERF(~0L);
···
1570
1562
1571
1563
if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE)
1572
1564
epp = 0;
1573
1573
-
1574
1574
-
/* Set initial EPP value */
1575
1575
-
if (cpu_feature_enabled(X86_FEATURE_CPPC)) {
1576
1576
-
value &= ~GENMASK_ULL(31, 24);
1577
1577
-
value |= (u64)epp << 24;
1578
1578
-
}
1579
1565
1580
1566
WRITE_ONCE(cpudata->cppc_req_cached, value);
1581
1567
return amd_pstate_set_epp(cpudata, epp);
···
1607
1605
u64 value, max_perf;
1608
1606
int ret;
1609
1607
1610
1610
-
ret = amd_pstate_enable(true);
1608
1608
+
ret = amd_pstate_cppc_enable(true);
1611
1609
if (ret)
1612
1610
pr_err("failed to enable amd pstate during resume, return %d\n", ret);
1613
1611
···
1618
1616
wrmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, value);
1619
1617
} else {
1620
1618
perf_ctrls.max_perf = max_perf;
1621
1621
-
perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(cpudata->epp_cached);
1622
1619
cppc_set_perf(cpudata->cpu, &perf_ctrls);
1620
1620
+
perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(cpudata->epp_cached);
1621
1621
+
cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1);
1623
1622
}
1624
1623
}
1625
1624
···
1660
1657
wrmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, value);
1661
1658
} else {
1662
1659
perf_ctrls.desired_perf = 0;
1660
1660
+
perf_ctrls.min_perf = min_perf;
1663
1661
perf_ctrls.max_perf = min_perf;
1664
1664
-
perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(HWP_EPP_BALANCE_POWERSAVE);
1665
1662
cppc_set_perf(cpudata->cpu, &perf_ctrls);
1663
1663
+
perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(HWP_EPP_BALANCE_POWERSAVE);
1664
1664
+
cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1);
1666
1665
}
1667
1666
mutex_unlock(&amd_pstate_limits_lock);
1668
1667
}
···
1684
1679
return 0;
1685
1680
}
1686
1681
1687
1687
-
static int amd_pstate_epp_verify_policy(struct cpufreq_policy_data *policy)
1688
1688
-
{
1689
1689
-
cpufreq_verify_within_cpu_limits(policy);
1690
1690
-
pr_debug("policy_max =%d, policy_min=%d\n", policy->max, policy->min);
1691
1691
-
return 0;
1692
1692
-
}
1693
1693
-
1694
1682
static int amd_pstate_epp_suspend(struct cpufreq_policy *policy)
1695
1683
{
1696
1684
struct amd_cpudata *cpudata = policy->driver_data;
···
1697
1699
cpudata->suspended = true;
1698
1700
1699
1701
/* disable CPPC in lowlevel firmware */
1700
1700
-
ret = amd_pstate_enable(false);
1702
1702
+
ret = amd_pstate_cppc_enable(false);
1701
1703
if (ret)
1702
1704
pr_err("failed to suspend, return %d\n", ret);
1703
1705
···
1739
1741
1740
1742
static struct cpufreq_driver amd_pstate_epp_driver = {
1741
1743
.flags = CPUFREQ_CONST_LOOPS,
1742
1742
-
.verify = amd_pstate_epp_verify_policy,
1744
1744
+
.verify = amd_pstate_verify,
1743
1745
.setpolicy = amd_pstate_epp_set_policy,
1744
1746
.init = amd_pstate_epp_cpu_init,
1745
1747
.exit = amd_pstate_epp_cpu_exit,
···
1753
1755
.attr = amd_pstate_epp_attr,
1754
1756
};
1755
1757
1756
1756
-
static int __init amd_pstate_set_driver(int mode_idx)
1757
1757
-
{
1758
1758
-
if (mode_idx >= AMD_PSTATE_DISABLE && mode_idx < AMD_PSTATE_MAX) {
1759
1759
-
cppc_state = mode_idx;
1760
1760
-
if (cppc_state == AMD_PSTATE_DISABLE)
1761
1761
-
pr_info("driver is explicitly disabled\n");
1762
1762
-
1763
1763
-
if (cppc_state == AMD_PSTATE_ACTIVE)
1764
1764
-
current_pstate_driver = &amd_pstate_epp_driver;
1765
1765
-
1766
1766
-
if (cppc_state == AMD_PSTATE_PASSIVE || cppc_state == AMD_PSTATE_GUIDED)
1767
1767
-
current_pstate_driver = &amd_pstate_driver;
1768
1768
-
1769
1769
-
return 0;
1770
1770
-
}
1771
1771
-
1772
1772
-
return -EINVAL;
1773
1773
-
}
1774
1774
-
1775
1775
-
/**
1758
1758
+
/*
1776
1759
* CPPC function is not supported for family ID 17H with model_ID ranging from 0x10 to 0x2F.
1777
1760
* show the debug message that helps to check if the CPU has CPPC support for loading issue.
1778
1761
*/
···
1843
1864
if (cppc_state == AMD_PSTATE_UNDEFINED) {
1844
1865
/* Disable on the following configs by default:
1845
1866
* 1. Undefined platforms
1846
1846
-
* 2. Server platforms
1867
1867
+
* 2. Server platforms with CPUs older than Family 0x1A.
1847
1868
*/
1848
1869
if (amd_pstate_acpi_pm_profile_undefined() ||
1849
1849
-
amd_pstate_acpi_pm_profile_server()) {
1870
1870
+
(amd_pstate_acpi_pm_profile_server() && boot_cpu_data.x86 < 0x1A)) {
1850
1871
pr_info("driver load is disabled, boot with specific mode to enable this\n");
1851
1872
return -ENODEV;
1852
1873
}
···
1854
1875
cppc_state = CONFIG_X86_AMD_PSTATE_DEFAULT_MODE;
1855
1876
}
1856
1877
1857
1857
-
switch (cppc_state) {
1858
1858
-
case AMD_PSTATE_DISABLE:
1878
1878
+
if (cppc_state == AMD_PSTATE_DISABLE) {
1859
1879
pr_info("driver load is disabled, boot with specific mode to enable this\n");
1860
1880
return -ENODEV;
1861
1861
-
case AMD_PSTATE_PASSIVE:
1862
1862
-
case AMD_PSTATE_ACTIVE:
1863
1863
-
case AMD_PSTATE_GUIDED:
1864
1864
-
ret = amd_pstate_set_driver(cppc_state);
1865
1865
-
if (ret)
1866
1866
-
return ret;
1867
1867
-
break;
1868
1868
-
default:
1869
1869
-
return -EINVAL;
1870
1881
}
1871
1882
1872
1883
/* capability check */
1873
1884
if (cpu_feature_enabled(X86_FEATURE_CPPC)) {
1874
1885
pr_debug("AMD CPPC MSR based functionality is supported\n");
1875
1875
-
if (cppc_state != AMD_PSTATE_ACTIVE)
1876
1876
-
current_pstate_driver->adjust_perf = amd_pstate_adjust_perf;
1877
1886
} else {
1878
1887
pr_debug("AMD CPPC shared memory based functionality is supported\n");
1879
1879
-
static_call_update(amd_pstate_enable, cppc_enable);
1880
1880
-
static_call_update(amd_pstate_init_perf, cppc_init_perf);
1881
1881
-
static_call_update(amd_pstate_update_perf, cppc_update_perf);
1888
1888
+
static_call_update(amd_pstate_cppc_enable, shmem_cppc_enable);
1889
1889
+
static_call_update(amd_pstate_init_perf, shmem_init_perf);
1890
1890
+
static_call_update(amd_pstate_update_perf, shmem_update_perf);
1891
1891
+
}
1892
1892
+
1893
1893
+
ret = amd_pstate_register_driver(cppc_state);
1894
1894
+
if (ret) {
1895
1895
+
pr_err("failed to register with return %d\n", ret);
1896
1896
+
return ret;
1882
1897
}
1883
1898
1884
1899
if (amd_pstate_prefcore) {
1885
1900
ret = amd_detect_prefcore(&amd_pstate_prefcore);
1886
1901
if (ret)
1887
1902
return ret;
1888
1888
-
}
1889
1889
-
1890
1890
-
/* enable amd pstate feature */
1891
1891
-
ret = amd_pstate_enable(true);
1892
1892
-
if (ret) {
1893
1893
-
pr_err("failed to enable driver mode(%d)\n", cppc_state);
1894
1894
-
return ret;
1895
1895
-
}
1896
1896
-
1897
1897
-
ret = cpufreq_register_driver(current_pstate_driver);
1898
1898
-
if (ret) {
1899
1899
-
pr_err("failed to register with return %d\n", ret);
1900
1900
-
goto disable_driver;
1901
1903
}
1902
1904
1903
1905
dev_root = bus_get_dev_root(&cpu_subsys);
···
1895
1935
1896
1936
global_attr_free:
1897
1937
cpufreq_unregister_driver(current_pstate_driver);
1898
1898
-
disable_driver:
1899
1899
-
amd_pstate_enable(false);
1938
1938
+
amd_pstate_cppc_enable(false);
1900
1939
return ret;
1901
1940
}
1902
1941
device_initcall(amd_pstate_init);
+1
-1
drivers/cpufreq/brcmstb-avs-cpufreq.c
reviewed
···
777
777
.of_match_table = brcm_avs_cpufreq_match,
778
778
},
779
779
.probe = brcm_avs_cpufreq_probe,
780
780
-
.remove_new = brcm_avs_cpufreq_remove,
780
780
+
.remove = brcm_avs_cpufreq_remove,
781
781
};
782
782
module_platform_driver(brcm_avs_cpufreq_platdrv);
783
783
+1
-1
drivers/cpufreq/cpufreq-dt.c
reviewed
···
345
345
.name = "cpufreq-dt",
346
346
},
347
347
.probe = dt_cpufreq_probe,
348
348
-
.remove_new = dt_cpufreq_remove,
348
348
+
.remove = dt_cpufreq_remove,
349
349
};
350
350
module_platform_driver(dt_cpufreq_platdrv);
351
351
+1
-1
drivers/cpufreq/cpufreq.c
reviewed
···
1520
1520
* frequency for longer duration. Hence, a BUG_ON().
1521
1521
*/
1522
1522
BUG_ON(ret);
1523
1523
-
pr_info("%s: CPU%d: Running at unlisted initial frequency: %u KHz, changing to: %u KHz\n",
1523
1523
+
pr_info("%s: CPU%d: Running at unlisted initial frequency: %u kHz, changing to: %u kHz\n",
1524
1524
__func__, policy->cpu, old_freq, policy->cur);
1525
1525
}
1526
1526
}
+1
-1
drivers/cpufreq/davinci-cpufreq.c
reviewed
···
145
145
.driver = {
146
146
.name = "cpufreq-davinci",
147
147
},
148
148
-
.remove_new = __exit_p(davinci_cpufreq_remove),
148
148
+
.remove = __exit_p(davinci_cpufreq_remove),
149
149
};
150
150
151
151
int __init davinci_cpufreq_init(void)
+1
-1
drivers/cpufreq/imx-cpufreq-dt.c
reviewed
···
183
183
184
184
static struct platform_driver imx_cpufreq_dt_driver = {
185
185
.probe = imx_cpufreq_dt_probe,
186
186
-
.remove_new = imx_cpufreq_dt_remove,
186
186
+
.remove = imx_cpufreq_dt_remove,
187
187
.driver = {
188
188
.name = "imx-cpufreq-dt",
189
189
},
+1
-1
drivers/cpufreq/imx6q-cpufreq.c
reviewed
···
522
522
.name = "imx6q-cpufreq",
523
523
},
524
524
.probe = imx6q_cpufreq_probe,
525
525
-
.remove_new = imx6q_cpufreq_remove,
525
525
+
.remove = imx6q_cpufreq_remove,
526
526
};
527
527
module_platform_driver(imx6q_cpufreq_platdrv);
528
528
+1
-1
drivers/cpufreq/kirkwood-cpufreq.c
reviewed
···
189
189
190
190
static struct platform_driver kirkwood_cpufreq_platform_driver = {
191
191
.probe = kirkwood_cpufreq_probe,
192
192
-
.remove_new = kirkwood_cpufreq_remove,
192
192
+
.remove = kirkwood_cpufreq_remove,
193
193
.driver = {
194
194
.name = "kirkwood-cpufreq",
195
195
},
+1
-1
drivers/cpufreq/loongson3_cpufreq.c
reviewed
···
386
386
},
387
387
.id_table = cpufreq_id_table,
388
388
.probe = loongson3_cpufreq_probe,
389
389
-
.remove_new = loongson3_cpufreq_remove,
389
389
+
.remove = loongson3_cpufreq_remove,
390
390
};
391
391
module_platform_driver(loongson3_platform_driver);
392
392
+1
-1
drivers/cpufreq/mediatek-cpufreq-hw.c
reviewed
···
344
344
345
345
static struct platform_driver mtk_cpufreq_hw_driver = {
346
346
.probe = mtk_cpufreq_hw_driver_probe,
347
347
-
.remove_new = mtk_cpufreq_hw_driver_remove,
347
347
+
.remove = mtk_cpufreq_hw_driver_remove,
348
348
.driver = {
349
349
.name = "mtk-cpufreq-hw",
350
350
.of_match_table = mtk_cpufreq_hw_match,
+1
-1
drivers/cpufreq/omap-cpufreq.c
reviewed
···
188
188
.name = "omap-cpufreq",
189
189
},
190
190
.probe = omap_cpufreq_probe,
191
191
-
.remove_new = omap_cpufreq_remove,
191
191
+
.remove = omap_cpufreq_remove,
192
192
};
193
193
module_platform_driver(omap_cpufreq_platdrv);
194
194
+1
-1
drivers/cpufreq/pcc-cpufreq.c
reviewed
···
615
615
.driver = {
616
616
.name = "pcc-cpufreq",
617
617
},
618
618
-
.remove_new = pcc_cpufreq_remove,
618
618
+
.remove = pcc_cpufreq_remove,
619
619
};
620
620
621
621
static int __init pcc_cpufreq_init(void)
+1
-1
drivers/cpufreq/qcom-cpufreq-hw.c
reviewed
···
736
736
737
737
static struct platform_driver qcom_cpufreq_hw_driver = {
738
738
.probe = qcom_cpufreq_hw_driver_probe,
739
739
-
.remove_new = qcom_cpufreq_hw_driver_remove,
739
739
+
.remove = qcom_cpufreq_hw_driver_remove,
740
740
.driver = {
741
741
.name = "qcom-cpufreq-hw",
742
742
.of_match_table = qcom_cpufreq_hw_match,
+1
-1
drivers/cpufreq/qcom-cpufreq-nvmem.c
reviewed
···
604
604
605
605
static struct platform_driver qcom_cpufreq_driver = {
606
606
.probe = qcom_cpufreq_probe,
607
607
-
.remove_new = qcom_cpufreq_remove,
607
607
+
.remove = qcom_cpufreq_remove,
608
608
.driver = {
609
609
.name = "qcom-cpufreq-nvmem",
610
610
.pm = pm_sleep_ptr(&qcom_cpufreq_pm_ops),
+1
-1
drivers/cpufreq/qoriq-cpufreq.c
reviewed
···
296
296
.name = "qoriq-cpufreq",
297
297
},
298
298
.probe = qoriq_cpufreq_probe,
299
299
-
.remove_new = qoriq_cpufreq_remove,
299
299
+
.remove = qoriq_cpufreq_remove,
300
300
};
301
301
module_platform_driver(qoriq_cpufreq_platform_driver);
302
302
+1
-1
drivers/cpufreq/raspberrypi-cpufreq.c
reviewed
···
85
85
.name = "raspberrypi-cpufreq",
86
86
},
87
87
.probe = raspberrypi_cpufreq_probe,
88
88
-
.remove_new = raspberrypi_cpufreq_remove,
88
88
+
.remove = raspberrypi_cpufreq_remove,
89
89
};
90
90
module_platform_driver(raspberrypi_cpufreq_driver);
91
91
+1
-1
drivers/cpufreq/scpi-cpufreq.c
reviewed
···
217
217
.name = "scpi-cpufreq",
218
218
},
219
219
.probe = scpi_cpufreq_probe,
220
220
-
.remove_new = scpi_cpufreq_remove,
220
220
+
.remove = scpi_cpufreq_remove,
221
221
};
222
222
module_platform_driver(scpi_cpufreq_platdrv);
223
223
+1
-1
drivers/cpufreq/sun50i-cpufreq-nvmem.c
reviewed
···
283
283
284
284
static struct platform_driver sun50i_cpufreq_driver = {
285
285
.probe = sun50i_cpufreq_nvmem_probe,
286
286
-
.remove_new = sun50i_cpufreq_nvmem_remove,
286
286
+
.remove = sun50i_cpufreq_nvmem_remove,
287
287
.driver = {
288
288
.name = "sun50i-cpufreq-nvmem",
289
289
},
+1
-1
drivers/cpufreq/tegra186-cpufreq.c
reviewed
···
276
276
.of_match_table = tegra186_cpufreq_of_match,
277
277
},
278
278
.probe = tegra186_cpufreq_probe,
279
279
-
.remove_new = tegra186_cpufreq_remove,
279
279
+
.remove = tegra186_cpufreq_remove,
280
280
};
281
281
module_platform_driver(tegra186_cpufreq_platform_driver);
282
282
+1
-1
drivers/cpufreq/tegra194-cpufreq.c
reviewed
···
818
818
.of_match_table = tegra194_cpufreq_of_match,
819
819
},
820
820
.probe = tegra194_cpufreq_probe,
821
821
-
.remove_new = tegra194_cpufreq_remove,
821
821
+
.remove = tegra194_cpufreq_remove,
822
822
};
823
823
module_platform_driver(tegra194_ccplex_driver);
824
824
+1
-1
drivers/cpufreq/vexpress-spc-cpufreq.c
reviewed
···
565
565
.name = "vexpress-spc-cpufreq",
566
566
},
567
567
.probe = ve_spc_cpufreq_probe,
568
568
-
.remove_new = ve_spc_cpufreq_remove,
568
568
+
.remove = ve_spc_cpufreq_remove,
569
569
};
570
570
module_platform_driver(ve_spc_cpufreq_platdrv);
571
571