From patchwork Wed Jan 14 15:04:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 5632371 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1C683C058D for ; Wed, 14 Jan 2015 15:14:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3B86820256 for ; Wed, 14 Jan 2015 15:14:37 +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 5655E20251 for ; Wed, 14 Jan 2015 15:14:36 +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 1YBPbg-0001fL-Lt; Wed, 14 Jan 2015 15:11:40 +0000 Received: from mail-pd0-f171.google.com ([209.85.192.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YBPYU-0006ZG-MT for linux-arm-kernel@lists.infradead.org; Wed, 14 Jan 2015 15:08:23 +0000 Received: by mail-pd0-f171.google.com with SMTP id y13so10277384pdi.2 for ; Wed, 14 Jan 2015 07:08:01 -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=4msyOpwPJQo2EUDRpK0nOGQwBkQoQOyrO/IjIMxfBBo=; b=Qws5fAmMRHML7+nxtctz0sf5x022XQlCCJYfWylME2AopeZ1M3uYDquEw/IE1PF20g 5+1yAaVAY9d315C+ONE+nzSbOaFoN/+Kr7+0ziI4m2Zwam0e73OBBXcVnrOTbEqD+nJt SYiwxC/DMJbRIZ1rCT2QhUZ8GJ0Wr7Wjz47DrJuU+GPUsnNUQiCdmoDVZEWw0/gjOOF1 IcUeN9vb4ea5c2ukM89vfy6vr+VdfZiBPoHHVnubga1aFl8IF+2hr9z2DFS8COnYvfB+ 1MxqmzftN8a6ifnMBhC4yfm9pxgo/EQRyH6u4+Xyg/r6Pi8DcMzzfHBLMaZLYzBf51ka MGDw== X-Gm-Message-State: ALoCoQm4m5QA/9n6uYF/7IsNQLt6JXhr2Np7wRMk/b752Fgj2q2S27I9DF93TbmnYgCohGTsyRCa X-Received: by 10.70.37.166 with SMTP id z6mr6247353pdj.89.1421248081424; Wed, 14 Jan 2015 07:08:01 -0800 (PST) Received: from localhost (119.81.172.112-static.reverse.softlayer.com. [119.81.172.112]) by mx.google.com with ESMTPSA id gi6sm19906559pbd.93.2015.01.14.07.07.58 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 14 Jan 2015 07:08:00 -0800 (PST) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Olof Johansson , Arnd Bergmann , Mark Rutland , Grant Likely , Will Deacon Subject: [PATCH v7 09/17] ACPI / table: Print GIC information when MADT is parsed Date: Wed, 14 Jan 2015 23:04:57 +0800 Message-Id: <1421247905-3749-10-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1421247905-3749-1-git-send-email-hanjun.guo@linaro.org> References: <1421247905-3749-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150114_070822_782079_67C63BCB X-CRM114-Status: UNSURE ( 9.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: linaro-acpi@lists.linaro.org, wangyijing@huawei.com, Rob Herring , Lorenzo Pieralisi , Timur Tabi , linux-acpi@vger.kernel.org, Charles.Garcia-Tobin@arm.com, phoenix.liyi@huawei.com, Robert Richter , Jason Cooper , Marc Zyngier , Jon Masters , Tomasz Nowicki , Mark Brown , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Graeme Gregory , Randy Dunlap , linux-kernel@vger.kernel.org, Hanjun Guo , suravee.suthikulpanit@amd.com, Sudeep Holla 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 Tested-by: Yijing Wang Signed-off-by: Hanjun Guo Signed-off-by: Tomasz Nowicki Tested-by: Mark Langsdorf --- 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);