Core-for-CI:ICL_only Disable ACPI idle driver
diff mbox series

Message ID 1554726136-21500-1-git-send-email-anshuman.gupta@intel.com
State New
Headers show
Series
  • Core-for-CI:ICL_only Disable ACPI idle driver
Related show

Commit Message

Anshuman Gupta April 8, 2019, 12:22 p.m. UTC
There were system hung observed while running i915_pm_rpm test.
FDO https://bugs.freedesktop.org/show_bug.cgi?id=108840
Root cause is believed to due to page fault in ACPI idle (FDO comment 18)
driver, it has been suggested by Daniel to disable ACPI idle
driver for CI system, this patch only meant for ICL.

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

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

Comments

Saarinen, Jani April 8, 2019, 1:08 p.m. UTC | #1
+ Rafael, Mika. 

> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of
> Anshuman Gupta
> Sent: maanantai 8. huhtikuuta 2019 15.22
> To: intel-gfx@lists.freedesktop.org
> Cc: Peres, Martin <martin.peres@intel.com>; Vetter, Daniel
> <daniel.vetter@intel.com>
> Subject: [Intel-gfx] [PATCH] Core-for-CI:ICL_only Disable ACPI idle driver
> 
> There were system hung observed while running i915_pm_rpm test.
> FDO https://bugs.freedesktop.org/show_bug.cgi?id=108840
> Root cause is believed to due to page fault in ACPI idle (FDO comment 18) driver, it
> has been suggested by Daniel to disable ACPI idle driver for CI system, this patch only
> meant for ICL.
> 
> Cc: martin.peres@intel.com
> Cc: daniel.vetter@intel.com
> 
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>  drivers/acpi/processor_driver.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index
> 9d6aff2..6e3ef2d 100644
> --- a/drivers/acpi/processor_driver.c
> +++ b/drivers/acpi/processor_driver.c
> @@ -35,6 +35,9 @@
> 
>  #include <acpi/processor.h>
> 
> +#include <asm/cpu_device_id.h>
> +#include <asm/intel-family.h>
> +
>  #include "internal.h"
> 
>  #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80 @@ -58,6 +61,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_pmc_core_ids);
> +
>  static struct device_driver acpi_processor_driver = {
>  	.name = "processor",
>  	.bus = &cpu_subsys,
> @@ -226,6 +236,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 +250,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);
> --
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
kernel test robot April 9, 2019, 1:33 a.m. UTC | #2
Hi Anshuman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v5.1-rc4 next-20190408]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Anshuman-Gupta/Core-for-CI-ICL_only-Disable-ACPI-idle-driver/20190409-081735
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-x006-201914 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   In file included from drivers//acpi/processor_driver.c:28:0:
>> drivers//acpi/processor_driver.c:69:29: error: 'intel_pmc_core_ids' undeclared here (not in a function); did you mean 'intel_cpu_ids'?
    MODULE_DEVICE_TABLE(x86cpu, intel_pmc_core_ids);
                                ^
   include/linux/module.h:229:15: note: in definition of macro 'MODULE_DEVICE_TABLE'
    extern typeof(name) __mod_##type##__##name##_device_table  \
                  ^~~~
>> include/linux/module.h:229:21: error: '__mod_x86cpu__intel_pmc_core_ids_device_table' aliased to undefined symbol 'intel_pmc_core_ids'
    extern typeof(name) __mod_##type##__##name##_device_table  \
                        ^
>> drivers//acpi/processor_driver.c:69:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
    MODULE_DEVICE_TABLE(x86cpu, intel_pmc_core_ids);
    ^~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/acpi/processor_driver.c:28:0:
   drivers/acpi/processor_driver.c:69:29: error: 'intel_pmc_core_ids' undeclared here (not in a function); did you mean 'intel_cpu_ids'?
    MODULE_DEVICE_TABLE(x86cpu, intel_pmc_core_ids);
                                ^
   include/linux/module.h:229:15: note: in definition of macro 'MODULE_DEVICE_TABLE'
    extern typeof(name) __mod_##type##__##name##_device_table  \
                  ^~~~
>> include/linux/module.h:229:21: error: '__mod_x86cpu__intel_pmc_core_ids_device_table' aliased to undefined symbol 'intel_pmc_core_ids'
    extern typeof(name) __mod_##type##__##name##_device_table  \
                        ^
   drivers/acpi/processor_driver.c:69:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
    MODULE_DEVICE_TABLE(x86cpu, intel_pmc_core_ids);
    ^~~~~~~~~~~~~~~~~~~

vim +69 drivers//acpi/processor_driver.c

  > 28	#include <linux/module.h>
    29	#include <linux/init.h>
    30	#include <linux/cpufreq.h>
    31	#include <linux/cpu.h>
    32	#include <linux/cpuidle.h>
    33	#include <linux/slab.h>
    34	#include <linux/acpi.h>
    35	
    36	#include <acpi/processor.h>
    37	
    38	#include <asm/cpu_device_id.h>
    39	#include <asm/intel-family.h>
    40	
    41	#include "internal.h"
    42	
    43	#define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
    44	#define ACPI_PROCESSOR_NOTIFY_POWER	0x81
    45	#define ACPI_PROCESSOR_NOTIFY_THROTTLING	0x82
    46	
    47	#define _COMPONENT		ACPI_PROCESSOR_COMPONENT
    48	ACPI_MODULE_NAME("processor_driver");
    49	
    50	MODULE_AUTHOR("Paul Diefenbaugh");
    51	MODULE_DESCRIPTION("ACPI Processor Driver");
    52	MODULE_LICENSE("GPL");
    53	
    54	static int acpi_processor_start(struct device *dev);
    55	static int acpi_processor_stop(struct device *dev);
    56	
    57	static const struct acpi_device_id processor_device_ids[] = {
    58		{ACPI_PROCESSOR_OBJECT_HID, 0},
    59		{ACPI_PROCESSOR_DEVICE_HID, 0},
    60		{"", 0},
    61	};
    62	MODULE_DEVICE_TABLE(acpi, processor_device_ids);
    63	
    64	#define ICPU(model)	{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
    65	static const struct x86_cpu_id intel_cpu_ids[] = {
    66		ICPU(INTEL_FAM6_ICELAKE_MOBILE),	/* ICL */
    67		{}
    68	};
  > 69	MODULE_DEVICE_TABLE(x86cpu, intel_pmc_core_ids);
    70	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot April 9, 2019, 4:26 a.m. UTC | #3
Hi Anshuman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v5.1-rc4 next-20190408]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Anshuman-Gupta/Core-for-CI-ICL_only-Disable-ACPI-idle-driver/20190409-081735
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

>> drivers//acpi/processor_driver.c:38:10: fatal error: asm/cpu_device_id.h: No such file or directory
    #include <asm/cpu_device_id.h>
             ^~~~~~~~~~~~~~~~~~~~~
   compilation terminated.

vim +38 drivers//acpi/processor_driver.c

    37	
  > 38	#include <asm/cpu_device_id.h>
    39	#include <asm/intel-family.h>
    40	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Patch
diff mbox series

diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 9d6aff2..6e3ef2d 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -35,6 +35,9 @@ 
 
 #include <acpi/processor.h>
 
+#include <asm/cpu_device_id.h>
+#include <asm/intel-family.h>
+
 #include "internal.h"
 
 #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80
@@ -58,6 +61,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_pmc_core_ids);
+
 static struct device_driver acpi_processor_driver = {
 	.name = "processor",
 	.bus = &cpu_subsys,
@@ -226,6 +236,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 +250,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);