Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752421AbaLSNoS (ORCPT ); Fri, 19 Dec 2014 08:44:18 -0500 Received: from mga02.intel.com ([134.134.136.20]:41276 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751370AbaLSNoR (ORCPT ); Fri, 19 Dec 2014 08:44:17 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,606,1413270000"; d="scan'208";a="657097477" Message-ID: <54942B9A.6090608@linux.intel.com> Date: Fri, 19 Dec 2014 21:43:54 +0800 From: Jiang Liu Organization: Intel User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Sander Eikelenboom , konrad.wilk@oracle.com, David Vrabel , Boris Ostrovsky CC: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Subject: Re: Bisected Linux regression: ACPI powerbutton events don't work under Xen since commit b81975eade8c6495f3c4d6746d22bdc95f617777 References: <1824124380.20141219141645@eikelenboom.it> In-Reply-To: <1824124380.20141219141645@eikelenboom.it> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sander, Found the root cause now, but still need some time to find a solution for this issue. xen_smp_prepare_cpus() doesn't call: smpboot_setup_io_apic()->setup_IO_APIC() So no irqdomain structure for IOAPIC created, then mp_map_pin_to_irq() fails at the very beginning. The most simple solution is to revert following change, but it doesn't seem the best solution. I will try to find a hook point to create irqdomain for IOAPIC from xen_smp_prepare_cpus(). Regards! Gerry @@ -1034,13 +1035,8 @@ static int mp_map_pin_to_irq(u32 gsi, int idx, int ioapic, int pin, struct irq_domain *domain = mp_ioapic_irqdomain(ioapic); struct mp_pin_info *info = mp_pin_info(ioapic, pin); - if (!domain) { - /* - * Provide an identity mapping of gsi == irq except on truly - * weird platforms that have non isa irqs in the first 16 gsis. - */ - return gsi >= nr_legacy_irqs() ? gsi : gsi_top + gsi; - } + if (!domain) + return -1; mutex_lock(&ioapic_mutex); On 2014/12/19 21:16, Sander Eikelenboom wrote: > Hi, > > When running under Xen, ACPI powerbutton events don't work anymore, > there is no reaction when pressing the powerbutton. > > On baremetal everything works fine, acpid gets the event and the > machine powers down perfectly. The machine is an Intel NUC. > > Bisection has lead to: > > b81975eade8c6495f3c4d6746d22bdc95f617777 is the first bad commit > commit b81975eade8c6495f3c4d6746d22bdc95f617777 > Author: Jiang Liu > Date: Mon Jun 9 16:20:11 2014 +0800 > > x86, irq: Clean up irqdomain transition code > > Now we have completely switched to irqdomain, so clean up transition code > in IOAPIC drivers. > > Signed-off-by: Jiang Liu > Cc: Konrad Rzeszutek Wilk > Cc: Tony Luck > Cc: Joerg Roedel > Cc: Paul Gortmaker > Cc: Greg Kroah-Hartman > Cc: Benjamin Herrenschmidt > Cc: Grant Likely > Cc: Rafael J. Wysocki > Cc: Bjorn Helgaas > Cc: Randy Dunlap > Cc: Yinghai Lu > Link: http://lkml.kernel.org/r/1402302011-23642-43-git-send-email-jiang.liu@linux.intel.com > Signed-off-by: Thomas Gleixner > > Reverting this specific commit on linux-tip (3.19-mw) gets things working again under Xen. > Kernel .config is attached. > > -- > Sander > -- 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/