diff mbox series

[v2] Core-for-CI:ICL_only Disable ACPI idle driver

Message ID 1554791361-27684-1-git-send-email-anshuman.gupta@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2] Core-for-CI:ICL_only Disable ACPI idle driver | expand

Commit Message

Gupta, Anshuman April 9, 2019, 6:29 a.m. UTC
There were few system hung observed while running i915_pm_rpm igt test.
FDO https://bugs.freedesktop.org/show_bug.cgi?id=108840
Root cause is believed to due to page fault in ACPI idle driver.
(FDO comment 18).
It has been suggested by Daniel Vetter to disable ACPI idle
driver for Core-for-CI, only for ICL.

This hacky patch is only for ICL processor and for Core-for-CI branch.

v2: Fixed compilation errors raised by lkp.
    commit message improvement.

Cc: martin.peres@intel.com
Cc: daniel.vetter@intel.com

Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 drivers/acpi/processor_driver.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

Comments

Wysocki, Rafael J April 9, 2019, 3:49 p.m. UTC | #1
On 4/9/2019 8:29 AM, Anshuman Gupta wrote:
> There were few system hung observed while running i915_pm_rpm igt test.
> FDO https://bugs.freedesktop.org/show_bug.cgi?id=108840
> Root cause is believed to due to page fault in ACPI idle driver.
> (FDO comment 18).
> It has been suggested by Daniel Vetter to disable ACPI idle
> driver for Core-for-CI, only for ICL.
>
> This hacky patch is only for ICL processor and for Core-for-CI branch.
>
> v2: Fixed compilation errors raised by lkp.
>      commit message improvement.
>
> Cc: martin.peres@intel.com
> Cc: daniel.vetter@intel.com
>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>

This is fine only as long as it doesn't anywhere close to the mainline.

If ACPI idle crashes on new Intel HW, it needs to be fixed to work with 
it instead of refusing to work on it.

