From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Subject: Re: [PATCH v3 2/8] ACPI / irqchip: Add self-probe infrastructure to initialize IRQ controller Date: Fri, 17 Jul 2015 18:15:00 -0500 Message-ID: References: <1436525114-14425-1-git-send-email-hanjun.guo@linaro.org> <1436525114-14425-3-git-send-email-hanjun.guo@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:33943 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750863AbbGQXPC (ORCPT ); Fri, 17 Jul 2015 19:15:02 -0400 In-Reply-To: <1436525114-14425-3-git-send-email-hanjun.guo@linaro.org> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Hanjun Guo Cc: Marc Zyngier , Jason Cooper , Will Deacon , Catalin Marinas , "Rafael J. Wysocki" , Wei Huang , Lorenzo Pieralisi , Arnd Bergmann , linaro-acpi@lists.linaro.org, lkml , Tomasz Nowicki , linux-acpi@vger.kernel.org, Mark Brown , Grant Likely , Thomas Gleixner , Jiang Liu , "linux-arm-kernel@lists.infradead.org" On Fri, Jul 10, 2015 at 5:45 AM, Hanjun Guo wrote: > +void __init acpi_irqchip_init(void) > +{ > + struct acpi_table_id *id; > + > + if (acpi_disabled) > + return; > + > + if (acpi_gic_version_init()) > + return; > + > + /* scan the irqchip table to match the GIC version and its driver */ > + for (id = __irqchip_acpi_table; id->id[0]; id++) { > + if (gic_version == (u8)id->driver_data) > + acpi_table_parse(id->id, > + (acpi_tbl_table_handler)id->handler); > + } Should we display an error message if we don't find a matching table? That can happen if the ACPI tables shows a GIC version number that is not listed in __irqchip_acpi_table[]? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752641AbbGQXPF (ORCPT ); Fri, 17 Jul 2015 19:15:05 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33943 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750863AbbGQXPC (ORCPT ); Fri, 17 Jul 2015 19:15:02 -0400 MIME-Version: 1.0 In-Reply-To: <1436525114-14425-3-git-send-email-hanjun.guo@linaro.org> References: <1436525114-14425-1-git-send-email-hanjun.guo@linaro.org> <1436525114-14425-3-git-send-email-hanjun.guo@linaro.org> Date: Fri, 17 Jul 2015 18:15:00 -0500 Message-ID: Subject: Re: [PATCH v3 2/8] ACPI / irqchip: Add self-probe infrastructure to initialize IRQ controller From: Timur Tabi To: Hanjun Guo Cc: Marc Zyngier , Jason Cooper , Will Deacon , Catalin Marinas , "Rafael J. Wysocki" , Wei Huang , Lorenzo Pieralisi , Arnd Bergmann , linaro-acpi@lists.linaro.org, lkml , Tomasz Nowicki , linux-acpi@vger.kernel.org, Mark Brown , Grant Likely , Thomas Gleixner , Jiang Liu , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 10, 2015 at 5:45 AM, Hanjun Guo wrote: > +void __init acpi_irqchip_init(void) > +{ > + struct acpi_table_id *id; > + > + if (acpi_disabled) > + return; > + > + if (acpi_gic_version_init()) > + return; > + > + /* scan the irqchip table to match the GIC version and its driver */ > + for (id = __irqchip_acpi_table; id->id[0]; id++) { > + if (gic_version == (u8)id->driver_data) > + acpi_table_parse(id->id, > + (acpi_tbl_table_handler)id->handler); > + } Should we display an error message if we don't find a matching table? That can happen if the ACPI tables shows a GIC version number that is not listed in __irqchip_acpi_table[]? From mboxrd@z Thu Jan 1 00:00:00 1970 From: timur@codeaurora.org (Timur Tabi) Date: Fri, 17 Jul 2015 18:15:00 -0500 Subject: [PATCH v3 2/8] ACPI / irqchip: Add self-probe infrastructure to initialize IRQ controller In-Reply-To: <1436525114-14425-3-git-send-email-hanjun.guo@linaro.org> References: <1436525114-14425-1-git-send-email-hanjun.guo@linaro.org> <1436525114-14425-3-git-send-email-hanjun.guo@linaro.org> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Jul 10, 2015 at 5:45 AM, Hanjun Guo wrote: > +void __init acpi_irqchip_init(void) > +{ > + struct acpi_table_id *id; > + > + if (acpi_disabled) > + return; > + > + if (acpi_gic_version_init()) > + return; > + > + /* scan the irqchip table to match the GIC version and its driver */ > + for (id = __irqchip_acpi_table; id->id[0]; id++) { > + if (gic_version == (u8)id->driver_data) > + acpi_table_parse(id->id, > + (acpi_tbl_table_handler)id->handler); > + } Should we display an error message if we don't find a matching table? That can happen if the ACPI tables shows a GIC version number that is not listed in __irqchip_acpi_table[]?