From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755487AbaE1VWg (ORCPT ); Wed, 28 May 2014 17:22:36 -0400 Received: from www.linutronix.de ([62.245.132.108]:40467 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695AbaE1VWe (ORCPT ); Wed, 28 May 2014 17:22:34 -0400 Date: Wed, 28 May 2014 23:22:06 +0200 (CEST) From: Thomas Gleixner To: Jiang Liu cc: Benjamin Herrenschmidt , Grant Likely , Ingo Molnar , "H. Peter Anvin" , "Rafael J. Wysocki" , Bjorn Helgaas , Randy Dunlap , Yinghai Lu , x86@kernel.org, Len Brown , Pavel Machek , Konrad Rzeszutek Wilk , Andrew Morton , Tony Luck , Joerg Roedel , Paul Gortmaker , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, Ingo Molnar , linux-pm@vger.kernel.org Subject: Re: [Patch V3 19/37] x86, irq: introduce mechanisms to support dynamically allocate IRQ for IOAPIC In-Reply-To: Message-ID: References: <1401178092-1228-1-git-send-email-jiang.liu@linux.intel.com> <1401178092-1228-20-git-send-email-jiang.liu@linux.intel.com> <53856D8E.3010401@linux.intel.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 28 May 2014, Thomas Gleixner wrote: > On Wed, 28 May 2014, Jiang Liu wrote: > > This is used to work around special non-ISA interrupts with GSI below > > NR_IRQS_LEGACY. The original code for the special case is: > > /* > > * 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_IRQS_LEGACY ? gsi : gsi_top + gsi; > > That looks really, really wrong. What's wrong with assigning that irq > irq number on those platforms? > > The weird stuff is SFI and devicetree, if I understand your code > correctly. > > So if those platforms do not have actual legacy irqs, what's wrong > with giving out the legacy numbers? Though if it's a real issue, we can simply mark the ioapic on those devices as DYNAMIC and avoid that whole magic. Thanks, tglx