diff mbox series

[2/3] ACPICA: MADT: Add LoongArch APICs support

Message ID 20210705124206.1228958-3-chenhuacai@loongson.cn
State New
Headers show
Series ACPI: Add LoongArch-related definitions | expand

Commit Message

Huacai Chen July 5, 2021, 12:42 p.m. UTC
LoongArch-specific interrupt controllers (similar to APIC) are added
in the next revision of ACPI Specification (current revision is 6.4),
which including CORE_PIC (CPUINTC), LIO_PIC (LIOINTC), EIO_PIC (EIOINTC),
HT_PIC (HTVECINTC), BIO_PIC (PCHINTC), LPC_PIC (PCHLPC) and MSI_PIC
(PCHMSI). This patch add their definition and handlings.

Reference: https://mantis.uefi.org/mantis/view.php?id=2203
Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
---
 drivers/acpi/tables.c |  10 ++++
 include/acpi/actbl2.h | 123 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 132 insertions(+), 1 deletion(-)

Comments

Moore, Robert July 8, 2021, 9:35 p.m. UTC | #1
For legal reasons, we can't pre-release any upcoming ACPI spec changes in ACPICA.

-----Original Message-----
From: Huacai Chen <chenhuacai@loongson.cn> 

Sent: Monday, July 05, 2021 5:42 AM
To: Rafael J . Wysocki <rjw@rjwysocki.net>; Len Brown <lenb@kernel.org>; Moore, Robert <robert.moore@intel.com>; Erik Kaneda <erik.kaneda@intel.com>
Cc: linux-acpi@vger.kernel.org; devel@acpica.org; Xuefeng Li <lixuefeng@loongson.cn>; Jiaxun Yang <jiaxun.yang@flygoat.com>; Huacai Chen <chenhuacai@loongson.cn>; Jianmin Lv <lvjianmin@loongson.cn>
Subject: [PATCH 2/3] ACPICA: MADT: Add LoongArch APICs support

LoongArch-specific interrupt controllers (similar to APIC) are added in the next revision of ACPI Specification (current revision is 6.4), which including CORE_PIC (CPUINTC), LIO_PIC (LIOINTC), EIO_PIC (EIOINTC), HT_PIC (HTVECINTC), BIO_PIC (PCHINTC), LPC_PIC (PCHLPC) and MSI_PIC (PCHMSI). This patch add their definition and handlings.

Reference: https://mantis.uefi.org/mantis/view.php?id=2203
Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>

---
 drivers/acpi/tables.c |  10 ++++
 include/acpi/actbl2.h | 123 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 132 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index a37a1532a575..5943ae4f76bb 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -208,6 +208,16 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
 		}
 		break;
 
