aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/processor_idle.c7
-rw-r--r--drivers/acpi/sbshc.c1
-rw-r--r--drivers/acpi/scan.c18
-rw-r--r--drivers/cpuidle/cpuidle.c4
-rw-r--r--drivers/cpuidle/sysfs.c10
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c8
-rw-r--r--include/linux/cpuidle.h4
7 files changed, 33 insertions, 19 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index e8e2d8869236..788da9781f80 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1487,7 +1487,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
1487 return 0; 1487 return 0;
1488 } 1488 }
1489 1489
1490 acpi_unlazy_tlb(smp_processor_id());
1491 /* 1490 /*
1492 * Must be done before busmaster disable as we might need to 1491 * Must be done before busmaster disable as we might need to
1493 * access HPET ! 1492 * access HPET !
@@ -1577,6 +1576,8 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
1577 return 0; 1576 return 0;
1578 } 1577 }
1579 1578
1579 acpi_unlazy_tlb(smp_processor_id());
1580
1580 /* Tell the scheduler that we are going deep-idle: */ 1581 /* Tell the scheduler that we are going deep-idle: */
1581 sched_clock_idle_sleep_event(); 1582 sched_clock_idle_sleep_event();
1582 /* 1583 /*
@@ -1692,7 +1693,9 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
1692 switch (cx->type) { 1693 switch (cx->type) {
1693 case ACPI_STATE_C1: 1694 case ACPI_STATE_C1:
1694 state->flags |= CPUIDLE_FLAG_SHALLOW; 1695 state->flags |= CPUIDLE_FLAG_SHALLOW;
1695 state->flags |= CPUIDLE_FLAG_TIME_VALID; 1696 if (cx->entry_method == ACPI_CSTATE_FFH)
1697 state->flags |= CPUIDLE_FLAG_TIME_VALID;
1698
1696 state->enter = acpi_idle_enter_c1; 1699 state->enter = acpi_idle_enter_c1;
1697 dev->safe_state = state; 1700 dev->safe_state = state;
1698 break; 1701 break;
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index a2cf3008ce6c..bcf2c70fca87 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -130,7 +130,6 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol,
130 goto end; 130 goto end;
131 } 131 }
132 smb_hc_write(hc, ACPI_SMB_COMMAND, command); 132 smb_hc_write(hc, ACPI_SMB_COMMAND, command);
133 smb_hc_write(hc, ACPI_SMB_COMMAND, command);
134 if (!(protocol & 0x01)) { 133 if (!(protocol & 0x01)) {
135 smb_hc_write(hc, ACPI_SMB_BLOCK_COUNT, length); 134 smb_hc_write(hc, ACPI_SMB_BLOCK_COUNT, length);
136 for (i = 0; i < length; ++i) 135 for (i = 0; i < length; ++i)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 57570ac47803..e6ce262b5d44 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -39,20 +39,26 @@ static int create_modalias(struct acpi_device *acpi_dev, char *modalias,
39 int size) 39 int size)
40{ 40{
41 int len; 41 int len;
42 int count;
42 43
43 if (!acpi_dev->flags.hardware_id) 44 if (!acpi_dev->flags.hardware_id && !acpi_dev->flags.compatible_ids)
44 return -ENODEV; 45 return -ENODEV;
45 46
46 len = snprintf(modalias, size, "acpi:%s:", 47 len = snprintf(modalias, size, "acpi:");
47 acpi_dev->pnp.hardware_id);
48 if (len < 0 || len >= size)
49 return -EINVAL;
50 size -= len; 48 size -= len;
51 49
50 if (acpi_dev->flags.hardware_id) {
51 count = snprintf(&modalias[len], size, "%s:",
52 acpi_dev->pnp.hardware_id);
53 if (count < 0 || count >= size)
54 return -EINVAL;
55 len += count;
56 size -= count;
57 }
58
52 if (acpi_dev->flags.compatible_ids) { 59 if (acpi_dev->flags.compatible_ids) {
53 struct acpi_compatible_id_list *cid_list; 60 struct acpi_compatible_id_list *cid_list;
54 int i; 61 int i;
55 int count;
56 62
57 cid_list = acpi_dev->pnp.cid_list; 63 cid_list = acpi_dev->pnp.cid_list;
58 for (i = 0; i < cid_list->count; i++) { 64 for (i = 0; i < cid_list->count; i++) {
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index d73663a52324..fc555a90bb21 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -67,7 +67,7 @@ static void cpuidle_idle_call(void)
67 /* enter the state and update stats */ 67 /* enter the state and update stats */
68 dev->last_residency = target_state->enter(dev, target_state); 68 dev->last_residency = target_state->enter(dev, target_state);
69 dev->last_state = target_state; 69 dev->last_state = target_state;
70 target_state->time += dev->last_residency; 70 target_state->time += (unsigned long long)dev->last_residency;
71 target_state->usage++; 71 target_state->usage++;
72 72
73 /* give the governor an opportunity to reflect on the outcome */ 73 /* give the governor an opportunity to reflect on the outcome */
@@ -224,7 +224,7 @@ static void poll_idle_init(struct cpuidle_device *dev)
224 state->exit_latency = 0; 224 state->exit_latency = 0;
225 state->target_residency = 0; 225 state->target_residency = 0;
226 state->power_usage = -1; 226 state->power_usage = -1;
227 state->flags = CPUIDLE_FLAG_POLL | CPUIDLE_FLAG_TIME_VALID; 227 state->flags = CPUIDLE_FLAG_POLL;
228 state->enter = poll_idle; 228 state->enter = poll_idle;
229} 229}
230#else 230#else
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
index 69102ca05685..e949618b9be0 100644
--- a/drivers/cpuidle/sysfs.c
+++ b/drivers/cpuidle/sysfs.c
@@ -218,6 +218,12 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
218 return sprintf(buf, "%u\n", state->_name);\ 218 return sprintf(buf, "%u\n", state->_name);\
219} 219}
220 220
221#define define_show_state_ull_function(_name) \
222static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
223{ \
224 return sprintf(buf, "%llu\n", state->_name);\
225}
226
221#define define_show_state_str_function(_name) \ 227#define define_show_state_str_function(_name) \
222static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \ 228static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
223{ \ 229{ \
@@ -228,8 +234,8 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
228 234
229define_show_state_function(exit_latency) 235define_show_state_function(exit_latency)
230define_show_state_function(power_usage) 236define_show_state_function(power_usage)
231define_show_state_function(usage) 237define_show_state_ull_function(usage)
232define_show_state_function(time) 238define_show_state_ull_function(time)
233define_show_state_str_function(name) 239define_show_state_str_function(name)
234define_show_state_str_function(desc) 240define_show_state_str_function(desc)
235 241
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 6aa231ef642d..2dcd1960aca8 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -85,7 +85,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res,
85 i < PNP_MAX_IRQ) 85 i < PNP_MAX_IRQ)
86 i++; 86 i++;
87 if (i >= PNP_MAX_IRQ && !warned) { 87 if (i >= PNP_MAX_IRQ && !warned) {
88 printk(KERN_ERR "pnpacpi: exceeded the max number of IRQ " 88 printk(KERN_WARNING "pnpacpi: exceeded the max number of IRQ "
89 "resources: %d \n", PNP_MAX_IRQ); 89 "resources: %d \n", PNP_MAX_IRQ);
90 warned = 1; 90 warned = 1;
91 return; 91 return;
@@ -187,7 +187,7 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res,
187 res->dma_resource[i].start = dma; 187 res->dma_resource[i].start = dma;
188 res->dma_resource[i].end = dma; 188 res->dma_resource[i].end = dma;
189 } else if (!warned) { 189 } else if (!warned) {
190 printk(KERN_ERR "pnpacpi: exceeded the max number of DMA " 190 printk(KERN_WARNING "pnpacpi: exceeded the max number of DMA "
191 "resources: %d \n", PNP_MAX_DMA); 191 "resources: %d \n", PNP_MAX_DMA);
192 warned = 1; 192 warned = 1;
193 } 193 }
@@ -213,7 +213,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res,
213 res->port_resource[i].start = io; 213 res->port_resource[i].start = io;
214 res->port_resource[i].end = io + len - 1; 214 res->port_resource[i].end = io + len - 1;
215 } else if (!warned) { 215 } else if (!warned) {
216 printk(KERN_ERR "pnpacpi: exceeded the max number of IO " 216 printk(KERN_WARNING "pnpacpi: exceeded the max number of IO "
217 "resources: %d \n", PNP_MAX_PORT); 217 "resources: %d \n", PNP_MAX_PORT);
218 warned = 1; 218 warned = 1;
219 } 219 }
@@ -241,7 +241,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res,
241 res->mem_resource[i].start = mem; 241 res->mem_resource[i].start = mem;
242 res->mem_resource[i].end = mem + len - 1; 242 res->mem_resource[i].end = mem + len - 1;
243 } else if (!warned) { 243 } else if (!warned) {
244 printk(KERN_ERR "pnpacpi: exceeded the max number of mem " 244 printk(KERN_WARNING "pnpacpi: exceeded the max number of mem "
245 "resources: %d\n", PNP_MAX_MEM); 245 "resources: %d\n", PNP_MAX_MEM);
246 warned = 1; 246 warned = 1;
247 } 247 }
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 6b72a4584086..51e6b1e520e6 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -38,8 +38,8 @@ struct cpuidle_state {
38 unsigned int power_usage; /* in mW */ 38 unsigned int power_usage; /* in mW */
39 unsigned int target_residency; /* in US */ 39 unsigned int target_residency; /* in US */
40 40
41 unsigned int usage; 41 unsigned long long usage;
42 unsigned int time; /* in US */ 42 unsigned long long time; /* in US */
43 43
44 int (*enter) (struct cpuidle_device *dev, 44 int (*enter) (struct cpuidle_device *dev,
45 struct cpuidle_state *state); 45 struct cpuidle_state *state);