From patchwork Sat Oct 24 17:02:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Yu X-Patchwork-Id: 7480861 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D6E66BEEA4 for ; Sat, 24 Oct 2015 17:00:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E06B62047C for ; Sat, 24 Oct 2015 17:00:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F414B20495 for ; Sat, 24 Oct 2015 17:00:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752652AbbJXRAA (ORCPT ); Sat, 24 Oct 2015 13:00:00 -0400 Received: from mga01.intel.com ([192.55.52.88]:14970 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752621AbbJXQ75 (ORCPT ); Sat, 24 Oct 2015 12:59:57 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 24 Oct 2015 09:59:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,193,1444719600"; d="scan'208";a="834621023" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.239.160.87]) by fmsmga002.fm.intel.com with ESMTP; 24 Oct 2015 09:59:55 -0700 From: Chen Yu To: rjw@rjwysocki.net, lenb@kernel.org Cc: rui.zhang@intel.com, lv.zheng@intel.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Chen Yu , Subject: [PATCH 2/3][v2] ACPI: Using correct irq when waiting for events Date: Sun, 25 Oct 2015 01:02:36 +0800 Message-Id: <1445706156-20203-1-git-send-email-yu.c.chen@intel.com> X-Mailer: git-send-email 1.8.4.2 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When system is waiting for GPE/fixed event handler to finish, it uses the acpi_gbl_FADT.sci_interrupt directly. However, we should use mapped irq returned by acpi_gsi_to_irq for synchronize_hardirq. Cc: # 3.19+ Acked-by: Lv Zheng Signed-off-by: Chen Yu --- drivers/acpi/osl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 64df9d4..45243a7 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1184,8 +1184,8 @@ void acpi_os_wait_events_complete(void) * Make sure the GPE handler or the fixed event handler is not used * on another CPU after removal. */ - if (acpi_irq_handler) - synchronize_hardirq(acpi_gbl_FADT.sci_interrupt); + if (acpi_sci_irq_valid()) + synchronize_hardirq(acpi_sci_irq); flush_workqueue(kacpid_wq); flush_workqueue(kacpi_notify_wq); }