From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH v3 13/17] ARM64 / ACPI: Add GICv2 specific ACPI boot support Date: Wed, 03 Sep 2014 20:42:44 +0200 Message-ID: <2893693.4bZJXXENof@wuerfel> References: <1409583475-6978-1-git-send-email-hanjun.guo@linaro.org> <1409583475-6978-14-git-send-email-hanjun.guo@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from mout.kundenserver.de ([212.227.17.13]:49764 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752643AbaICSnU (ORCPT ); Wed, 3 Sep 2014 14:43:20 -0400 In-Reply-To: <1409583475-6978-14-git-send-email-hanjun.guo@linaro.org> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: linux-arm-kernel@lists.infradead.org Cc: Hanjun Guo , Catalin Marinas , "Rafael J. Wysocki" , Mark Rutland , Olof Johansson , Grant Likely , linaro-acpi@lists.linaro.org, Liviu Dudau , Lv Zheng , Rob Herring , Lorenzo Pieralisi , Daniel Lezcano , Robert Moore , linux-acpi@vger.kernel.org, Charles.Garcia-Tobin@arm.com, Robert Richter , Jason Cooper , Marc Zyngier , Will Deacon , Tomasz Nowicki , Mark Brown , Bjorn Helgaas , Graeme Gregory , Randy Dunlap On Monday 01 September 2014 22:57:51 Hanjun Guo wrote: > + /* Collect CPU base addresses */ > + count = acpi_parse_entries(sizeof(struct acpi_table_madt), > + gic_acpi_parse_madt_cpu, table, > + ACPI_MADT_TYPE_GENERIC_INTERRUPT, > + ACPI_MAX_GIC_CPU_INTERFACE_ENTRIES); > + if (count < 0) { > + pr_err("Error during GICC entries parsing\n"); > + return -EFAULT; > + } else if (!count) { > + /* No GICC entries provided, use address from MADT header */ > + struct acpi_table_madt *madt = (struct acpi_table_madt *)table; > + > + if (!madt->address) > + return -EFAULT; > + > + cpu_phy_base = (u64)madt->address; > + } After I read through ACPI-5.1 section 5.2.12.14, I wonder if this is the best way to treat a missing ACPI_MADT_TYPE_GENERIC_INTERRUPT table. Do we expect to see those in practice? It seems like using the x86 local APIC address as a fallback for the GIC address is not something we should do unless we absolutely have to support a system that doesn't have the GIC table. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755057AbaICSnW (ORCPT ); Wed, 3 Sep 2014 14:43:22 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:49764 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752643AbaICSnU (ORCPT ); Wed, 3 Sep 2014 14:43:20 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Hanjun Guo , Catalin Marinas , "Rafael J. Wysocki" , Mark Rutland , Olof Johansson , Grant Likely , linaro-acpi@lists.linaro.org, Liviu Dudau , Lv Zheng , Rob Herring , Lorenzo Pieralisi , Daniel Lezcano , Robert Moore , linux-acpi@vger.kernel.org, Charles.Garcia-Tobin@arm.com, Robert Richter , Jason Cooper , Marc Zyngier , Will Deacon , Tomasz Nowicki , Mark Brown , Bjorn Helgaas , Graeme Gregory , Randy Dunlap , linux-kernel@vger.kernel.org, Sudeep Holla Subject: Re: [PATCH v3 13/17] ARM64 / ACPI: Add GICv2 specific ACPI boot support Date: Wed, 03 Sep 2014 20:42:44 +0200 Message-ID: <2893693.4bZJXXENof@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1409583475-6978-14-git-send-email-hanjun.guo@linaro.org> References: <1409583475-6978-1-git-send-email-hanjun.guo@linaro.org> <1409583475-6978-14-git-send-email-hanjun.guo@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V02:K0:6ejRh+hdWAs67lPLNSO2Zbkr5MyxYZ8Uq9lcZmCAL89 M0jrEtCYhThiphPG95rw8lWrrzSAIY2lajE2aS7ZBV02XT8PZj 9RC15UM3gRcSc5EUXszLHv9a8ziRbxHbGK+cw+dVq1/ZD2krru 0hyFSrX9UjWnpA/feMwbU7PXWwTwkLSrloEip9KfZ0na3Hun6G jXgt/UlkZptWdSaJpzh47s3bmaHTHcOFRIN7lLTMZwxDM1Qc/s CFybuFggjUtGeYfsuENBnqsugc6mLB+a+h2JDr39gOyF0E3oU0 QOheF5wEGX2XoA3SuZ6OwVFpMkNgF9AOzb3RuM1jHqAmUrZum0 Tc/xJCCRBKFbXuSS+bss= X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 01 September 2014 22:57:51 Hanjun Guo wrote: > + /* Collect CPU base addresses */ > + count = acpi_parse_entries(sizeof(struct acpi_table_madt), > + gic_acpi_parse_madt_cpu, table, > + ACPI_MADT_TYPE_GENERIC_INTERRUPT, > + ACPI_MAX_GIC_CPU_INTERFACE_ENTRIES); > + if (count < 0) { > + pr_err("Error during GICC entries parsing\n"); > + return -EFAULT; > + } else if (!count) { > + /* No GICC entries provided, use address from MADT header */ > + struct acpi_table_madt *madt = (struct acpi_table_madt *)table; > + > + if (!madt->address) > + return -EFAULT; > + > + cpu_phy_base = (u64)madt->address; > + } After I read through ACPI-5.1 section 5.2.12.14, I wonder if this is the best way to treat a missing ACPI_MADT_TYPE_GENERIC_INTERRUPT table. Do we expect to see those in practice? It seems like using the x86 local APIC address as a fallback for the GIC address is not something we should do unless we absolutely have to support a system that doesn't have the GIC table. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Wed, 03 Sep 2014 20:42:44 +0200 Subject: [PATCH v3 13/17] ARM64 / ACPI: Add GICv2 specific ACPI boot support In-Reply-To: <1409583475-6978-14-git-send-email-hanjun.guo@linaro.org> References: <1409583475-6978-1-git-send-email-hanjun.guo@linaro.org> <1409583475-6978-14-git-send-email-hanjun.guo@linaro.org> Message-ID: <2893693.4bZJXXENof@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Monday 01 September 2014 22:57:51 Hanjun Guo wrote: > + /* Collect CPU base addresses */ > + count = acpi_parse_entries(sizeof(struct acpi_table_madt), > + gic_acpi_parse_madt_cpu, table, > + ACPI_MADT_TYPE_GENERIC_INTERRUPT, > + ACPI_MAX_GIC_CPU_INTERFACE_ENTRIES); > + if (count < 0) { > + pr_err("Error during GICC entries parsing\n"); > + return -EFAULT; > + } else if (!count) { > + /* No GICC entries provided, use address from MADT header */ > + struct acpi_table_madt *madt = (struct acpi_table_madt *)table; > + > + if (!madt->address) > + return -EFAULT; > + > + cpu_phy_base = (u64)madt->address; > + } After I read through ACPI-5.1 section 5.2.12.14, I wonder if this is the best way to treat a missing ACPI_MADT_TYPE_GENERIC_INTERRUPT table. Do we expect to see those in practice? It seems like using the x86 local APIC address as a fallback for the GIC address is not something we should do unless we absolutely have to support a system that doesn't have the GIC table. Arnd