* [PATCH 2/9] i7300_idle: Cleanup based review comments
2008-10-25 8:13 ` [PATCH 1/9] i7300_idle: Disable ioat channel only on platforms where ile driver can load Len Brown
@ 2008-10-25 8:13 ` Len Brown
2008-10-25 8:13 ` [PATCH 3/9] i7300_idle: Fix compile warning CONFIG_I7300_IDLE_IOAT_CHANNEL not defined Len Brown
` (6 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2008-10-25 8:13 UTC (permalink / raw)
To: linux-acpi; +Cc: Venki Pallipadi, Len Brown
From: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Cleanup of i7300 idle driver based on review comments from Randy Dunlap,
Andi Kleen and Len Brown.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/Kconfig | 11 ++++++-----
drivers/idle/i7300_idle.c | 33 ++++++++++++++++++---------------
2 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/drivers/idle/Kconfig b/drivers/idle/Kconfig
index f5b26dd..108264d 100644
--- a/drivers/idle/Kconfig
+++ b/drivers/idle/Kconfig
@@ -5,12 +5,13 @@ config I7300_IDLE_IOAT_CHANNEL
bool
config I7300_IDLE
- tristate "Intel chipset idle power saving driver"
+ tristate "Intel chipset idle memory power saving driver"
select I7300_IDLE_IOAT_CHANNEL
- depends on X86_64
+ depends on X86_64 && EXPERIMENTAL
help
- Enable idle power savings with certain Intel server chipsets.
- The chipset must have I/O AT support, such as the Intel 7300.
- The power savings depends on the type and quantity of DRAM devices.
+ Enable memory power savings when idle with certain Intel server
+ chipsets. The chipset must have I/O AT support, such as the
+ Intel 7300. The power savings depends on the type and quantity of
+ DRAM devices.
endmenu
diff --git a/drivers/idle/i7300_idle.c b/drivers/idle/i7300_idle.c
index 79d47f2..fb176f6 100644
--- a/drivers/idle/i7300_idle.c
+++ b/drivers/idle/i7300_idle.c
@@ -35,6 +35,8 @@
#define I7300_IDLE_DRIVER_VERSION "1.55"
#define I7300_PRINT "i7300_idle:"
+#define MAX_STOP_RETRIES 10
+
static int debug;
module_param_named(debug, debug, uint, 0644);
MODULE_PARM_DESC(debug, "Enable debug printks in this driver");
@@ -47,12 +49,12 @@ MODULE_PARM_DESC(debug, "Enable debug printks in this driver");
* 0 = No throttling
* 1 = Throttle when > 4 activations per eval window (Maximum throttling)
* 2 = Throttle when > 8 activations
- * 168 = Throttle when > 168 activations (Minimum throttling)
+ * 168 = Throttle when > 672 activations (Minimum throttling)
*/
-#define MAX_THRTLWLIMIT 168
-static uint i7300_idle_thrtlowlm = 1;
-module_param_named(thrtlwlimit, i7300_idle_thrtlowlm, uint, 0644);
-MODULE_PARM_DESC(thrtlwlimit,
+#define MAX_THROTTLE_LOW_LIMIT 168
+static uint throttle_low_limit = 1;
+module_param_named(throttle_low_limit, throttle_low_limit, uint, 0644);
+MODULE_PARM_DESC(throttle_low_limit,
"Value for THRTLOWLM activation field "
"(0 = disable throttle, 1 = Max throttle, 168 = Min throttle)");
@@ -111,9 +113,9 @@ static int i7300_idle_ioat_start(void)
static void i7300_idle_ioat_stop(void)
{
int i;
- u8 sts;
+ u64 sts;
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < MAX_STOP_RETRIES; i++) {
writeb(IOAT_CHANCMD_RESET,
ioat_chanbase + IOAT1_CHANCMD_OFFSET);
@@ -127,9 +129,10 @@ static void i7300_idle_ioat_stop(void)
}
- if (i == 5)
- dprintk("failed to suspend+reset I/O AT after 5 retries\n");
-
+ if (i == MAX_STOP_RETRIES) {
+ dprintk("failed to stop I/O AT after %d retries\n",
+ MAX_STOP_RETRIES);
+ }
}
/* Test I/O AT by copying 1024 byte from 2k to 1k */
@@ -276,7 +279,7 @@ static void __exit i7300_idle_ioat_exit(void)
i7300_idle_ioat_stop();
/* Wait for a while for the channel to halt before releasing */
- for (i = 0; i < 10; i++) {
+ for (i = 0; i < MAX_STOP_RETRIES; i++) {
writeb(IOAT_CHANCMD_RESET,
ioat_chanbase + IOAT1_CHANCMD_OFFSET);
@@ -390,9 +393,9 @@ static void i7300_idle_start(void)
new_ctl = i7300_idle_thrtctl_saved & ~DIMM_THRTCTL_THRMHUNT;
pci_write_config_byte(fbd_dev, DIMM_THRTCTL, new_ctl);
- limit = i7300_idle_thrtlowlm;
- if (unlikely(limit > MAX_THRTLWLIMIT))
- limit = MAX_THRTLWLIMIT;
+ limit = throttle_low_limit;
+ if (unlikely(limit > MAX_THROTTLE_LOW_LIMIT))
+ limit = MAX_THROTTLE_LOW_LIMIT;
pci_write_config_byte(fbd_dev, DIMM_THRTLOW, limit);
@@ -441,7 +444,7 @@ static int i7300_idle_notifier(struct notifier_block *nb, unsigned long val,
static ktime_t idle_begin_time;
static int time_init = 1;
- if (!i7300_idle_thrtlowlm)
+ if (!throttle_low_limit)
return 0;
if (unlikely(time_init)) {
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 3/9] i7300_idle: Fix compile warning CONFIG_I7300_IDLE_IOAT_CHANNEL not defined
2008-10-25 8:13 ` [PATCH 1/9] i7300_idle: Disable ioat channel only on platforms where ile driver can load Len Brown
2008-10-25 8:13 ` [PATCH 2/9] i7300_idle: Cleanup based review comments Len Brown
@ 2008-10-25 8:13 ` Len Brown
2008-10-25 8:13 ` [PATCH 4/9] ACPI: cpufreq, processor: fix compile error in drivers/acpi/processor_perflib.c Len Brown
` (5 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2008-10-25 8:13 UTC (permalink / raw)
To: linux-acpi; +Cc: Venki Pallipadi, Len Brown
From: Venki Pallipadi <venkatesh.pallipadi@intel.com>
When I7300_idle driver is not configured, there is a compile time
warning about IDLE_IOAT_CHANNEL not defined. Fix it.
Reported-by: Suresh Siddha <suresh.b.siddha@intel.com>
Reported-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/dma/ioat_dma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c
index fd1631d..c6d0ca2 100644
--- a/drivers/dma/ioat_dma.c
+++ b/drivers/dma/ioat_dma.c
@@ -172,7 +172,7 @@ static int ioat_dma_enumerate_channels(struct ioatdma_device *device)
xfercap_scale = readb(device->reg_base + IOAT_XFERCAP_OFFSET);
xfercap = (xfercap_scale == 0 ? -1 : (1UL << xfercap_scale));
-#if CONFIG_I7300_IDLE_IOAT_CHANNEL
+#ifdef CONFIG_I7300_IDLE_IOAT_CHANNEL
if (i7300_idle_platform_probe(NULL, NULL) == 0) {
device->common.chancnt--;
}
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 4/9] ACPI: cpufreq, processor: fix compile error in drivers/acpi/processor_perflib.c
2008-10-25 8:13 ` [PATCH 1/9] i7300_idle: Disable ioat channel only on platforms where ile driver can load Len Brown
2008-10-25 8:13 ` [PATCH 2/9] i7300_idle: Cleanup based review comments Len Brown
2008-10-25 8:13 ` [PATCH 3/9] i7300_idle: Fix compile warning CONFIG_I7300_IDLE_IOAT_CHANNEL not defined Len Brown
@ 2008-10-25 8:13 ` Len Brown
2008-10-25 8:13 ` [PATCH 5/9] ACPI: Always report a sync event after a lid state change Len Brown
` (4 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2008-10-25 8:13 UTC (permalink / raw)
To: linux-acpi; +Cc: Miao Xie, Len Brown
From: Miao Xie <miaox@cn.fujitsu.com>
When trying to build 2.6.28-rc1 on ia64, make aborts with:
CC drivers/acpi/processor_perflib.o
drivers/acpi/processor_perflib.c:41:28: error: asm/cpufeature.h: No such file or directory
drivers/acpi/processor_perflib.c: In function ‘acpi_processor_get_performance_info’:
drivers/acpi/processor_perflib.c:364: error: implicit declaration of function ‘boot_cpu_has’
drivers/acpi/processor_perflib.c:364: error: ‘X86_FEATURE_EST’ undeclared (first use in this function)
drivers/acpi/processor_perflib.c:364: error: (Each undeclared identifier is reported only once
drivers/acpi/processor_perflib.c:364: error: for each function it appears in.)
make[2]: *** [drivers/acpi/processor_perflib.o] Error 1
make[1]: *** [drivers/acpi] Error 2
make: *** [drivers] Error 2
this patch fix it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Acked-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/processor_perflib.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index dc98f7a..dbcf260 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -38,7 +38,10 @@
#include <asm/uaccess.h>
#endif
+
+#ifdef CONFIG_X86
#include <asm/cpufeature.h>
+#endif
#include <acpi/acpi_bus.h>
#include <acpi/processor.h>
@@ -360,11 +363,13 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)
* the BIOS is older than the CPU and does not know its frequencies
*/
update_bios:
+#ifdef CONFIG_X86
if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){
if(boot_cpu_has(X86_FEATURE_EST))
printk(KERN_WARNING FW_BUG "BIOS needs update for CPU "
"frequency support\n");
}
+#endif
return result;
}
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 5/9] ACPI: Always report a sync event after a lid state change
2008-10-25 8:13 ` [PATCH 1/9] i7300_idle: Disable ioat channel only on platforms where ile driver can load Len Brown
` (2 preceding siblings ...)
2008-10-25 8:13 ` [PATCH 4/9] ACPI: cpufreq, processor: fix compile error in drivers/acpi/processor_perflib.c Len Brown
@ 2008-10-25 8:13 ` Len Brown
2008-10-25 8:13 ` [PATCH 6/9] toshiba_acpi: always call input_sync() after input_report_switch() Len Brown
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2008-10-25 8:13 UTC (permalink / raw)
To: linux-acpi; +Cc: Guillem Jover, Len Brown
From: Guillem Jover <guillem.jover@nokia.com>
Currently not always an EV_SYN event is reported to userland
after the EV_SW SW_LID event has been sent. This is easy to verify
by using “input-events” from input-utils and just closing and opening
the lid.
Signed-off-by: Guillem Jover <guillem.jover@nokia.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/button.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 9d568d4..cb046c3 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -262,6 +262,7 @@ static int acpi_lid_send_state(struct acpi_button *button)
return -ENODEV;
/* input layer checks if event is redundant */
input_report_switch(button->input, SW_LID, !state);
+ input_sync(button->input);
return 0;
}
@@ -285,8 +286,8 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
input_report_key(input, keycode, 1);
input_sync(input);
input_report_key(input, keycode, 0);
+ input_sync(input);
}
- input_sync(input);
acpi_bus_generate_proc_event(button->device, event,
++button->pushed);
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 6/9] toshiba_acpi: always call input_sync() after input_report_switch()
2008-10-25 8:13 ` [PATCH 1/9] i7300_idle: Disable ioat channel only on platforms where ile driver can load Len Brown
` (3 preceding siblings ...)
2008-10-25 8:13 ` [PATCH 5/9] ACPI: Always report a sync event after a lid state change Len Brown
@ 2008-10-25 8:13 ` Len Brown
2008-10-25 8:13 ` [PATCH 7/9] ACPI suspend: build fix for ACPI_SLEEP=n && XEN_SAVE_RESTORE=y Len Brown
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2008-10-25 8:13 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
From: Len Brown <len.brown@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/toshiba_acpi.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c
index 2a632f8..66aac06 100644
--- a/drivers/acpi/toshiba_acpi.c
+++ b/drivers/acpi/toshiba_acpi.c
@@ -371,6 +371,7 @@ static void bt_poll_rfkill(struct input_polled_dev *poll_dev)
RFKILL_STATE_HARD_BLOCKED);
input_report_switch(poll_dev->input, SW_RFKILL_ALL,
new_rfk_state);
+ input_sync(poll_dev->input);
}
}
@@ -842,6 +843,7 @@ static int __init toshiba_acpi_init(void)
set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit);
set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit);
input_report_switch(toshiba_acpi.poll_dev->input, SW_RFKILL_ALL, TRUE);
+ input_sync(toshiba_acpi.poll_dev->input);
ret = input_register_polled_device(toshiba_acpi.poll_dev);
if (ret) {
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 7/9] ACPI suspend: build fix for ACPI_SLEEP=n && XEN_SAVE_RESTORE=y.
2008-10-25 8:13 ` [PATCH 1/9] i7300_idle: Disable ioat channel only on platforms where ile driver can load Len Brown
` (4 preceding siblings ...)
2008-10-25 8:13 ` [PATCH 6/9] toshiba_acpi: always call input_sync() after input_report_switch() Len Brown
@ 2008-10-25 8:13 ` Len Brown
2008-10-25 8:13 ` [PATCH 8/9] ACPI: Oops in ACPI with git latest Len Brown
2008-10-25 8:13 ` [PATCH 9/9] leds-hp-disk: fix build warning Len Brown
7 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2008-10-25 8:13 UTC (permalink / raw)
To: linux-acpi; +Cc: Rafael J. Wysocki, Len Brown
From: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/sleep/main.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 26571ba..80c0868 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -163,6 +163,8 @@ static void acpi_pm_end(void)
acpi_target_sleep_state = ACPI_STATE_S0;
acpi_sleep_tts_switch(acpi_target_sleep_state);
}
+#else /* !CONFIG_ACPI_SLEEP */
+#define acpi_target_sleep_state ACPI_STATE_S0
#endif /* CONFIG_ACPI_SLEEP */
#ifdef CONFIG_SUSPEND
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 8/9] ACPI: Oops in ACPI with git latest
2008-10-25 8:13 ` [PATCH 1/9] i7300_idle: Disable ioat channel only on platforms where ile driver can load Len Brown
` (5 preceding siblings ...)
2008-10-25 8:13 ` [PATCH 7/9] ACPI suspend: build fix for ACPI_SLEEP=n && XEN_SAVE_RESTORE=y Len Brown
@ 2008-10-25 8:13 ` Len Brown
2008-10-25 8:13 ` [PATCH 9/9] leds-hp-disk: fix build warning Len Brown
7 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2008-10-25 8:13 UTC (permalink / raw)
To: linux-acpi; +Cc: Rafael J. Wysocki, Len Brown
From: Rafael J. Wysocki <rjw@sisk.pl>
ACPI Warning (nseval-0168): Insufficient arguments - method [_OSC] needs 5, found 4 [20080926]
ACPI Warning (nspredef-0252): \_SB_.PCI0._OSC: Parameter count mismatch - ASL declared 5, expected 4 [20080926]
ACPI Error (nspredef-0163): \_SB_.PCI0._OSC: Missing expected return value [20080926]
BUG: unable to handle kernel NULL pointer dereference at 00000000
IP: [<c0237671>] acpi_run_osc+0xa1/0x170
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/pci/pci-acpi.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index dfe7c8e..b3a63ed 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -83,6 +83,9 @@ static acpi_status acpi_run_osc(acpi_handle handle,
if (ACPI_FAILURE(status))
return status;
+ if (!output.length)
+ return AE_NULL_OBJECT;
+
out_obj = output.pointer;
if (out_obj->type != ACPI_TYPE_BUFFER) {
printk(KERN_DEBUG "Evaluate _OSC returns wrong type\n");
--
1.5.6.5
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 9/9] leds-hp-disk: fix build warning
2008-10-25 8:13 ` [PATCH 1/9] i7300_idle: Disable ioat channel only on platforms where ile driver can load Len Brown
` (6 preceding siblings ...)
2008-10-25 8:13 ` [PATCH 8/9] ACPI: Oops in ACPI with git latest Len Brown
@ 2008-10-25 8:13 ` Len Brown
7 siblings, 0 replies; 12+ messages in thread
From: Len Brown @ 2008-10-25 8:13 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
From: Len Brown <len.brown@intel.com>
drivers/leds/leds-hp-disk.c:59: warning: passing argument 4 of ‘acpi_evaluate_integer’ from incompatible pointer type
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/leds/leds-hp-disk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/leds/leds-hp-disk.c b/drivers/leds/leds-hp-disk.c
index 53a25b1..74645ab 100644
--- a/drivers/leds/leds-hp-disk.c
+++ b/drivers/leds/leds-hp-disk.c
@@ -49,7 +49,7 @@ static struct acpi_hpled adev;
static acpi_status hpled_acpi_write(acpi_handle handle, int reg)
{
- unsigned long ret; /* Not used when writing */
+ unsigned long long ret; /* Not used when writing */
union acpi_object in_obj[1];
struct acpi_object_list args = { 1, in_obj };
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 12+ messages in thread