From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hanjun Guo Subject: Re: [PATCH v3 2/8] ACPI / irqchip: Add self-probe infrastructure to initialize IRQ controller Date: Mon, 20 Jul 2015 17:32:18 +0800 Message-ID: <55ACC022.1000800@linaro.org> 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; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pd0-f176.google.com ([209.85.192.176]:33199 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753443AbbGTJca (ORCPT ); Mon, 20 Jul 2015 05:32:30 -0400 Received: by pdbnt7 with SMTP id nt7so28459050pdb.0 for ; Mon, 20 Jul 2015 02:32:30 -0700 (PDT) In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Timur Tabi 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 07/18/2015 07:15 AM, Timur Tabi wrote: > 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[]? Hmm, did you get the error message like: "Invalid GIC version 5 in MADT"? or just use ACPI_MADT_GIC_VERSION_V1 as the gic_version? if the later one, it will show everything is fine, but failed to probe the GIC. I agree with you that we need to print some error message here, I will update my patch. Thanks Hanjun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753998AbbGTJcd (ORCPT ); Mon, 20 Jul 2015 05:32:33 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:35481 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753878AbbGTJca (ORCPT ); Mon, 20 Jul 2015 05:32:30 -0400 Message-ID: <55ACC022.1000800@linaro.org> Date: Mon, 20 Jul 2015 17:32:18 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Timur Tabi 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" Subject: Re: [PATCH v3 2/8] ACPI / irqchip: Add self-probe infrastructure to initialize IRQ controller References: <1436525114-14425-1-git-send-email-hanjun.guo@linaro.org> <1436525114-14425-3-git-send-email-hanjun.guo@linaro.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/18/2015 07:15 AM, Timur Tabi wrote: > 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[]? Hmm, did you get the error message like: "Invalid GIC version 5 in MADT"? or just use ACPI_MADT_GIC_VERSION_V1 as the gic_version? if the later one, it will show everything is fine, but failed to probe the GIC. I agree with you that we need to print some error message here, I will update my patch. Thanks Hanjun From mboxrd@z Thu Jan 1 00:00:00 1970 From: hanjun.guo@linaro.org (Hanjun Guo) Date: Mon, 20 Jul 2015 17:32:18 +0800 Subject: [PATCH v3 2/8] ACPI / irqchip: Add self-probe infrastructure to initialize IRQ controller In-Reply-To: References: <1436525114-14425-1-git-send-email-hanjun.guo@linaro.org> <1436525114-14425-3-git-send-email-hanjun.guo@linaro.org> Message-ID: <55ACC022.1000800@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 07/18/2015 07:15 AM, Timur Tabi wrote: > 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[]? Hmm, did you get the error message like: "Invalid GIC version 5 in MADT"? or just use ACPI_MADT_GIC_VERSION_V1 as the gic_version? if the later one, it will show everything is fine, but failed to probe the GIC. I agree with you that we need to print some error message here, I will update my patch. Thanks Hanjun