From patchwork Tue Apr 7 14:34:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 6171911 Return-Path: X-Original-To: patchwork-linux-pm@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 7293DBF4A6 for ; Tue, 7 Apr 2015 14:31:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 965D0202C8 for ; Tue, 7 Apr 2015 14:31:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA30720295 for ; Tue, 7 Apr 2015 14:31:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756166AbbDGObl (ORCPT ); Tue, 7 Apr 2015 10:31:41 -0400 Received: from mga14.intel.com ([192.55.52.115]:33979 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753569AbbDGObk (ORCPT ); Tue, 7 Apr 2015 10:31:40 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 07 Apr 2015 07:31:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,538,1422950400"; d="scan'208";a="704693678" Received: from gerry-dev.bj.intel.com ([10.238.158.72]) by fmsmga002.fm.intel.com with ESMTP; 07 Apr 2015 07:31:38 -0700 From: Jiang Liu To: jim876@xs4all.nl, "Rafael J. Wysocki" , Len Brown , Pavel Machek , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org Cc: Linux Kernel Mailing List , Jiang Liu , linux-pm@vger.kernel.org Subject: [PATCH] x86/ACPI: Fix regression caused by 16ee7b3dcc56 Date: Tue, 7 Apr 2015 22:34:03 +0800 Message-Id: <1428417244-32416-1-git-send-email-jiang.liu@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <55214A0D.9000404@xs4all.nl> References: <55214A0D.9000404@xs4all.nl> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Hi Jim, Could you please help to test this patch against v4.0-rc6? Thanks! Gerry Signed-off-by: Jiang Liu --- arch/x86/kernel/acpi/boot.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 803b684676ff..f7f1fe7cd1b0 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -403,10 +403,14 @@ static int mp_config_acpi_gsi(struct device *dev, u32 gsi, int trigger, static int mp_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity) { - int irq, node; + int i, irq, node; - if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC) - return gsi; + if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC) { + for (i = 0; i < nr_legacy_irqs(); i++) + if (isa_irq_to_gsi[i] == gsi) + return i; + return -1; + } trigger = trigger == ACPI_EDGE_SENSITIVE ? 0 : 1; polarity = polarity == ACPI_ACTIVE_HIGH ? 0 : 1;