From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751256AbbJBE6n (ORCPT ); Fri, 2 Oct 2015 00:58:43 -0400 Received: from mga02.intel.com ([134.134.136.20]:3287 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbbJBE6m (ORCPT ); Fri, 2 Oct 2015 00:58:42 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,621,1437462000"; d="scan'208";a="572583516" Date: Fri, 2 Oct 2015 07:58:39 +0300 From: Mika Westerberg To: Thomas Gleixner Cc: Jiang Liu , linux-kernel@vger.kernel.org Subject: Re: CPU hotplug and chained interrupts on x86 Message-ID: <20151002045839.GR1551@lahna.fi.intel.com> References: <20151001142147.GO1551@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 01, 2015 at 11:45:23PM +0200, Thomas Gleixner wrote: > On Thu, 1 Oct 2015, Thomas Gleixner wrote: > > On Thu, 1 Oct 2015, Mika Westerberg wrote: > > > Now if I plug/unplug the card I may get few interrupts to CPU0 but rest > > > of the interrupts never happen. Probably because IO-APIC forwards them > > > to the lowest priority CPU which is offline at this point. > > > > > > There is following check in fixup_irqs(): > > > > > > if (!irq_has_action(irq) || irqd_is_per_cpu(data) || > > > cpumask_subset(affinity, cpu_online_mask)) { > > > raw_spin_unlock(&desc->lock); > > > continue; > > > } > > > > > > If an interrupt is requested by a driver it will force new affinity and > > > everything works fine. However if the interrupt is chained (it does not > > > have ->action) this is skipped and the current affinity remains. > > > > > > We could detect here if the interrupt is chained but there seems to be > > > no easy way to determine it currently so we would need to add a new flag > > > to desc->status_use_accessors that gets set in __irq_do_set_handler() > > > when is_chained is 1. > > > > Either there or in irq_data. Need to look at it in detail. > > desc->status_use_accessors is the place where this wants to go. Thank you. I'll prepare a patch fixing this shortly.