From patchwork Sun Jan 4 10:55:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 5563441 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0A9F59F2ED for ; Sun, 4 Jan 2015 11:01:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3B176201C8 for ; Sun, 4 Jan 2015 11:01:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 59B9E2011D for ; Sun, 4 Jan 2015 11:01:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y7itU-00079x-HM; Sun, 04 Jan 2015 10:58:48 +0000 Received: from mail-pd0-f172.google.com ([209.85.192.172]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y7irX-0005Zt-S1 for linux-arm-kernel@lists.infradead.org; Sun, 04 Jan 2015 10:56:48 +0000 Received: by mail-pd0-f172.google.com with SMTP id y13so26268578pdi.17 for ; Sun, 04 Jan 2015 02:56:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LqOFi10I1kFLf+cQdrmIc8b8vqzLbs+P+BoeRvhBo34=; b=O8j66gHxS3OkfPqRaNZeXs3/PwcO74b/u0cNzSfoCxv0556f0XPkyDDFIibPRYI6yA X5yEqcZxMRHP9FhXnBG2rr+PlWvWvmiGcLLD3TZlTDN8UNzw17h1X12sJpt03Q1OV3cu 9i84GuQDog4t4Bxl7XZMCX/4nVip4S+Na60xKe49ijNkIbOG3qDtbXMzNJ0U3opfBFp/ a2k1SjVnDfGyrZ1EmvpPTMaS4/WAZ+Lk/eILfwMtC9y5L6lcjYpd7txy35T2w6YQzkUT o2g70uYjTvshqPCMIqjORjpnHWA0AWoAjbR/ZSNTCiTPUQUk2qMWsn82iEeU81Et0V80 x57g== X-Gm-Message-State: ALoCoQkzsCcAFWtFLVZXNcoaUDE528nLA7bl/eAnf5vicoucdJP94ZKlZkgE/mHRZvlP3aHzevqz X-Received: by 10.70.33.71 with SMTP id p7mr136737937pdi.111.1420368986720; Sun, 04 Jan 2015 02:56:26 -0800 (PST) Received: from localhost ([180.150.148.224]) by mx.google.com with ESMTPSA id j9sm51346088pdl.72.2015.01.04.02.56.25 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 04 Jan 2015 02:56:25 -0800 (PST) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Olof Johansson , Arnd Bergmann , Mark Rutland , Grant Likely , Will Deacon Subject: [PATCH v6 09/17] ACPI / table: Print GIC information when MADT is parsed Date: Sun, 4 Jan 2015 18:55:10 +0800 Message-Id: <1420368918-5086-10-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1420368918-5086-1-git-send-email-hanjun.guo@linaro.org> References: <1420368918-5086-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150104_025647_957556_F2B4D9DF X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: Rob Herring , Lorenzo Pieralisi , Robert Richter , Jason Cooper , Graeme Gregory , linaro-acpi@lists.linaro.org, Marc Zyngier , Jon Masters , Timur Tabi , Randy Dunlap , linux-kernel@vger.kernel.org, Tomasz Nowicki , linux-acpi@vger.kernel.org, Mark Brown , Hanjun Guo , suravee.suthikulpanit@amd.com, Sudeep Holla , Bjorn Helgaas , phoenix.liyi@huawei.com, linux-arm-kernel@lists.infradead.org, Charles.Garcia-Tobin@arm.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When MADT is parsed, print GIC information to make the boot log look pretty: ACPI: GICC (acpi_id[0x0000] address[00000000e112f000] MPIDR[0x0] enabled) ACPI: GICC (acpi_id[0x0001] address[00000000e112f000] MPIDR[0x1] enabled) ... ACPI: GICC (acpi_id[0x0201] address[00000000e112f000] MPIDR[0x201] enabled) These information will be very helpful to bring up early systems to see if acpi_id and MPIDR are matched or not as spec defined. Tested-by: Suravee Suthikulpanit Signed-off-by: Hanjun Guo Signed-off-by: Tomasz Nowicki --- drivers/acpi/tables.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 93b8152..42d314f 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -183,6 +183,49 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) } break; + case ACPI_MADT_TYPE_GENERIC_INTERRUPT: + { + struct acpi_madt_generic_interrupt *p = + (struct acpi_madt_generic_interrupt *)header; + pr_info("GICC (acpi_id[0x%04x] address[%p] MPIDR[0x%llx] %s)\n", + p->uid, (void *)(unsigned long)p->base_address, + p->arm_mpidr, + (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); + + } + break; + + case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR: + { + struct acpi_madt_generic_distributor *p = + (struct acpi_madt_generic_distributor *)header; + pr_info("GIC Distributor (gic_id[0x%04x] address[%p] gsi_base[%d])\n", + p->gic_id, + (void *)(unsigned long)p->base_address, + p->global_irq_base); + } + break; + + case ACPI_MADT_TYPE_GENERIC_MSI_FRAME: + { + struct acpi_madt_generic_msi_frame *p = + (struct acpi_madt_generic_msi_frame *)header; + pr_info("GIC MSI Frame (msi_fame_id[%d] address[%p])\n", + p->msi_frame_id, + (void *)(unsigned long)p->base_address); + } + break; + + case ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR: + { + struct acpi_madt_generic_redistributor *p = + (struct acpi_madt_generic_redistributor *)header; + pr_info("GIC Redistributor (address[%p] region_size[0x%x])\n", + (void *)(unsigned long)p->base_address, + p->length); + } + break; + default: pr_warn("Found unsupported MADT entry (type = 0x%x)\n", header->type);