Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm-5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
"Fix the throttle IRQ handling during cpufreq initialization on
Qualcomm platforms (Bjorn Andersson)"

* tag 'pm-5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: qcom-hw: Delay enabling throttle_irq
cpufreq: Reintroduce ready() callback

+22 -1
+3
Documentation/cpu-freq/cpu-drivers.rst
··· 75 75 .resume - A pointer to a per-policy resume function which is called 76 76 with interrupts disabled and _before_ the governor is started again. 77 77 78 + .ready - A pointer to a per-policy ready function which is called after 79 + the policy is fully initialized. 80 + 78 81 .attr - A pointer to a NULL-terminated list of "struct freq_attr" which 79 82 allow to export values to sysfs. 80 83
+2
Documentation/translations/zh_CN/cpu-freq/cpu-drivers.rst
··· 84 84 .resume - 一个指向per-policy恢复函数的指针,该函数在关中断且在调节器再一次启动前被 85 85 调用。 86 86 87 + .ready - 一个指向per-policy准备函数的指针,该函数在策略完全初始化之后被调用。 88 + 87 89 .attr - 一个指向NULL结尾的"struct freq_attr"列表的指针,该列表允许导出值到 88 90 sysfs。 89 91
+4
drivers/cpufreq/cpufreq.c
··· 1518 1518 1519 1519 kobject_uevent(&policy->kobj, KOBJ_ADD); 1520 1520 1521 + /* Callback for handling stuff after policy is ready */ 1522 + if (cpufreq_driver->ready) 1523 + cpufreq_driver->ready(policy); 1524 + 1521 1525 if (cpufreq_thermal_control_enabled(cpufreq_driver)) 1522 1526 policy->cdev = of_cpufreq_cooling_register(policy); 1523 1527
+10 -1
drivers/cpufreq/qcom-cpufreq-hw.c
··· 388 388 389 389 snprintf(data->irq_name, sizeof(data->irq_name), "dcvsh-irq-%u", policy->cpu); 390 390 ret = request_threaded_irq(data->throttle_irq, NULL, qcom_lmh_dcvs_handle_irq, 391 - IRQF_ONESHOT, data->irq_name, data); 391 + IRQF_ONESHOT | IRQF_NO_AUTOEN, data->irq_name, data); 392 392 if (ret) { 393 393 dev_err(&pdev->dev, "Error registering %s: %d\n", data->irq_name, ret); 394 394 return 0; ··· 542 542 return 0; 543 543 } 544 544 545 + static void qcom_cpufreq_ready(struct cpufreq_policy *policy) 546 + { 547 + struct qcom_cpufreq_data *data = policy->driver_data; 548 + 549 + if (data->throttle_irq >= 0) 550 + enable_irq(data->throttle_irq); 551 + } 552 + 545 553 static struct freq_attr *qcom_cpufreq_hw_attr[] = { 546 554 &cpufreq_freq_attr_scaling_available_freqs, 547 555 &cpufreq_freq_attr_scaling_boost_freqs, ··· 569 561 .fast_switch = qcom_cpufreq_hw_fast_switch, 570 562 .name = "qcom-cpufreq-hw", 571 563 .attr = qcom_cpufreq_hw_attr, 564 + .ready = qcom_cpufreq_ready, 572 565 }; 573 566 574 567 static int qcom_cpufreq_hw_driver_probe(struct platform_device *pdev)
+3
include/linux/cpufreq.h
··· 382 382 int (*suspend)(struct cpufreq_policy *policy); 383 383 int (*resume)(struct cpufreq_policy *policy); 384 384 385 + /* Will be called after the driver is fully initialized */ 386 + void (*ready)(struct cpufreq_policy *policy); 387 + 385 388 struct freq_attr **attr; 386 389 387 390 /* platform specific boost support code */