From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753225AbbFUOh4 (ORCPT ); Sun, 21 Jun 2015 10:37:56 -0400 Received: from www.linutronix.de ([62.245.132.108]:34140 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751911AbbFUOht (ORCPT ); Sun, 21 Jun 2015 10:37:49 -0400 Date: Sun, 21 Jun 2015 16:37:46 +0200 (CEST) From: Thomas Gleixner To: Sergey Senozhatsky cc: Jiang Liu , Borislav Petkov , linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: [-next] !irqd_can_balance() WARNINGs at irq_move_masked_irq() In-Reply-To: <20150621041554.GA523@swordfish> Message-ID: References: <20150619071123.GA511@swordfish> <20150620043110.GA365@swordfish> <20150620075727.GC365@swordfish> <20150620082712.GA366@swordfish> <20150621041554.GA523@swordfish> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 21 Jun 2015, Sergey Senozhatsky wrote: > On (06/20/15 11:12), Thomas Gleixner wrote: > > One last request. Can you please provide /proc/timer_list and dmesg > > from a mainline kernel for comparison? > > attached. Thanks for providing that. As I feared already, there is a regression as well. The new code fails to allocated more than one hpet MSI interrupt. Fix below. Thanks, tglx --- Subject: x86/hpet: Use proper hpet device number for MSI allocation From: Thomas Gleixner Date: Sun, 21 Jun 2015 16:21:50 +0200 hpet_assign_irq() is called with hpet_device->num as "hardware interrupt number", but hpet_device->num is initialized after the interrupt has been assigned, so it's always 0. As a consequence only the first MSI allocation succeeds, the following ones fail because the "hardware interrupt number" already exists. Move the initialization of dev->num and other fields before the call to hpet_assign_irq(), which is the ordering before the offending commit which introduced that regression. Fixes: "3cb96f0c9733 x86/hpet: Enhance HPET IRQ to support hierarchical irqdomains" Reported-by: Sergey Senozhatsky Signed-off-by: Thomas Gleixner Cc: Jiang Liu Cc: Borislav Petkov --- arch/x86/kernel/hpet.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) Index: tip/arch/x86/kernel/hpet.c =================================================================== --- tip.orig/arch/x86/kernel/hpet.c +++ tip/arch/x86/kernel/hpet.c @@ -577,16 +577,17 @@ static void hpet_msi_capability_lookup(u if (!(cfg & HPET_TN_FSB_CAP)) continue; + hdev->flags = 0; + if (cfg & HPET_TN_PERIODIC_CAP) + hdev->flags |= HPET_DEV_PERI_CAP; + sprintf(hdev->name, "hpet%d", i); + hdev->num = i; + irq = hpet_assign_irq(hpet_domain, hdev, hdev->num); if (irq <= 0) continue; - sprintf(hdev->name, "hpet%d", i); - hdev->num = i; hdev->irq = irq; - hdev->flags = 0; - if (cfg & HPET_TN_PERIODIC_CAP) - hdev->flags |= HPET_DEV_PERI_CAP; hdev->flags |= HPET_DEV_FSB_CAP; hdev->flags |= HPET_DEV_VALID; num_timers_used++; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/