From patchwork Fri Oct 17 13:37:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 5097781 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DCF079F38C for ; Fri, 17 Oct 2014 13:46:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06DF62015E for ; Fri, 17 Oct 2014 13:46:38 +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 21E662015D for ; Fri, 17 Oct 2014 13:46: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 1Xf7ox-0002FO-AB; Fri, 17 Oct 2014 13:43:55 +0000 Received: from mail-pa0-f46.google.com ([209.85.220.46]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xf7lF-0006jl-51 for linux-arm-kernel@lists.infradead.org; Fri, 17 Oct 2014 13:40:06 +0000 Received: by mail-pa0-f46.google.com with SMTP id fa1so848400pad.33 for ; Fri, 17 Oct 2014 06:39:43 -0700 (PDT) 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=L6YlQZrUyGqeQDheGGodSHb+RljDNynk84JJ6QrKKvk=; b=JKIIggUvK4SMRl2zArFL7dkDHjZnnpQIYDak5EuT4XOuuK25MPqswmRRUW52Fh6fjb 1uyYYg0w4emLGINo9o/8pI4equd7Fidg9sz/efaTAHEyXX5Ty3YZtFnlNoOeqeTyD1+h 4rBTF2rLE2tAJNODel8HujODlAAlOKOnNc6RqimgQFqxQ7Yk2vQzZ995hoZGiKyXPIL6 vxdziGQHZX50Q4ceCygP1ct+SNuGFZmo4pTg52yZ1taJAjYcR13Lmv+v2nHXUc4DRVP6 gAVC/OdIgt8m3gdmUsHe+qu1zQWzKIEL0b+f6KwfJjMuXPSDKTlNsc9lUPuRBxcU9+70 y4Jg== X-Gm-Message-State: ALoCoQnB99MQqpVXfyXGFZ8t4YwUcEJZOj5V8ng8Z7xFIttRZCbhktO8DQF8EAJXBP7BZpONtPOd X-Received: by 10.66.65.233 with SMTP id a9mr6135617pat.107.1413553183216; Fri, 17 Oct 2014 06:39:43 -0700 (PDT) Received: from localhost ([220.202.153.90]) by mx.google.com with ESMTPSA id wi1sm1620609pbc.58.2014.10.17.06.39.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 17 Oct 2014 06:39:42 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Mark Rutland , Olof Johansson , Grant Likely , Will Deacon Subject: [PATCH v5 10/18] ACPI / table: Print GIC information when MADT is parsed Date: Fri, 17 Oct 2014 21:37:06 +0800 Message-Id: <1413553034-20956-11-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1413553034-20956-1-git-send-email-hanjun.guo@linaro.org> References: <1413553034-20956-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141017_064005_334114_29F4FF75 X-CRM114-Status: GOOD ( 10.65 ) X-Spam-Score: -0.7 (/) Cc: 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 , Arnd Bergmann , Marc Zyngier , Jon Masters , Tomasz Nowicki , Mark Brown , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Graeme Gregory , Kangkang.Shen@huawei.com, Randy Dunlap , linux-kernel@vger.kernel.org, Hanjun Guo , 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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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] MPDIR[0x0] enabled) ACPI: GICC (acpi_id[0x0001] address[00000000e112f000] MPDIR[0x1] enabled) ... ACPI: GICC (acpi_id[0x0201] address[00000000e112f000] MPDIR[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. 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 b18e45e..47f36d4 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] MPDIR[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);