diff options
| -rw-r--r-- | drivers/acpi/fan.c | 34 | ||||
| -rw-r--r-- | drivers/acpi/processor_core.c | 30 | ||||
| -rw-r--r-- | drivers/acpi/processor_idle.c | 7 | ||||
| -rw-r--r-- | drivers/acpi/sbshc.c | 1 | ||||
| -rw-r--r-- | drivers/acpi/scan.c | 18 | ||||
| -rw-r--r-- | drivers/acpi/video.c | 28 | ||||
| -rw-r--r-- | drivers/cpuidle/cpuidle.c | 4 | ||||
| -rw-r--r-- | drivers/cpuidle/sysfs.c | 10 | ||||
| -rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 8 | ||||
| -rw-r--r-- | include/linux/cpuidle.h | 4 |
10 files changed, 76 insertions, 68 deletions
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index c8e3cba423ef..4d535c50d821 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c | |||
| @@ -260,24 +260,22 @@ static int acpi_fan_add(struct acpi_device *device) | |||
| 260 | result = PTR_ERR(cdev); | 260 | result = PTR_ERR(cdev); |
| 261 | goto end; | 261 | goto end; |
| 262 | } | 262 | } |
| 263 | if (cdev) { | 263 | printk(KERN_INFO PREFIX |
| 264 | printk(KERN_INFO PREFIX | 264 | "%s is registered as cooling_device%d\n", |
| 265 | "%s is registered as cooling_device%d\n", | 265 | device->dev.bus_id, cdev->id); |
| 266 | device->dev.bus_id, cdev->id); | 266 | |
| 267 | 267 | acpi_driver_data(device) = cdev; | |
| 268 | acpi_driver_data(device) = cdev; | 268 | result = sysfs_create_link(&device->dev.kobj, |
| 269 | result = sysfs_create_link(&device->dev.kobj, | 269 | &cdev->device.kobj, |
| 270 | &cdev->device.kobj, | 270 | "thermal_cooling"); |
| 271 | "thermal_cooling"); | 271 | if (result) |
| 272 | if (result) | 272 | return result; |
| 273 | return result; | 273 | |
| 274 | 274 | result = sysfs_create_link(&cdev->device.kobj, | |
| 275 | result = sysfs_create_link(&cdev->device.kobj, | 275 | &device->dev.kobj, |
| 276 | &device->dev.kobj, | 276 | "device"); |
| 277 | "device"); | 277 | if (result) |
| 278 | if (result) | 278 | return result; |
| 279 | return result; | ||
| 280 | } | ||
| 281 | 279 | ||
| 282 | result = acpi_fan_add_fs(device); | 280 | result = acpi_fan_add_fs(device); |
| 283 | if (result) | 281 | if (result) |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 36a68fa114e3..3a136f6c66a3 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
| @@ -674,22 +674,20 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device) | |||
| 674 | result = PTR_ERR(pr->cdev); | 674 | result = PTR_ERR(pr->cdev); |
| 675 | goto end; | 675 | goto end; |
| 676 | } | 676 | } |
| 677 | if (pr->cdev) { | 677 | printk(KERN_INFO PREFIX |
| 678 | printk(KERN_INFO PREFIX | 678 | "%s is registered as cooling_device%d\n", |
| 679 | "%s is registered as cooling_device%d\n", | 679 | device->dev.bus_id, pr->cdev->id); |
| 680 | device->dev.bus_id, pr->cdev->id); | 680 | |
| 681 | 681 | result = sysfs_create_link(&device->dev.kobj, | |
| 682 | result = sysfs_create_link(&device->dev.kobj, | 682 | &pr->cdev->device.kobj, |
| 683 | &pr->cdev->device.kobj, | 683 | "thermal_cooling"); |
| 684 | "thermal_cooling"); | 684 | if (result) |
| 685 | if (result) | 685 | return result; |
| 686 | return result; | 686 | result = sysfs_create_link(&pr->cdev->device.kobj, |
| 687 | result = sysfs_create_link(&pr->cdev->device.kobj, | 687 | &device->dev.kobj, |
| 688 | &device->dev.kobj, | 688 | "device"); |
| 689 | "device"); | 689 | if (result) |
| 690 | if (result) | 690 | return result; |
| 691 | return result; | ||
| 692 | } | ||
| 693 | 691 | ||
| 694 | if (pr->flags.throttling) { | 692 | if (pr->flags.throttling) { |
| 695 | printk(KERN_INFO PREFIX "%s [%s] (supports", | 693 | printk(KERN_INFO PREFIX "%s [%s] (supports", |
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/acpi/video.c b/drivers/acpi/video.c index 12fb44f16766..fe09b57de617 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
| @@ -734,21 +734,19 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
| 734 | if (IS_ERR(device->cdev)) | 734 | if (IS_ERR(device->cdev)) |
| 735 | return; | 735 | return; |
| 736 | 736 | ||
| 737 | if (device->cdev) { | 737 | printk(KERN_INFO PREFIX |
| 738 | printk(KERN_INFO PREFIX | 738 | "%s is registered as cooling_device%d\n", |
| 739 | "%s is registered as cooling_device%d\n", | 739 | device->dev->dev.bus_id, device->cdev->id); |
| 740 | device->dev->dev.bus_id, device->cdev->id); | 740 | result = sysfs_create_link(&device->dev->dev.kobj, |
| 741 | result = sysfs_create_link(&device->dev->dev.kobj, | 741 | &device->cdev->device.kobj, |
| 742 | &device->cdev->device.kobj, | 742 | "thermal_cooling"); |
| 743 | "thermal_cooling"); | 743 | if (result) |
| 744 | if (result) | 744 | printk(KERN_ERR PREFIX "Create sysfs link\n"); |
| 745 | printk(KERN_ERR PREFIX "Create sysfs link\n"); | 745 | result = sysfs_create_link(&device->cdev->device.kobj, |
| 746 | result = sysfs_create_link(&device->cdev->device.kobj, | 746 | &device->dev->dev.kobj, |
| 747 | &device->dev->dev.kobj, | 747 | "device"); |
| 748 | "device"); | 748 | if (result) |
| 749 | if (result) | 749 | printk(KERN_ERR PREFIX "Create sysfs link\n"); |
| 750 | printk(KERN_ERR PREFIX "Create sysfs link\n"); | ||
| 751 | } | ||
| 752 | } | 750 | } |
| 753 | if (device->cap._DCS && device->cap._DSS){ | 751 | if (device->cap._DCS && device->cap._DSS){ |
| 754 | static int count = 0; | 752 | static int count = 0; |
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) \ | ||
| 222 | static 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) \ |
| 222 | static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \ | 228 | static 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 | ||
| 229 | define_show_state_function(exit_latency) | 235 | define_show_state_function(exit_latency) |
| 230 | define_show_state_function(power_usage) | 236 | define_show_state_function(power_usage) |
| 231 | define_show_state_function(usage) | 237 | define_show_state_ull_function(usage) |
| 232 | define_show_state_function(time) | 238 | define_show_state_ull_function(time) |
| 233 | define_show_state_str_function(name) | 239 | define_show_state_str_function(name) |
| 234 | define_show_state_str_function(desc) | 240 | define_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); |
