From patchwork Tue Feb 6 18:02:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 10203725 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A9A7260327 for ; Tue, 6 Feb 2018 18:04:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B9FF28CE0 for ; Tue, 6 Feb 2018 18:04:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7011228CE2; Tue, 6 Feb 2018 18:04:43 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16B3F28CE0 for ; Tue, 6 Feb 2018 18:04:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752582AbeBFSEl convert rfc822-to-8bit (ORCPT ); Tue, 6 Feb 2018 13:04:41 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:47560 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752481AbeBFSEl (ORCPT ); Tue, 6 Feb 2018 13:04:41 -0500 Received: from 79.184.255.223.ipv4.supernova.orange.pl (79.184.255.223) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id 49a153fd4cdcb12c; Tue, 6 Feb 2018 19:04:39 +0100 From: "Rafael J. Wysocki" To: Linux PM Cc: Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= , Linux Kernel Mailing List , "Rafael J . Wysocki" , x86 , Jiri Koshina , LKML Subject: [PATCH] x86: PM: Make APM idle driver initialize polling state Date: Tue, 06 Feb 2018 19:02:58 +0100 Message-ID: <1862424.1bTBpgPzTf@aspire.rjw.lan> In-Reply-To: <20180206163134.GO5453@intel.com> References: <20180122162747.19103-1-ville.syrjala@linux.intel.com> <36158666.hf5grRdGNf@aspire.rjw.lan> <20180206163134.GO5453@intel.com> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafael J. Wysocki Update the APM driver overlooked by commit 1b39e3f813b4 (cpuidle: Make drivers initialize polling state) to initialize the polling state like the other cpuidle drivers modified by that commit to prevent cpuidle from crashing. Fixes: 1b39e3f813b4 (cpuidle: Make drivers initialize polling state) Reported-by: Ville Syrjälä Tested-by: Ville Syrjälä Signed-off-by: Rafael J. Wysocki --- arch/x86/kernel/apm_32.c | 1 + 1 file changed, 1 insertion(+) Index: linux-pm/arch/x86/kernel/apm_32.c =================================================================== --- linux-pm.orig/arch/x86/kernel/apm_32.c +++ linux-pm/arch/x86/kernel/apm_32.c @@ -2389,6 +2389,7 @@ static int __init apm_init(void) if (HZ != 100) idle_period = (idle_period * HZ) / 100; if (idle_threshold < 100) { + cpuidle_poll_state_init(&apm_idle_driver); if (!cpuidle_register_driver(&apm_idle_driver)) if (cpuidle_register_device(&apm_cpuidle_device)) cpuidle_unregister_driver(&apm_idle_driver);