+	case ACPI_MADT_TYPE_CORE_PIC:
+		{
+			struct acpi_madt_core_pic *p =
+			    (struct acpi_madt_core_pic *)header;
+			pr_debug("CORE PIC (processor_id[0x%02x] core_id[0x%02x] %s)\n",
+				 p->processor_id, p->core_id,
+				 (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
+		}
+		break;
+
 	default:
 		pr_warn("Found unsupported MADT entry (type = 0x%x)\n",
 			header->type);
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 2069ac38a4e2..fd6d0b440c4b 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -571,7 +571,14 @@ enum acpi_madt_type {
 	ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
 	ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
 	ACPI_MADT_TYPE_MULTIPROC_WAKEUP = 16,
-	ACPI_MADT_TYPE_RESERVED = 17	/* 17 and greater are reserved */
+	ACPI_MADT_TYPE_CORE_PIC = 17,
+	ACPI_MADT_TYPE_LIO_PIC = 18,
+	ACPI_MADT_TYPE_HT_PIC = 19,
+	ACPI_MADT_TYPE_EIO_PIC = 20,
+	ACPI_MADT_TYPE_MSI_PIC = 21,
+	ACPI_MADT_TYPE_BIO_PIC = 22,
+	ACPI_MADT_TYPE_LPC_PIC = 23,
+	ACPI_MADT_TYPE_RESERVED = 24	/* 24 and greater are reserved */
 };
 
 /*
@@ -801,6 +808,120 @@ struct acpi_madt_multiproc_wakeup_mailbox {
 
 #define ACPI_MP_WAKE_COMMAND_WAKEUP    1
 
+/* Values for Version field above */
+
+enum acpi_madt_core_pic_version {
+	ACPI_MADT_CORE_PIC_VERSION_NONE = 0,
+	ACPI_MADT_CORE_PIC_VERSION_V1 = 1,
+	ACPI_MADT_CORE_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_lio_pic_version {
+	ACPI_MADT_LIO_PIC_VERSION_NONE = 0,
+	ACPI_MADT_LIO_PIC_VERSION_V1 = 1,
+	ACPI_MADT_LIO_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_eio_pic_version {
+	ACPI_MADT_EIO_PIC_VERSION_NONE = 0,
+	ACPI_MADT_EIO_PIC_VERSION_V1 = 1,
+	ACPI_MADT_EIO_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_ht_pic_version {
+	ACPI_MADT_HT_PIC_VERSION_NONE = 0,
+	ACPI_MADT_HT_PIC_VERSION_V1 = 1,
+	ACPI_MADT_HT_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_bio_pic_version {
+	ACPI_MADT_BIO_PIC_VERSION_NONE = 0,
+	ACPI_MADT_BIO_PIC_VERSION_V1 = 1,
+	ACPI_MADT_BIO_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_msi_pic_version {
+	ACPI_MADT_MSI_PIC_VERSION_NONE = 0,
+	ACPI_MADT_MSI_PIC_VERSION_V1 = 1,
+	ACPI_MADT_MSI_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_lpc_pic_version {
+	ACPI_MADT_LPC_PIC_VERSION_NONE = 0,
+	ACPI_MADT_LPC_PIC_VERSION_V1 = 1,
+	ACPI_MADT_LPC_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+/* Core Interrupt Controller */
+
+struct acpi_madt_core_pic {
+	struct acpi_subtable_header header;
+	u32 processor_id;
+	u32 core_id;
+	u32 flags;
+	u8 version;
+};
+
+/* Legacy I/O Interrupt Controller */
+
+struct acpi_madt_lio_pic {
+	struct acpi_subtable_header header;
+	u64 address;
+	u16 size;
+	u8 cascade[2];
+	u32 cascade_map[2];
+	u8 version;
+};
+
+/* Extend I/O Interrupt Controller */
+
+struct acpi_madt_eio_pic {
+	struct acpi_subtable_header header;
+	u8 cascade;
+	u8 version;
+};
+
+/* HT Interrupt Controller */
+
+struct acpi_madt_ht_pic {
+	struct acpi_subtable_header header;
+	u64 address;
+	u16 size;
+	u8 cascade[8];
+	u8 version;
+};
+
+/* Bridge I/O Interrupt Controller */
+
+struct acpi_madt_bio_pic {
+	struct acpi_subtable_header header;
+	u64 address;
+	u16 size;
+	u16 id;
+	u16 gsi_base;
+	u8 version;
+};
+
+/* MSI Interrupt Controller */
+
+struct acpi_madt_msi_pic {
+	struct acpi_subtable_header header;
+	u64 msg_address;
+	u32 start;
+	u32 count;
+	u8 version;
+};
+
+/* LPC Interrupt Controller */
+
+struct acpi_madt_lpc_pic {
+	struct acpi_subtable_header header;
+	u64 address;
+	u16 size;
+	u8 cascade;
+	u8 version;
+};
+
 /*
  * Common flags fields for MADT subtables
  */
--
2.27.0
Huacai Chen July 9, 2021, 3:08 a.m. UTC | #2
Hi, Moore,

&gt; -----原始邮件-----
&gt; 发件人: "Moore, Robert" <robert.moore@intel.com>
&gt; 发送时间: 2021-07-09 05:35:28 (星期五)
&gt; 收件人: "Huacai Chen" <chenhuacai@loongson.cn>, "Rafael J . Wysocki" <rjw@rjwysocki.net>, "Len Brown" <lenb@kernel.org>, "Erik Kaneda" <erik.kaneda@intel.com>
&gt; 抄送: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>, "devel@acpica.org" <devel@acpica.org>, "Xuefeng Li" <lixuefeng@loongson.cn>, "Jiaxun Yang" <jiaxun.yang@flygoat.com>, "Jianmin Lv" <lvjianmin@loongson.cn>
&gt; 主题: RE: [PATCH 2/3] ACPICA: MADT: Add LoongArch APICs support
&gt; 
&gt; For legal reasons, we can't pre-release any upcoming ACPI spec changes in ACPICA.
That's OK, we can wait.

Huacai
&gt; 
&gt; -----Original Message-----
&gt; From: Huacai Chen <chenhuacai@loongson.cn> 
&gt; Sent: Monday, July 05, 2021 5:42 AM
&gt; To: Rafael J . Wysocki <rjw@rjwysocki.net>; Len Brown <lenb@kernel.org>; Moore, Robert <robert.moore@intel.com>; Erik Kaneda <erik.kaneda@intel.com>
&gt; Cc: linux-acpi@vger.kernel.org; devel@acpica.org; Xuefeng Li <lixuefeng@loongson.cn>; Jiaxun Yang <jiaxun.yang@flygoat.com>; Huacai Chen <chenhuacai@loongson.cn>; Jianmin Lv <lvjianmin@loongson.cn>
&gt; Subject: [PATCH 2/3] ACPICA: MADT: Add LoongArch APICs support
&gt; 
&gt; LoongArch-specific interrupt controllers (similar to APIC) are added in the next revision of ACPI Specification (current revision is 6.4), which including CORE_PIC (CPUINTC), LIO_PIC (LIOINTC), EIO_PIC (EIOINTC), HT_PIC (HTVECINTC), BIO_PIC (PCHINTC), LPC_PIC (PCHLPC) and MSI_PIC (PCHMSI). This patch add their definition and handlings.
&gt; 
&gt; Reference: https://mantis.uefi.org/mantis/view.php?id=2203
&gt; Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
&gt; Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
&gt; ---
&gt;  drivers/acpi/tables.c |  10 ++++
&gt;  include/acpi/actbl2.h | 123 +++++++++++++++++++++++++++++++++++++++++-
&gt;  2 files changed, 132 insertions(+), 1 deletion(-)
&gt; 
&gt; diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index a37a1532a575..5943ae4f76bb 100644
&gt; --- a/drivers/acpi/tables.c
&gt; +++ b/drivers/acpi/tables.c
&gt; @@ -208,6 +208,16 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
&gt;  		}
&gt;  		break;
&gt;  
&gt; +	case ACPI_MADT_TYPE_CORE_PIC:
&gt; +		{
&gt; +			struct acpi_madt_core_pic *p =
&gt; +			    (struct acpi_madt_core_pic *)header;
&gt; +			pr_debug("CORE PIC (processor_id[0x%02x] core_id[0x%02x] %s)\n",
&gt; +				 p-&gt;processor_id, p-&gt;core_id,
&gt; +				 (p-&gt;flags &amp; ACPI_MADT_ENABLED) ? "enabled" : "disabled");
&gt; +		}
&gt; +		break;
&gt; +
&gt;  	default:
&gt;  		pr_warn("Found unsupported MADT entry (type = 0x%x)\n",
&gt;  			header-&gt;type);
&gt; diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 2069ac38a4e2..fd6d0b440c4b 100644
&gt; --- a/include/acpi/actbl2.h
&gt; +++ b/include/acpi/actbl2.h
&gt; @@ -571,7 +571,14 @@ enum acpi_madt_type {
&gt;  	ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
&gt;  	ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
&gt;  	ACPI_MADT_TYPE_MULTIPROC_WAKEUP = 16,
&gt; -	ACPI_MADT_TYPE_RESERVED = 17	/* 17 and greater are reserved */
&gt; +	ACPI_MADT_TYPE_CORE_PIC = 17,
&gt; +	ACPI_MADT_TYPE_LIO_PIC = 18,
&gt; +	ACPI_MADT_TYPE_HT_PIC = 19,
&gt; +	ACPI_MADT_TYPE_EIO_PIC = 20,
&gt; +	ACPI_MADT_TYPE_MSI_PIC = 21,
&gt; +	ACPI_MADT_TYPE_BIO_PIC = 22,
&gt; +	ACPI_MADT_TYPE_LPC_PIC = 23,
&gt; +	ACPI_MADT_TYPE_RESERVED = 24	/* 24 and greater are reserved */
&gt;  };
&gt;  
&gt;  /*
&gt; @@ -801,6 +808,120 @@ struct acpi_madt_multiproc_wakeup_mailbox {
&gt;  
&gt;  #define ACPI_MP_WAKE_COMMAND_WAKEUP    1
&gt;  
&gt; +/* Values for Version field above */
&gt; +
&gt; +enum acpi_madt_core_pic_version {
&gt; +	ACPI_MADT_CORE_PIC_VERSION_NONE = 0,
&gt; +	ACPI_MADT_CORE_PIC_VERSION_V1 = 1,
&gt; +	ACPI_MADT_CORE_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
&gt; +};
&gt; +
&gt; +enum acpi_madt_lio_pic_version {
&gt; +	ACPI_MADT_LIO_PIC_VERSION_NONE = 0,
&gt; +	ACPI_MADT_LIO_PIC_VERSION_V1 = 1,
&gt; +	ACPI_MADT_LIO_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
&gt; +};
&gt; +
&gt; +enum acpi_madt_eio_pic_version {
&gt; +	ACPI_MADT_EIO_PIC_VERSION_NONE = 0,
&gt; +	ACPI_MADT_EIO_PIC_VERSION_V1 = 1,
&gt; +	ACPI_MADT_EIO_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
&gt; +};
&gt; +
&gt; +enum acpi_madt_ht_pic_version {
&gt; +	ACPI_MADT_HT_PIC_VERSION_NONE = 0,
&gt; +	ACPI_MADT_HT_PIC_VERSION_V1 = 1,
&gt; +	ACPI_MADT_HT_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
&gt; +};
&gt; +
&gt; +enum acpi_madt_bio_pic_version {
&gt; +	ACPI_MADT_BIO_PIC_VERSION_NONE = 0,
&gt; +	ACPI_MADT_BIO_PIC_VERSION_V1 = 1,
&gt; +	ACPI_MADT_BIO_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
&gt; +};
&gt; +
&gt; +enum acpi_madt_msi_pic_version {
&gt; +	ACPI_MADT_MSI_PIC_VERSION_NONE = 0,
&gt; +	ACPI_MADT_MSI_PIC_VERSION_V1 = 1,
&gt; +	ACPI_MADT_MSI_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
&gt; +};
&gt; +
&gt; +enum acpi_madt_lpc_pic_version {
&gt; +	ACPI_MADT_LPC_PIC_VERSION_NONE = 0,
&gt; +	ACPI_MADT_LPC_PIC_VERSION_V1 = 1,
&gt; +	ACPI_MADT_LPC_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
&gt; +};
&gt; +
&gt; +/* Core Interrupt Controller */
&gt; +
&gt; +struct acpi_madt_core_pic {
&gt; +	struct acpi_subtable_header header;
&gt; +	u32 processor_id;
&gt; +	u32 core_id;
&gt; +	u32 flags;
&gt; +	u8 version;
&gt; +};
&gt; +
&gt; +/* Legacy I/O Interrupt Controller */
&gt; +
&gt; +struct acpi_madt_lio_pic {
&gt; +	struct acpi_subtable_header header;
&gt; +	u64 address;
&gt; +	u16 size;
&gt; +	u8 cascade[2];
&gt; +	u32 cascade_map[2];
&gt; +	u8 version;
&gt; +};
&gt; +
&gt; +/* Extend I/O Interrupt Controller */
&gt; +
&gt; +struct acpi_madt_eio_pic {
&gt; +	struct acpi_subtable_header header;
&gt; +	u8 cascade;
&gt; +	u8 version;
&gt; +};
&gt; +
&gt; +/* HT Interrupt Controller */
&gt; +
&gt; +struct acpi_madt_ht_pic {
&gt; +	struct acpi_subtable_header header;
&gt; +	u64 address;
&gt; +	u16 size;
&gt; +	u8 cascade[8];
&gt; +	u8 version;
&gt; +};
&gt; +
&gt; +/* Bridge I/O Interrupt Controller */
&gt; +
&gt; +struct acpi_madt_bio_pic {
&gt; +	struct acpi_subtable_header header;
&gt; +	u64 address;
&gt; +	u16 size;
&gt; +	u16 id;
&gt; +	u16 gsi_base;
&gt; +	u8 version;
&gt; +};
&gt; +
&gt; +/* MSI Interrupt Controller */
&gt; +
&gt; +struct acpi_madt_msi_pic {
&gt; +	struct acpi_subtable_header header;
&gt; +	u64 msg_address;
&gt; +	u32 start;
&gt; +	u32 count;
&gt; +	u8 version;
&gt; +};
&gt; +
&gt; +/* LPC Interrupt Controller */
&gt; +
&gt; +struct acpi_madt_lpc_pic {
&gt; +	struct acpi_subtable_header header;
&gt; +	u64 address;
&gt; +	u16 size;
&gt; +	u8 cascade;
&gt; +	u8 version;
&gt; +};
&gt; +
&gt;  /*
&gt;   * Common flags fields for MADT subtables
&gt;   */
&gt; --
&gt; 2.27.0
</chenhuacai@loongson.cn></lvjianmin@loongson.cn></lvjianmin@loongson.cn></chenhuacai@loongson.cn></jiaxun.yang@flygoat.com></lixuefeng@loongson.cn></erik.kaneda@intel.com></robert.moore@intel.com></lenb@kernel.org></rjw@rjwysocki.net></chenhuacai@loongson.cn></lvjianmin@loongson.cn></jiaxun.yang@flygoat.com></lixuefeng@loongson.cn></devel@acpica.org></linux-acpi@vger.kernel.org></erik.kaneda@intel.com></lenb@kernel.org></rjw@rjwysocki.net></chenhuacai@loongson.cn></robert.moore@intel.com>
diff mbox series

Patch

diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index a37a1532a575..5943ae4f76bb 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -208,6 +208,16 @@  void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
 		}
 		break;
 
+	case ACPI_MADT_TYPE_CORE_PIC:
+		{
+			struct acpi_madt_core_pic *p =
+			    (struct acpi_madt_core_pic *)header;
+			pr_debug("CORE PIC (processor_id[0x%02x] core_id[0x%02x] %s)\n",
+				 p->processor_id, p->core_id,
+				 (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
+		}
+		break;
+
 	default:
 		pr_warn("Found unsupported MADT entry (type = 0x%x)\n",
 			header->type);
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 2069ac38a4e2..fd6d0b440c4b 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -571,7 +571,14 @@  enum acpi_madt_type {
 	ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
 	ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
 	ACPI_MADT_TYPE_MULTIPROC_WAKEUP = 16,
-	ACPI_MADT_TYPE_RESERVED = 17	/* 17 and greater are reserved */
+	ACPI_MADT_TYPE_CORE_PIC = 17,
+	ACPI_MADT_TYPE_LIO_PIC = 18,
+	ACPI_MADT_TYPE_HT_PIC = 19,
+	ACPI_MADT_TYPE_EIO_PIC = 20,
+	ACPI_MADT_TYPE_MSI_PIC = 21,
+	ACPI_MADT_TYPE_BIO_PIC = 22,
+	ACPI_MADT_TYPE_LPC_PIC = 23,
+	ACPI_MADT_TYPE_RESERVED = 24	/* 24 and greater are reserved */
 };
 
 /*
@@ -801,6 +808,120 @@  struct acpi_madt_multiproc_wakeup_mailbox {
 
 #define ACPI_MP_WAKE_COMMAND_WAKEUP    1
 
+/* Values for Version field above */
+
+enum acpi_madt_core_pic_version {
+	ACPI_MADT_CORE_PIC_VERSION_NONE = 0,
+	ACPI_MADT_CORE_PIC_VERSION_V1 = 1,
+	ACPI_MADT_CORE_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_lio_pic_version {
+	ACPI_MADT_LIO_PIC_VERSION_NONE = 0,
+	ACPI_MADT_LIO_PIC_VERSION_V1 = 1,
+	ACPI_MADT_LIO_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_eio_pic_version {
+	ACPI_MADT_EIO_PIC_VERSION_NONE = 0,
+	ACPI_MADT_EIO_PIC_VERSION_V1 = 1,
+	ACPI_MADT_EIO_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_ht_pic_version {
+	ACPI_MADT_HT_PIC_VERSION_NONE = 0,
+	ACPI_MADT_HT_PIC_VERSION_V1 = 1,
+	ACPI_MADT_HT_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_bio_pic_version {
+	ACPI_MADT_BIO_PIC_VERSION_NONE = 0,
+	ACPI_MADT_BIO_PIC_VERSION_V1 = 1,
+	ACPI_MADT_BIO_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_msi_pic_version {
+	ACPI_MADT_MSI_PIC_VERSION_NONE = 0,
+	ACPI_MADT_MSI_PIC_VERSION_V1 = 1,
+	ACPI_MADT_MSI_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+enum acpi_madt_lpc_pic_version {
+	ACPI_MADT_LPC_PIC_VERSION_NONE = 0,
+	ACPI_MADT_LPC_PIC_VERSION_V1 = 1,
+	ACPI_MADT_LPC_PIC_VERSION_RESERVED = 2	/* 2 and greater are reserved */
+};
+
+/* Core Interrupt Controller */
+
+struct acpi_madt_core_pic {
+	struct acpi_subtable_header header;
+	u32 processor_id;
+	u32 core_id;
+	u32 flags;
+	u8 version;
+};
+
+/* Legacy I/O Interrupt Controller */
+
+struct acpi_madt_lio_pic {
+	struct acpi_subtable_header header;
+	u64 address;
+	u16 size;
+	u8 cascade[2];
+	u32 cascade_map[2];
+	u8 version;
+};
+
+/* Extend I/O Interrupt Controller */
+
+struct acpi_madt_eio_pic {
+	struct acpi_subtable_header header;
+	u8 cascade;
+	u8 version;
+};
+
+/* HT Interrupt Controller */
+
+struct acpi_madt_ht_pic {
+	struct acpi_subtable_header header;
+	u64 address;
+	u16 size;
+	u8 cascade[8];
+	u8 version;
+};
+
+/* Bridge I/O Interrupt Controller */
+
+struct acpi_madt_bio_pic {
+	struct acpi_subtable_header header;
+	u64 address;
+	u16 size;
+	u16 id;
+	u16 gsi_base;
+	u8 version;
+};
+
+/* MSI Interrupt Controller */
+
+struct acpi_madt_msi_pic {
+	struct acpi_subtable_header header;
+	u64 msg_address;
+	u32 start;
+	u32 count;
+	u8 version;
+};
+
+/* LPC Interrupt Controller */
+
+struct acpi_madt_lpc_pic {
+	struct acpi_subtable_header header;
+	u64 address;
+	u16 size;
+	u8 cascade;
+	u8 version;
+};
+
 /*
  * Common flags fields for MADT subtables
  */