Skip to contentSkip to conversation

mrst_pmu: driver for Intel Moorestown Power Management Unit

PATCH Superseded Len Brown 2 participants 13 messages Jul 13, 2011 – Aug 3, 2011 x86

lore
Share & tools
lore

Len Brown

author
#0 lore raw

PATCH 1/1 mrst_pmu: driver for Intel Moorestown Power Management Unit

From: Len Brown <[email protected]>

The Moorestown (MRST) Power Management Unit (PMU) driver directs the SOC power states in the "Langwell" south complex (SCU).

It hooks pci_platform_pm_ops[] and thus observes all PCI ".set_state" requests. For devices in the SC, the pmu driver translates those PCI requests into the appropriate commands for the SCU.

The PMU driver helps implement S0i3, a deep system idle power idle state. Entry into S0i3 is via cpuidle, just like regular processor c-states. S0i3 depends on pre-conditions including uni-processor, graphics off, and certain IO devices in the SC must be off. If those pre-conditions are met, then the PMU allows cpuidle to enter S0i3, otherwise such requests are demoted to Atom C6.

This driver is based on prototype work by Bruce Flemming, Illyas Mansoor, Rajeev D. Muralidhar and Vishwesh M. Rudramuni. It includes contributions from H. Peter Anvin, Arjan van de Ven, Kristen Accardi, and Yong Wang.

---
 MAINTAINERS                     |    6 +
 arch/x86/platform/mrst/Makefile |    1 +
 arch/x86/platform/mrst/pmu.c    |  814 +++++++++++++++++++++++++++++++++++++++
 arch/x86/platform/mrst/pmu.h    |  234 +++++++++++
 4 files changed, 1055 insertions(+), 0 deletions(-)
 create mode 100644 arch/x86/platform/mrst/pmu.c
 create mode 100644 arch/x86/platform/mrst/pmu.h
MAINTAINERS +6 -0
index 187282d..d37b387 100644
@@ -3344,6 +3344,12 @@ F:	drivers/net/ixgb/
 F:	drivers/net/ixgbe/
 F:	drivers/net/ixgbevf/
 
+INTEL MRST PMU DRIVER
+M:	Len Brown <[email protected]>
+L:	[email protected]
+S:	Supported
+F:	arch/x86/platform/mrst/pmu.*
+
 INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
 L:	[email protected]
 S:	Orphan
arch/x86/platform/mrst/Makefile +1 -0
index f61ccdd..1ea3877 100644
@@ -1,3 +1,4 @@
 obj-$(CONFIG_X86_MRST)		+= mrst.o
 obj-$(CONFIG_X86_MRST)		+= vrtc.o
 obj-$(CONFIG_EARLY_PRINTK_MRST)	+= early_printk_mrst.o
+obj-$(CONFIG_X86_MRST)		+= pmu.o
arch/x86/platform/mrst/pmu.c new file +814 -0

814 lines not on this page · raw message

arch/x86/platform/mrst/pmu.h new file +234 -0

234 lines not on this page · raw message

