From patchwork Thu Jul 24 12:59:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 34200 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f71.google.com (mail-qg0-f71.google.com [209.85.192.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9F5C020C7F for ; Thu, 24 Jul 2014 13:00:11 +0000 (UTC) Received: by mail-qg0-f71.google.com with SMTP id f51sf5727103qge.10 for ; Thu, 24 Jul 2014 06:00:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=EUeY/EVGfWJflM8N+EBhbGipRe9YgbeC4GZbzbYc8N8=; b=QFcj4bDal86+/+fGgSZ2lcUIvS2u3CNISmjjeEI2WjLIX9th/XjDvfHijNQHDjJjOk AbBo+lKVMEZG5npex2QdbjC/i7Jw0FtTbC5Rts6oZxt3U2O0DUJw85Ci/VPuKfVuYRrp 383aINBCGHCjlWRDDAMsBnNzYc+MziwhuKjUJvk6PNXL5nrf3/XiwaiTjNPeDdJS4hlw BnDlW3WGtxeO8Fw1ykkri4m31ADhoXAep7/tdhaFHyovLluJOQ9a+lcucwx8WDSdMb2y YfE32WZX0A28NLBfnWYwRLgoRdyU0DfCRVn6g23HWo0m8jRt+DJRFbatIESPPEEQzfRf 2Isg== X-Gm-Message-State: ALoCoQle0tCIiF8Y9oRyd07UkxyOPERgIgJ1XrSuKJ87wF8hkpqxYiwHZndEFzF31uGRMrdxWVH7 X-Received: by 10.236.157.193 with SMTP id o41mr3667897yhk.6.1406206810935; Thu, 24 Jul 2014 06:00:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.50 with SMTP id i47ls748624qgd.38.gmail; Thu, 24 Jul 2014 06:00:10 -0700 (PDT) X-Received: by 10.220.7.131 with SMTP id d3mr11789752vcd.49.1406206810772; Thu, 24 Jul 2014 06:00:10 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id wm5si4838419vdb.83.2014.07.24.06.00.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Jul 2014 06:00:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id hq11so4738323vcb.16 for ; Thu, 24 Jul 2014 06:00:10 -0700 (PDT) X-Received: by 10.52.129.200 with SMTP id ny8mr9912804vdb.27.1406206810610; Thu, 24 Jul 2014 06:00:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp362694vcb; Thu, 24 Jul 2014 06:00:10 -0700 (PDT) X-Received: by 10.66.235.134 with SMTP id um6mr9798683pac.129.1406206809603; Thu, 24 Jul 2014 06:00:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay4si5924392pbc.122.2014.07.24.06.00.08 for ; Thu, 24 Jul 2014 06:00:09 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758921AbaGXNAF (ORCPT + 13 others); Thu, 24 Jul 2014 09:00:05 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:47358 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758897AbaGXNAA (ORCPT ); Thu, 24 Jul 2014 09:00:00 -0400 Received: by mail-pa0-f50.google.com with SMTP id et14so3847166pad.23 for ; Thu, 24 Jul 2014 06:00:00 -0700 (PDT) X-Received: by 10.68.69.46 with SMTP id b14mr10171879pbu.70.1406206800130; Thu, 24 Jul 2014 06:00:00 -0700 (PDT) Received: from localhost ([183.247.163.231]) by mx.google.com with ESMTPSA id k9sm7367399pdo.28.2014.07.24.05.59.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 24 Jul 2014 05:59:59 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Mark Rutland Cc: Graeme Gregory , Arnd Bergmann , Grant Likely , Sudeep Holla , Will Deacon , Jason Cooper , Marc Zyngier , Bjorn Helgaas , Daniel Lezcano , Mark Brown , Robert Richter , Lv Zheng , Robert Moore , Lorenzo Pieralisi , Liviu Dudau , Randy Dunlap , Charles.Garcia-Tobin@arm.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-acpi-private@linaro.org, Tomasz Nowicki , Hanjun Guo Subject: [PATCH 2/3] ACPI / ACPICA: Add new features for MADT which introduced by ACPI 5.1 Date: Thu, 24 Jul 2014 20:59:16 +0800 Message-Id: <1406206757-15512-3-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1406206757-15512-1-git-send-email-hanjun.guo@linaro.org> References: <1406206757-15512-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Tomasz Nowicki Add new features for MADT which introduced by ACPI 5.1: -comment on the GIC ID field of the GIC structure which is replaced by CPU Interface Number. -add new fields: Redistributor Base Address, GICV, GICH, and MPIDR. -add new structures for GIC MSI frame and GICR. -add flag definition for GICC flags. Signed-off-by: Tomasz Nowicki Signed-off-by: Hanjun Guo --- include/acpi/actbl1.h | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 9613e8e..8c91ad6 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -671,7 +671,9 @@ enum acpi_madt_type { ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11, ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12, - ACPI_MADT_TYPE_RESERVED = 13 /* 13 and greater are reserved */ + ACPI_MADT_TYPE_GIC_MSI_FRAME = 13, + ACPI_MADT_TYPE_GIC_REDISTRIBUTOR = 14, + ACPI_MADT_TYPE_RESERVED = 15 /* 15 and greater are reserved */ }; /* @@ -792,18 +794,23 @@ struct acpi_madt_local_x2apic_nmi { u8 reserved[3]; /* reserved - must be zero */ }; -/* 11: Generic Interrupt (ACPI 5.0) */ +/* 11: Generic Interrupt (ACPI 5.1) */ struct acpi_madt_generic_interrupt { struct acpi_subtable_header header; u16 reserved; /* reserved - must be zero */ - u32 gic_id; + u32 gic_id; /* it was renamed to cpu interface number in ACPI 5.1 */ u32 uid; u32 flags; u32 parking_version; u32 performance_interrupt; u64 parked_address; u64 base_address; + u64 gicv_base_address; + u64 gich_base_address; + u32 vgic_maintenance_interrupt; + u64 redist_base_address; + u64 mpidr; }; /* 12: Generic Distributor (ACPI 5.0) */ @@ -817,13 +824,36 @@ struct acpi_madt_generic_distributor { u32 reserved2; /* reserved - must be zero */ }; +/* 13: GIC MSI Frame (ACPI 5.1) */ + +struct acpi_madt_gic_msi_frame { + struct acpi_subtable_header header; + u16 reserved; /* reserved - must be zero */ + u32 gic_msi_frame_id; + u64 base_address; +}; + +/* 14: GIC Redistributor (ACPI 5.1) */ + +struct acpi_madt_gic_redistributor { + struct acpi_subtable_header header; + u16 reserved; /* reserved - must be zero */ + u64 base_address; + u32 region_size; +}; + /* * Common flags fields for MADT subtables */ -/* MADT Local APIC flags (lapic_flags) and GIC flags */ +/* MADT Local APIC flags (lapic_flags) and GICC flags */ + +#define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ + +/* MADT GICC flags only */ -#define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ +#define ACPI_MADT_PERF_INT_MODE (1<<1) /* 01: Performance Interrupt Mode */ +#define ACPI_MADT_VGIC (1<<2) /* 02: VGIC Maintenance interrupt mode */ /* MADT MPS INTI flags (inti_flags) */