Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753960AbbG3TTz (ORCPT ); Thu, 30 Jul 2015 15:19:55 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47188 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753250AbbG3TTx (ORCPT ); Thu, 30 Jul 2015 15:19:53 -0400 Date: Thu, 30 Jul 2015 12:19:23 -0700 From: tip-bot for Jiang Liu Message-ID: Cc: matt@codeblueprint.co.uk, hpa@zytor.com, yinghai@kernel.org, tony.luck@intel.com, mingo@kernel.org, jiang.liu@linux.intel.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, yu.c.chen@intel.com Reply-To: tony.luck@intel.com, mingo@kernel.org, jiang.liu@linux.intel.com, yu.c.chen@intel.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, matt@codeblueprint.co.uk, hpa@zytor.com, yinghai@kernel.org In-Reply-To: <1438242695-23531-1-git-send-email-jiang.liu@linux.intel.com> References: <1438242695-23531-1-git-send-email-jiang.liu@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/irq: Use the caller provided polarity setting in mp_check_pin_attr() Git-Commit-ID: 646c4b75494747887f936513b669bb8a2d794459 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2536 Lines: 56 Commit-ID: 646c4b75494747887f936513b669bb8a2d794459 Gitweb: http://git.kernel.org/tip/646c4b75494747887f936513b669bb8a2d794459 Author: Jiang Liu AuthorDate: Thu, 30 Jul 2015 15:51:32 +0800 Committer: Thomas Gleixner CommitDate: Thu, 30 Jul 2015 21:15:29 +0200 x86/irq: Use the caller provided polarity setting in mp_check_pin_attr() Commit d32932d02e18 ("x86/irq: Convert IOAPIC to use hierarchical irqdomain interfaces") introduced a regression which causes malfunction of interrupt lines. The reason is that the conversion of mp_check_pin_attr() missed to update the polarity selection of the interrupt pin with the caller provided setting and instead uses a stale attribute value. That in turn results in chosing the wrong interrupt flow handler. Use the caller supplied setting to configure the pin correctly which also choses the correct interrupt flow handler. This restores the original behaviour and on the affected machine/driver (Surface Pro 3, i2c controller) all IOAPIC IRQ configuration are identical to v4.1. Fixes: d32932d02e18 ("x86/irq: Convert IOAPIC to use hierarchical irqdomain interfaces") Reported-and-tested-by: Matt Fleming Reported-and-tested-by: Chen Yu Signed-off-by: Jiang Liu Cc: Tony Luck Cc: Chen Yu Cc: Yinghai Lu Link: http://lkml.kernel.org/r/1438242695-23531-1-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner --- arch/x86/kernel/apic/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 845dc0d..206052e 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -943,7 +943,7 @@ static bool mp_check_pin_attr(int irq, struct irq_alloc_info *info) */ if (irq < nr_legacy_irqs() && data->count == 1) { if (info->ioapic_trigger != data->trigger) - mp_register_handler(irq, data->trigger); + mp_register_handler(irq, info->ioapic_trigger); data->entry.trigger = data->trigger = info->ioapic_trigger; data->entry.polarity = data->polarity = info->ioapic_polarity; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/