Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752318AbbKPVqp (ORCPT ); Mon, 16 Nov 2015 16:46:45 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:26569 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751251AbbKPVqm (ORCPT ); Mon, 16 Nov 2015 16:46:42 -0500 Subject: Re: [PATCH v2] x86/irq: Probe for PIC presence before allocating descs for legacy IRQs To: Thomas Gleixner References: <1446543614-3621-1-git-send-email-vkuznets@redhat.com> <564A43F5.30602@oracle.com> Cc: Vitaly Kuznetsov , x86@kernel.org, Ingo Molnar , "H. Peter Anvin" , Jiang Liu , "K. Y. Srinivasan" , linux-kernel@vger.kernel.org, xen-devel From: Boris Ostrovsky Message-ID: <564A4EB2.6050401@oracle.com> Date: Mon, 16 Nov 2015 16:46:26 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 966 Lines: 21 On 11/16/2015 04:39 PM, Thomas Gleixner wrote: > On Mon, 16 Nov 2015, Boris Ostrovsky wrote: >> Xen expects legacy interrupts to be there (pretty much for the same reason as >> Hyper-V does) and with this change arch_probe_nr_irqs() returns zero and no >> descriptors are allocated. > Right, because everything which has a PIT gets them and everything > which does not have a PIT does not. > >> We can allocate those descriptors as needed in xen_irq_init() (if we know that >> IRQs are legacy), although that would look somewhat ugly and out of place. > Why preallocating them in xen_irq_init()? You simply can remove the > NR_IRQS_LEGACY checks in xen_allocate_irq_gsi/xen_free_irq(), right? Of course. Thanks. -boris -- 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/