> ---
>   drivers/acpi/processor_driver.c | 18 +++++++++++++++++-
>   1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
> index 9d6aff2..ee842a2f 100644
> --- a/drivers/acpi/processor_driver.c
> +++ b/drivers/acpi/processor_driver.c
> @@ -35,6 +35,12 @@
>   
>   #include <acpi/processor.h>
>   
> +/* Only for Core-for-CI so don't want ia64 to fail compilation.*/
> +#ifdef CONFIG_X86
> +#include <asm/cpu_device_id.h>
> +#include <asm/intel-family.h>
> +#endif
> +
>   #include "internal.h"
>   
>   #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
> @@ -58,6 +64,13 @@ static const struct acpi_device_id processor_device_ids[] = {
>   };
>   MODULE_DEVICE_TABLE(acpi, processor_device_ids);
>   
> +#define ICPU(model)	{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
> +static const struct x86_cpu_id intel_cpu_ids[] = {
> +	ICPU(INTEL_FAM6_ICELAKE_MOBILE),	/* ICL */
> +	{}
> +};
> +MODULE_DEVICE_TABLE(x86cpu, intel_cpu_ids);
> +
>   static struct device_driver acpi_processor_driver = {
>   	.name = "processor",
>   	.bus = &cpu_subsys,
> @@ -226,6 +239,7 @@ static inline void acpi_pss_perf_exit(struct acpi_processor *pr,
>   static int __acpi_processor_start(struct acpi_device *device)
>   {
>   	struct acpi_processor *pr = acpi_driver_data(device);
> +	const struct x86_cpu_id *id;
>   	acpi_status status;
>   	int result = 0;
>   
> @@ -239,7 +253,9 @@ static int __acpi_processor_start(struct acpi_device *device)
>   	if (result && !IS_ENABLED(CONFIG_ACPI_CPU_FREQ_PSS))
>   		dev_dbg(&device->dev, "CPPC data invalid or not present\n");
>   
> -	if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver)
> +	id = x86_match_cpu(intel_cpu_ids);
> +	if (!id && (!cpuidle_get_driver() || cpuidle_get_driver() ==
> +		&acpi_idle_driver))
>   		acpi_processor_power_init(pr);
>   
>   	result = acpi_pss_perf_init(pr, device);
Peres, Martin April 10, 2019, 8:50 a.m. UTC | #2
On 09/04/2019 18:49, Wysocki, Rafael J wrote:
> On 4/9/2019 8:29 AM, Anshuman Gupta wrote:
>> There were few system hung observed while running i915_pm_rpm igt test.
>> FDO https://bugs.freedesktop.org/show_bug.cgi?id=108840
>> Root cause is believed to due to page fault in ACPI idle driver.
>> (FDO comment 18).
>> It has been suggested by Daniel Vetter to disable ACPI idle
>> driver for Core-for-CI, only for ICL.
>>
>> This hacky patch is only for ICL processor and for Core-for-CI branch.
>>
>> v2: Fixed compilation errors raised by lkp.
>>      commit message improvement.
>>
>> Cc: martin.peres@intel.com
>> Cc: daniel.vetter@intel.com
>>
>> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> 
> This is fine only as long as it doesn't anywhere close to the mainline.
> 
> If ACPI idle crashes on new Intel HW, it needs to be fixed to work with 
> it instead of refusing to work on it.\

Yes, this is the point of topic/core-for-ci:
https://cgit.freedesktop.org/drm/drm-intel/log/?h=topic/core-for-CI

I'll need to unblock the execution of the shards by filing a bug for the
issue caught by BAT, and when we get a green FULL results, we'll be good
to merge.

Martin

> 
>> ---
>>   drivers/acpi/processor_driver.c | 18 +++++++++++++++++-
>>   1 file changed, 17 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
>> index 9d6aff2..ee842a2f 100644
>> --- a/drivers/acpi/processor_driver.c
>> +++ b/drivers/acpi/processor_driver.c
>> @@ -35,6 +35,12 @@
>>   
>>   #include <acpi/processor.h>
>>   
>> +/* Only for Core-for-CI so don't want ia64 to fail compilation.*/
>> +#ifdef CONFIG_X86
>> +#include <asm/cpu_device_id.h>
>> +#include <asm/intel-family.h>
>> +#endif
>> +
>>   #include "internal.h"
>>   
>>   #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
>> @@ -58,6 +64,13 @@ static const struct acpi_device_id processor_device_ids[] = {
>>   };
>>   MODULE_DEVICE_TABLE(acpi, processor_device_ids);
>>   
>> +#define ICPU(model)	{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
>> +static const struct x86_cpu_id intel_cpu_ids[] = {
>> +	ICPU(INTEL_FAM6_ICELAKE_MOBILE),	/* ICL */
>> +	{}
>> +};
>> +MODULE_DEVICE_TABLE(x86cpu, intel_cpu_ids);
>> +
>>   static struct device_driver acpi_processor_driver = {
>>   	.name = "processor",
>>   	.bus = &cpu_subsys,
>> @@ -226,6 +239,7 @@ static inline void acpi_pss_perf_exit(struct acpi_processor *pr,
>>   static int __acpi_processor_start(struct acpi_device *device)
>>   {
>>   	struct acpi_processor *pr = acpi_driver_data(device);
>> +	const struct x86_cpu_id *id;
>>   	acpi_status status;
>>   	int result = 0;
>>   
>> @@ -239,7 +253,9 @@ static int __acpi_processor_start(struct acpi_device *device)
>>   	if (result && !IS_ENABLED(CONFIG_ACPI_CPU_FREQ_PSS))
>>   		dev_dbg(&device->dev, "CPPC data invalid or not present\n");
>>   
>> -	if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver)
>> +	id = x86_match_cpu(intel_cpu_ids);
>> +	if (!id && (!cpuidle_get_driver() || cpuidle_get_driver() ==
>> +		&acpi_idle_driver))
>>   		acpi_processor_power_init(pr);
>>   
>>   	result = acpi_pss_perf_init(pr, device);
> 
> 
> 

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
diff mbox series

Patch

diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 9d6aff2..ee842a2f 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -35,6 +35,12 @@ 
 
 #include <acpi/processor.h>
 
+/* Only for Core-for-CI so don't want ia64 to fail compilation.*/
+#ifdef CONFIG_X86
+#include <asm/cpu_device_id.h>
+#include <asm/intel-family.h>
+#endif
+
 #include "internal.h"
 
 #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
@@ -58,6 +64,13 @@  static const struct acpi_device_id processor_device_ids[] = {
 };
 MODULE_DEVICE_TABLE(acpi, processor_device_ids);
 
+#define ICPU(model)	{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
+static const struct x86_cpu_id intel_cpu_ids[] = {
+	ICPU(INTEL_FAM6_ICELAKE_MOBILE),	/* ICL */
+	{}
+};
+MODULE_DEVICE_TABLE(x86cpu, intel_cpu_ids);
+
 static struct device_driver acpi_processor_driver = {
 	.name = "processor",
 	.bus = &cpu_subsys,
@@ -226,6 +239,7 @@  static inline void acpi_pss_perf_exit(struct acpi_processor *pr,
 static int __acpi_processor_start(struct acpi_device *device)
 {
 	struct acpi_processor *pr = acpi_driver_data(device);
+	const struct x86_cpu_id *id;
 	acpi_status status;
 	int result = 0;
 
@@ -239,7 +253,9 @@  static int __acpi_processor_start(struct acpi_device *device)
 	if (result && !IS_ENABLED(CONFIG_ACPI_CPU_FREQ_PSS))
 		dev_dbg(&device->dev, "CPPC data invalid or not present\n");
 
-	if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver)
+	id = x86_match_cpu(intel_cpu_ids);
+	if (!id && (!cpuidle_get_driver() || cpuidle_get_driver() ==
+		&acpi_idle_driver))
 		acpi_processor_power_init(pr);
 
 	result = acpi_pss_perf_init(pr, device);