Signature · 1 line
1.7.4.4
#1 lore raw
Quoted 6 lines
arch/x86/platform/mrst/pmu.c new file +6 -0
+static struct mrst_device *pci_id_2_mrst_dev(u16 pci_dev_num)
+{
+	int index;
+
+	if ((pci_dev_num >= 0x0800) && (pci_dev_num <= 0x815))
+		index = pci_dev_num - 0x800;

arch/x86/platform/mrst/pmu.c line 123

Quoted 10 lines
arch/x86/platform/mrst/pmu.c new file +10 -0
+	else if (pci_dev_num == 0x084F)
+		index = 22;
+	else if (pci_dev_num == 0x4102)
+		index = 23;
+	else if (pci_dev_num == 0x4110)
+		index = 24;
+	else
+		BUG();
+
+	BUG_ON(pci_dev_num != mrst_devs[index].pci_dev_num);

That strikes me as needlessly unfriendly, you could warn/return NULL and propogate a WARN_ONCE back to the user.

Quoted 24 lines
arch/x86/platform/mrst/pmu.c new file +24 -0
+static int __init scu_fw_check(void)
+{
+	int ret;
+	u32 fw_version;
+
+	sfi_table_parse("OEMB", NULL, NULL, pmu_sfi_parse_oem);
+
+	if (ia_major < 0x6005 || ia_minor < 0x1525) {
+		WARN(1, "mrst_pmu: IA FW version too old\n");
+		return -1;
+	}
+
+	ret = intel_scu_ipc_command(IPCMSG_FW_REVISION, 0, NULL, 0,
+					&fw_version, 1);
+
+	if (ret) {
+		WARN(1, "mrst_pmu: IPC FW version? %d\n", ret);
+	} else {
+		int scu_major = (fw_version >> 8) & 0xFF;
+		int scu_minor = (fw_version >> 0) & 0xFF;
+
+		printk(KERN_INFO "mrst_pmu: firmware v%x\n", fw_version);
+
+		if ((scu_major >= 0xC0) && (scu_minor >= 0x49)) {

arch/x86/platform/mrst/pmu.c line 813

Quoted 10 lines
arch/x86/platform/mrst/pmu.c new file +10 -0
+			printk(KERN_INFO "mrst_pmu: enabling S0i3\n");
+			mrst_pmu_s0i3_enable = true;
+		} else {
+			WARN(1, "mrst_pmu: S0i3 disabled, old firmware %X.%X",
+					scu_major, scu_minor);
+		}
+	}
+	return 0;
+}
+late_initcall(scu_fw_check);

NAK. I pointed this problem with the driver to you way back - this code gets run always - even on machines that are not in fact Moorestown which are then going to crash.

You need to check that the platform is Moorestown (not just the CPU either because of Oaktrail)

#2 lore raw
In reply to Len Brown
Quoted 6 lines
arch/x86/platform/mrst/pmu.c new file +6 -0
+static struct mrst_device *pci_id_2_mrst_dev(u16 pci_dev_num)
+{
+	int index;
+
+	if ((pci_dev_num >= 0x0800) && (pci_dev_num <= 0x815))
+		index = pci_dev_num - 0x800;

arch/x86/platform/mrst/pmu.c line 123

Quoted 10 lines
arch/x86/platform/mrst/pmu.c new file +10 -0
+	else if (pci_dev_num == 0x084F)
+		index = 22;
+	else if (pci_dev_num == 0x4102)
+		index = 23;
+	else if (pci_dev_num == 0x4110)
+		index = 24;
+	else
+		BUG();
+
+	BUG_ON(pci_dev_num != mrst_devs[index].pci_dev_num);

That strikes me as needlessly unfriendly, you could warn/return NULL and propogate a WARN_ONCE back to the user.

Quoted 24 lines
arch/x86/platform/mrst/pmu.c new file +24 -0
+static int __init scu_fw_check(void)
+{
+	int ret;
+	u32 fw_version;
+
+	sfi_table_parse("OEMB", NULL, NULL, pmu_sfi_parse_oem);
+
+	if (ia_major < 0x6005 || ia_minor < 0x1525) {
+		WARN(1, "mrst_pmu: IA FW version too old\n");
+		return -1;
+	}
+
+	ret = intel_scu_ipc_command(IPCMSG_FW_REVISION, 0, NULL, 0,
+					&fw_version, 1);
+
+	if (ret) {
+		WARN(1, "mrst_pmu: IPC FW version? %d\n", ret);
+	} else {
+		int scu_major = (fw_version >> 8) & 0xFF;
+		int scu_minor = (fw_version >> 0) & 0xFF;
+
+		printk(KERN_INFO "mrst_pmu: firmware v%x\n", fw_version);
+
+		if ((scu_major >= 0xC0) && (scu_minor >= 0x49)) {

arch/x86/platform/mrst/pmu.c line 813

Quoted 10 lines
arch/x86/platform/mrst/pmu.c new file +10 -0
+			printk(KERN_INFO "mrst_pmu: enabling S0i3\n");
+			mrst_pmu_s0i3_enable = true;
+		} else {
+			WARN(1, "mrst_pmu: S0i3 disabled, old firmware %X.%X",
+					scu_major, scu_minor);
+		}
+	}
+	return 0;
+}
+late_initcall(scu_fw_check);

NAK. I pointed this problem with the driver to you way back - this code gets run always - even on machines that are not in fact Moorestown which are then going to crash.

You need to check that the platform is Moorestown (not just the CPU either because of Oaktrail)

author
#3 lore raw
Quoted 2 lines
Quoted 2 lines
(quoted diff) +2 -0
+static struct mrst_device *pci_id_2_mrst_dev(u16 pci_dev_num)
+{

...

Quoted 7 lines

arch/x86/platform/mrst/pmu.c line 123

Quoted 4 lines
arch/x86/platform/mrst/pmu.c new file +4 -0
+	else
+		BUG();
+
+	BUG_ON(pci_dev_num != mrst_devs[index].pci_dev_num);

That strikes me as needlessly unfriendly, you could warn/return NULL and propogate a WARN_ONCE back to the user.

This code asserts that the firmware is correct, and today it is. If somebody breaks the firmware in the future, I want them to discover it the instant they break it. If I had the option of shooting lazer beams out of the system to instantly kill the firmware programmer, I'd do it. But alas, I have to settle for crashing their system:-)

Quoted 1 line
Quoted 1 line

+static int __init scu_fw_check(void)

	if (!mrst_pmu)
		return 0;
Quoted 8 lines
Quoted 1 line

+late_initcall(scu_fw_check);

NAK. I pointed this problem with the driver to you way back - this code gets run always - even on machines that are not in fact Moorestown which are then going to crash.

You need to check that the platform is Moorestown (not just the CPU either because of Oaktrail)

Right-o. I think the 1-liner to check mrst_pmu above should do it.

thanks for reading, and sorry for being a slow listener, -Len

author
#4 lore raw
In reply to Alan Cox
Quoted 2 lines
Quoted 2 lines
(quoted diff) +2 -0
+static struct mrst_device *pci_id_2_mrst_dev(u16 pci_dev_num)
+{

...

Quoted 7 lines

arch/x86/platform/mrst/pmu.c line 123

Quoted 4 lines
arch/x86/platform/mrst/pmu.c new file +4 -0
+	else
+		BUG();
+
+	BUG_ON(pci_dev_num != mrst_devs[index].pci_dev_num);

That strikes me as needlessly unfriendly, you could warn/return NULL and propogate a WARN_ONCE back to the user.

This code asserts that the firmware is correct, and today it is. If somebody breaks the firmware in the future, I want them to discover it the instant they break it. If I had the option of shooting lazer beams out of the system to instantly kill the firmware programmer, I'd do it. But alas, I have to settle for crashing their system:-)

Quoted 1 line
Quoted 1 line

+static int __init scu_fw_check(void)

	if (!mrst_pmu)
		return 0;
Quoted 8 lines
Quoted 1 line

+late_initcall(scu_fw_check);

NAK. I pointed this problem with the driver to you way back - this code gets run always - even on machines that are not in fact Moorestown which are then going to crash.

You need to check that the platform is Moorestown (not just the CPU either because of Oaktrail)

Right-o. I think the 1-liner to check mrst_pmu above should do it.

thanks for reading, and sorry for being a slow listener, -Len

author
#5 lore raw
In reply to Alan Cox
Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +1 -0
+	BUG_ON(pci_dev_num != mrst_devs[index].pci_dev_num);

That strikes me as needlessly unfriendly, you could warn/return NULL and propogate a WARN_ONCE back to the user.

If a fit of friendlyness, I wrote the patch below. Let me know if it is not what you had in mind.

thanks
-Len

Quoted 1 line

From 0f72ff0114695d48ecdd7270998148d61236341d Mon Sep 17 00:00:00 2001

From: Len Brown <[email protected]>
Date: Mon, 1 Aug 2011 11:13:37 -0400
Subject: [PATCH] msrt_pmu: add friendly firmware debugging code

MRST firmware has already been debugged, but this patch makes the kernel fail more gently should somebody break it in the future by inventing a device that is not in the SOC.

---
 arch/x86/platform/mrst/pmu.c |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)
arch/x86/platform/mrst/pmu.c +25 -5
index f8c6d8f..ee3afb1 100644
@@ -96,7 +96,7 @@ static u32 pmu_set_power_state_send_cmd;
 
 static struct mrst_device *pci_id_2_mrst_dev(u16 pci_dev_num)
 {
-	int index;
+	int index = 0;
 
 	if ((pci_dev_num >= 0x0800) && (pci_dev_num <= 0x815))
 		index = pci_dev_num - 0x800;
@@ -106,10 +106,11 @@ static struct mrst_device *pci_id_2_mrst_dev(u16 pci_dev_num)
 		index = 23;
 	else if (pci_dev_num == 0x4110)
 		index = 24;
-	else
-		BUG();
 
-	BUG_ON(pci_dev_num != mrst_devs[index].pci_dev_num);
+	if (pci_dev_num != mrst_devs[index].pci_dev_num) {
+		WARN_ONCE(1, FW_BUG "Unknown PCI device 0x%04X\n", pci_dev_num);
+		return 0;
+	}
 
 	return &mrst_devs[index];
 }
@@ -356,7 +357,13 @@ static u16 pmu_min_lss_pci_req(u16 *ids, u16 pci_state)
 	int i;
 
 	for (i = 0; ids[i]; ++i) {
-		existing_request = pci_id_2_mrst_dev(ids[i])->latest_request;
+		struct mrst_device *mrst_dev;
+
+		mrst_dev = pci_id_2_mrst_dev(ids[i]);
+		if (unlikely(!mrst_dev))
+			continue;
+
+		existing_request = mrst_dev->latest_request;
 		if (existing_request < pci_state)
 			pci_state = existing_request;
 	}
@@ -380,6 +387,9 @@ int pmu_pci_set_power_state(struct pci_dev *pdev, pci_power_t pci_state)
 	BUG_ON(pci_state < PCI_D0 || pci_state > PCI_D3cold);
 
 	mrst_dev = pci_id_2_mrst_dev(pdev->device);
+	if (unlikely(!mrst_dev))
+		return -ENODEV;
+
 	mrst_dev->pci_state_counts[pci_state]++;	/* count invocations */
 
 	/* PMU driver calls self as part of PCI initialization, ignore */
@@ -499,6 +509,10 @@ static int debug_mrst_pmu_show(struct seq_file *s, void *unused)
 			pdev->vendor, pdev->device,
 			dev_driver_string(&pdev->dev));
 
+		if (unlikely (!mrst_dev)) {
+			seq_printf(s, " UNKNOWN\n");
+			continue;
+		}
 
 		if (mrst_dev->lss)
 			seq_printf(s, "LSS %2d %-4s ", mrst_dev->lss,
@@ -598,6 +612,12 @@ static void pmu_scu_firmware_debug(void)
 		int pos;
 
 		mrst_dev = pci_id_2_mrst_dev(pdev->device);
+		if (unlikely(!mrst_dev)) {
+			printk(KERN_ERR FW_BUG "pmu: Unknown "
+				"PCI device 0x%04X\n", pdev->device);
+			continue;
+		}
+
 		if (mrst_dev->lss == 0)
 			continue;	 /* no LSS in our table */
 
Signature · 1 line
1.7.4.4
author
#6 lore raw
In reply to Alan Cox
Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +1 -0
+	BUG_ON(pci_dev_num != mrst_devs[index].pci_dev_num);

That strikes me as needlessly unfriendly, you could warn/return NULL and propogate a WARN_ONCE back to the user.

If a fit of friendlyness, I wrote the patch below. Let me know if it is not what you had in mind.

thanks
-Len

Quoted 1 line

From 0f72ff0114695d48ecdd7270998148d61236341d Mon Sep 17 00:00:00 2001

From: Len Brown <[email protected]>
Date: Mon, 1 Aug 2011 11:13:37 -0400
Subject: [PATCH] msrt_pmu: add friendly firmware debugging code

MRST firmware has already been debugged, but this patch makes the kernel fail more gently should somebody break it in the future by inventing a device that is not in the SOC.

---
 arch/x86/platform/mrst/pmu.c |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)
arch/x86/platform/mrst/pmu.c +25 -5
index f8c6d8f..ee3afb1 100644
@@ -96,7 +96,7 @@ static u32 pmu_set_power_state_send_cmd;
 
 static struct mrst_device *pci_id_2_mrst_dev(u16 pci_dev_num)
 {
-	int index;
+	int index = 0;
 
 	if ((pci_dev_num >= 0x0800) && (pci_dev_num <= 0x815))
 		index = pci_dev_num - 0x800;
@@ -106,10 +106,11 @@ static struct mrst_device *pci_id_2_mrst_dev(u16 pci_dev_num)
 		index = 23;
 	else if (pci_dev_num == 0x4110)
 		index = 24;
-	else
-		BUG();
 
-	BUG_ON(pci_dev_num != mrst_devs[index].pci_dev_num);
+	if (pci_dev_num != mrst_devs[index].pci_dev_num) {
+		WARN_ONCE(1, FW_BUG "Unknown PCI device 0x%04X\n", pci_dev_num);
+		return 0;
+	}
 
 	return &mrst_devs[index];
 }
@@ -356,7 +357,13 @@ static u16 pmu_min_lss_pci_req(u16 *ids, u16 pci_state)
 	int i;
 
 	for (i = 0; ids[i]; ++i) {
-		existing_request = pci_id_2_mrst_dev(ids[i])->latest_request;
+		struct mrst_device *mrst_dev;
+
+		mrst_dev = pci_id_2_mrst_dev(ids[i]);
+		if (unlikely(!mrst_dev))
+			continue;
+
+		existing_request = mrst_dev->latest_request;
 		if (existing_request < pci_state)
 			pci_state = existing_request;
 	}
@@ -380,6 +387,9 @@ int pmu_pci_set_power_state(struct pci_dev *pdev, pci_power_t pci_state)
 	BUG_ON(pci_state < PCI_D0 || pci_state > PCI_D3cold);
 
 	mrst_dev = pci_id_2_mrst_dev(pdev->device);
+	if (unlikely(!mrst_dev))
+		return -ENODEV;
+
 	mrst_dev->pci_state_counts[pci_state]++;	/* count invocations */
 
 	/* PMU driver calls self as part of PCI initialization, ignore */
@@ -499,6 +509,10 @@ static int debug_mrst_pmu_show(struct seq_file *s, void *unused)
 			pdev->vendor, pdev->device,
 			dev_driver_string(&pdev->dev));
 
+		if (unlikely (!mrst_dev)) {
+			seq_printf(s, " UNKNOWN\n");
+			continue;
+		}
 
 		if (mrst_dev->lss)
 			seq_printf(s, "LSS %2d %-4s ", mrst_dev->lss,
@@ -598,6 +612,12 @@ static void pmu_scu_firmware_debug(void)
 		int pos;
 
 		mrst_dev = pci_id_2_mrst_dev(pdev->device);
+		if (unlikely(!mrst_dev)) {
+			printk(KERN_ERR FW_BUG "pmu: Unknown "
+				"PCI device 0x%04X\n", pdev->device);
+			continue;
+		}
+
 		if (mrst_dev->lss == 0)
 			continue;	 /* no LSS in our table */
 
Signature · 1 line
1.7.4.4
#7 lore raw
Quoted 8 lines · On Mon, 01 Aug 2011 11:24:45 -0400 (EDT) Len Brown <[email protected]> wrote:
Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +1 -0
+	BUG_ON(pci_dev_num != mrst_devs[index].pci_dev_num);

That strikes me as needlessly unfriendly, you could warn/return NULL and propogate a WARN_ONCE back to the user.

If a fit of friendlyness, I wrote the patch below. Let me know if it is not what you had in mind.

It's not so much the bug on as the fact it spews these if you boot it on a non mrst box built with a generic kernel - which was the second part of my comment and doesn't appear addressed.

#8 lore raw
In reply to Len Brown
Quoted 8 lines · On Mon, 01 Aug 2011 11:24:45 -0400 (EDT) Len Brown <[email protected]> wrote:
Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +1 -0
+	BUG_ON(pci_dev_num != mrst_devs[index].pci_dev_num);

That strikes me as needlessly unfriendly, you could warn/return NULL and propogate a WARN_ONCE back to the user.

If a fit of friendlyness, I wrote the patch below. Let me know if it is not what you had in mind.

It's not so much the bug on as the fact it spews these if you boot it on a non mrst box built with a generic kernel - which was the second part of my comment and doesn't appear addressed.

author
#9 lore raw

PATCH v2 1/1 mrst_pmu: driver for Intel Moorestown Power Management Unit

In reply to Len Brown

From: Len Brown <[email protected]>

The Moorestown (MRST) Power Management Unit (PMU) driver directs the SOC power states in the "Langwell" south complex (SCU).

It hooks pci_platform_pm_ops[] and thus observes all PCI ".set_state" requests. For devices in the SC, the pmu driver translates those PCI requests into the appropriate commands for the SCU.

The PMU driver helps implement S0i3, a deep system idle power idle state. Entry into S0i3 is via cpuidle, just like regular processor c-states. S0i3 depends on pre-conditions including uni-processor, graphics off, and certain IO devices in the SC must be off. If those pre-conditions are met, then the PMU allows cpuidle to enter S0i3, otherwise such requests are demoted, either to Atom C4 or Atom C6.

This driver is based on prototype work by Bruce Flemming, Illyas Mansoor, Rajeev D. Muralidhar, Vishwesh M. Rudramuni, Hari Seshadri and Sujith Thomas. The current driver also includes contributions from H. Peter Anvin, Arjan van de Ven, Kristen Accardi, and Yong Wang.

Thanks for additional review feedback from Alan Cox and Randy Dunlap.

---
This driver is essentially platform-speciif idle code. It has been in linux-next via my idle-test tree, and I can push it via that tree route w/ appropriate acks.

There are additional bits needed to use this driver, including platform-specific PCI hooks, and platform-specific S0i3 assembly language.

 MAINTAINERS                     |    6 +
 arch/x86/platform/mrst/Makefile |    1 +
 arch/x86/platform/mrst/pmu.c    |  817 +++++++++++++++++++++++++++++++++++++++
 arch/x86/platform/mrst/pmu.h    |  234 +++++++++++
 4 files changed, 1058 insertions(+), 0 deletions(-)
 create mode 100644 arch/x86/platform/mrst/pmu.c
 create mode 100644 arch/x86/platform/mrst/pmu.h
MAINTAINERS +6 -0
index 187282d..d37b387 100644
@@ -3344,6 +3344,12 @@ F:	drivers/net/ixgb/
 F:	drivers/net/ixgbe/
 F:	drivers/net/ixgbevf/
 
+INTEL MRST PMU DRIVER
+M:	Len Brown <[email protected]>
+L:	[email protected]
+S:	Supported
+F:	arch/x86/platform/mrst/pmu.*
+
 INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
 L:	[email protected]
 S:	Orphan
arch/x86/platform/mrst/Makefile +1 -0
index f61ccdd..1ea3877 100644
@@ -1,3 +1,4 @@
 obj-$(CONFIG_X86_MRST)		+= mrst.o
 obj-$(CONFIG_X86_MRST)		+= vrtc.o
 obj-$(CONFIG_EARLY_PRINTK_MRST)	+= early_printk_mrst.o
+obj-$(CONFIG_X86_MRST)		+= pmu.o
arch/x86/platform/mrst/pmu.c new file +817 -0

817 lines not on this page · raw message

arch/x86/platform/mrst/pmu.h new file +234 -0

234 lines not on this page · raw message

Signature · 1 line
1.7.6.396.ge0613
author
#10 lore raw

PATCH v2 1/1 mrst_pmu: driver for Intel Moorestown Power Management Unit

In reply to Len Brown

From: Len Brown <[email protected]>

The Moorestown (MRST) Power Management Unit (PMU) driver directs the SOC power states in the "Langwell" south complex (SCU).

It hooks pci_platform_pm_ops[] and thus observes all PCI ".set_state" requests. For devices in the SC, the pmu driver translates those PCI requests into the appropriate commands for the SCU.

The PMU driver helps implement S0i3, a deep system idle power idle state. Entry into S0i3 is via cpuidle, just like regular processor c-states. S0i3 depends on pre-conditions including uni-processor, graphics off, and certain IO devices in the SC must be off. If those pre-conditions are met, then the PMU allows cpuidle to enter S0i3, otherwise such requests are demoted, either to Atom C4 or Atom C6.

This driver is based on prototype work by Bruce Flemming, Illyas Mansoor, Rajeev D. Muralidhar, Vishwesh M. Rudramuni, Hari Seshadri and Sujith Thomas. The current driver also includes contributions from H. Peter Anvin, Arjan van de Ven, Kristen Accardi, and Yong Wang.

Thanks for additional review feedback from Alan Cox and Randy Dunlap.

---
This driver is essentially platform-speciif idle code. It has been in linux-next via my idle-test tree, and I can push it via that tree route w/ appropriate acks.

There are additional bits needed to use this driver, including platform-specific PCI hooks, and platform-specific S0i3 assembly language.

 MAINTAINERS                     |    6 +
 arch/x86/platform/mrst/Makefile |    1 +
 arch/x86/platform/mrst/pmu.c    |  817 +++++++++++++++++++++++++++++++++++++++
 arch/x86/platform/mrst/pmu.h    |  234 +++++++++++
 4 files changed, 1058 insertions(+), 0 deletions(-)
 create mode 100644 arch/x86/platform/mrst/pmu.c
 create mode 100644 arch/x86/platform/mrst/pmu.h
MAINTAINERS +6 -0
index 187282d..d37b387 100644
@@ -3344,6 +3344,12 @@ F:	drivers/net/ixgb/
 F:	drivers/net/ixgbe/
 F:	drivers/net/ixgbevf/
 
+INTEL MRST PMU DRIVER
+M:	Len Brown <[email protected]>
+L:	[email protected]
+S:	Supported
+F:	arch/x86/platform/mrst/pmu.*
+
 INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
 L:	[email protected]
 S:	Orphan
arch/x86/platform/mrst/Makefile +1 -0
index f61ccdd..1ea3877 100644
@@ -1,3 +1,4 @@
 obj-$(CONFIG_X86_MRST)		+= mrst.o
 obj-$(CONFIG_X86_MRST)		+= vrtc.o
 obj-$(CONFIG_EARLY_PRINTK_MRST)	+= early_printk_mrst.o
+obj-$(CONFIG_X86_MRST)		+= pmu.o
arch/x86/platform/mrst/pmu.c new file +817 -0

817 lines not on this page · raw message

arch/x86/platform/mrst/pmu.h new file +234 -0

234 lines not on this page · raw message

Signature · 1 line
1.7.6.396.ge0613
Acked-by on v2 1/1
#11 lore raw
Quoted 3 lines

This driver is essentially platform-speciif idle code. It has been in linux-next via my idle-test tree, and I can push it via that tree route w/ appropriate acks.

Looks good to me