From patchwork Tue Apr 9 06:29:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gupta, Anshuman" X-Patchwork-Id: 10890571 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 557321708 for ; Tue, 9 Apr 2019 06:33:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E06126E69 for ; Tue, 9 Apr 2019 06:33:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 326542888B; Tue, 9 Apr 2019 06:33:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 34A1428895 for ; Tue, 9 Apr 2019 06:33:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F0EA38915A; Tue, 9 Apr 2019 06:33:30 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id CB3028915A for ; Tue, 9 Apr 2019 06:33:29 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2019 23:33:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,328,1549958400"; d="scan'208";a="129774198" Received: from genxfsim-desktop.iind.intel.com ([10.223.34.158]) by orsmga007.jf.intel.com with ESMTP; 08 Apr 2019 23:33:27 -0700 From: Anshuman Gupta To: intel-gfx@lists.freedesktop.org Date: Tue, 9 Apr 2019 11:59:21 +0530 Message-Id: <1554791361-27684-1-git-send-email-anshuman.gupta@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554726136-21500-1-git-send-email-anshuman.gupta@intel.com> References: <1554726136-21500-1-git-send-email-anshuman.gupta@intel.com> Subject: [Intel-gfx] [PATCH v2] Core-for-CI:ICL_only Disable ACPI idle driver X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mika.westerberg@intel.com, rafael.j.wysocki@intel.com, martin.peres@intel.com, daniel.vetter@intel.com MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 +/* Only for Core-for-CI so don't want ia64 to fail compilation.*/ +#ifdef CONFIG_X86 +#include +#include +#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);