diff options
author | Len Brown <len.brown@intel.com> | 2011-03-23 02:19:58 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-03-23 02:19:58 -0400 |
commit | 8a9026d2e91b2c46744396222b0e878b2622c567 (patch) | |
tree | c6609ba77c16d91a1d92a4ab113999afb0788479 /drivers/acpi | |
parent | 3c7ef2138aff285e376aefb74330392442cb2f2d (diff) | |
parent | cdf2a4eeded69f66ec8c5098c375fe49e0820127 (diff) |
Merge branch 'misc' into release
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpi_pad.c | 13 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 17 | ||||
-rw-r--r-- | drivers/acpi/processor_driver.c | 4 |
3 files changed, 18 insertions, 16 deletions
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 6afceb3d4034..a43fa1a57d57 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c | |||
@@ -298,7 +298,7 @@ static ssize_t acpi_pad_rrtime_store(struct device *dev, | |||
298 | static ssize_t acpi_pad_rrtime_show(struct device *dev, | 298 | static ssize_t acpi_pad_rrtime_show(struct device *dev, |
299 | struct device_attribute *attr, char *buf) | 299 | struct device_attribute *attr, char *buf) |
300 | { | 300 | { |
301 | return scnprintf(buf, PAGE_SIZE, "%d", round_robin_time); | 301 | return scnprintf(buf, PAGE_SIZE, "%d\n", round_robin_time); |
302 | } | 302 | } |
303 | static DEVICE_ATTR(rrtime, S_IRUGO|S_IWUSR, | 303 | static DEVICE_ATTR(rrtime, S_IRUGO|S_IWUSR, |
304 | acpi_pad_rrtime_show, | 304 | acpi_pad_rrtime_show, |
@@ -321,7 +321,7 @@ static ssize_t acpi_pad_idlepct_store(struct device *dev, | |||
321 | static ssize_t acpi_pad_idlepct_show(struct device *dev, | 321 | static ssize_t acpi_pad_idlepct_show(struct device *dev, |
322 | struct device_attribute *attr, char *buf) | 322 | struct device_attribute *attr, char *buf) |
323 | { | 323 | { |
324 | return scnprintf(buf, PAGE_SIZE, "%d", idle_pct); | 324 | return scnprintf(buf, PAGE_SIZE, "%d\n", idle_pct); |
325 | } | 325 | } |
326 | static DEVICE_ATTR(idlepct, S_IRUGO|S_IWUSR, | 326 | static DEVICE_ATTR(idlepct, S_IRUGO|S_IWUSR, |
327 | acpi_pad_idlepct_show, | 327 | acpi_pad_idlepct_show, |
@@ -342,8 +342,11 @@ static ssize_t acpi_pad_idlecpus_store(struct device *dev, | |||
342 | static ssize_t acpi_pad_idlecpus_show(struct device *dev, | 342 | static ssize_t acpi_pad_idlecpus_show(struct device *dev, |
343 | struct device_attribute *attr, char *buf) | 343 | struct device_attribute *attr, char *buf) |
344 | { | 344 | { |
345 | return cpumask_scnprintf(buf, PAGE_SIZE, | 345 | int n = 0; |
346 | to_cpumask(pad_busy_cpus_bits)); | 346 | n = cpumask_scnprintf(buf, PAGE_SIZE-2, to_cpumask(pad_busy_cpus_bits)); |
347 | buf[n++] = '\n'; | ||
348 | buf[n] = '\0'; | ||
349 | return n; | ||
347 | } | 350 | } |
348 | static DEVICE_ATTR(idlecpus, S_IRUGO|S_IWUSR, | 351 | static DEVICE_ATTR(idlecpus, S_IRUGO|S_IWUSR, |
349 | acpi_pad_idlecpus_show, | 352 | acpi_pad_idlecpus_show, |
@@ -453,7 +456,7 @@ static void acpi_pad_notify(acpi_handle handle, u32 event, | |||
453 | dev_name(&device->dev), event, 0); | 456 | dev_name(&device->dev), event, 0); |
454 | break; | 457 | break; |
455 | default: | 458 | default: |
456 | printk(KERN_WARNING"Unsupported event [0x%x]\n", event); | 459 | printk(KERN_WARNING "Unsupported event [0x%x]\n", event); |
457 | break; | 460 | break; |
458 | } | 461 | } |
459 | } | 462 | } |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 3c1a2fec8cda..25bf17da69fd 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT | 19 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT |
20 | ACPI_MODULE_NAME("processor_core"); | 20 | ACPI_MODULE_NAME("processor_core"); |
21 | 21 | ||
22 | static int set_no_mwait(const struct dmi_system_id *id) | 22 | static int __init set_no_mwait(const struct dmi_system_id *id) |
23 | { | 23 | { |
24 | printk(KERN_NOTICE PREFIX "%s detected - " | 24 | printk(KERN_NOTICE PREFIX "%s detected - " |
25 | "disabling mwait for CPU C-states\n", id->ident); | 25 | "disabling mwait for CPU C-states\n", id->ident); |
@@ -27,7 +27,7 @@ static int set_no_mwait(const struct dmi_system_id *id) | |||
27 | return 0; | 27 | return 0; |
28 | } | 28 | } |
29 | 29 | ||
30 | static struct dmi_system_id __cpuinitdata processor_idle_dmi_table[] = { | 30 | static struct dmi_system_id __initdata processor_idle_dmi_table[] = { |
31 | { | 31 | { |
32 | set_no_mwait, "Extensa 5220", { | 32 | set_no_mwait, "Extensa 5220", { |
33 | DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), | 33 | DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), |
@@ -183,7 +183,7 @@ int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id) | |||
183 | EXPORT_SYMBOL_GPL(acpi_get_cpuid); | 183 | EXPORT_SYMBOL_GPL(acpi_get_cpuid); |
184 | #endif | 184 | #endif |
185 | 185 | ||
186 | static bool processor_physically_present(acpi_handle handle) | 186 | static bool __init processor_physically_present(acpi_handle handle) |
187 | { | 187 | { |
188 | int cpuid, type; | 188 | int cpuid, type; |
189 | u32 acpi_id; | 189 | u32 acpi_id; |
@@ -223,7 +223,7 @@ static bool processor_physically_present(acpi_handle handle) | |||
223 | return true; | 223 | return true; |
224 | } | 224 | } |
225 | 225 | ||
226 | static void acpi_set_pdc_bits(u32 *buf) | 226 | static void __cpuinit acpi_set_pdc_bits(u32 *buf) |
227 | { | 227 | { |
228 | buf[0] = ACPI_PDC_REVISION_ID; | 228 | buf[0] = ACPI_PDC_REVISION_ID; |
229 | buf[1] = 1; | 229 | buf[1] = 1; |
@@ -235,7 +235,7 @@ static void acpi_set_pdc_bits(u32 *buf) | |||
235 | arch_acpi_set_pdc_bits(buf); | 235 | arch_acpi_set_pdc_bits(buf); |
236 | } | 236 | } |
237 | 237 | ||
238 | static struct acpi_object_list *acpi_processor_alloc_pdc(void) | 238 | static struct acpi_object_list *__cpuinit acpi_processor_alloc_pdc(void) |
239 | { | 239 | { |
240 | struct acpi_object_list *obj_list; | 240 | struct acpi_object_list *obj_list; |
241 | union acpi_object *obj; | 241 | union acpi_object *obj; |
@@ -278,7 +278,7 @@ static struct acpi_object_list *acpi_processor_alloc_pdc(void) | |||
278 | * _PDC is required for a BIOS-OS handshake for most of the newer | 278 | * _PDC is required for a BIOS-OS handshake for most of the newer |
279 | * ACPI processor features. | 279 | * ACPI processor features. |
280 | */ | 280 | */ |
281 | static int | 281 | static int __cpuinit |
282 | acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in) | 282 | acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in) |
283 | { | 283 | { |
284 | acpi_status status = AE_OK; | 284 | acpi_status status = AE_OK; |
@@ -306,7 +306,7 @@ acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in) | |||
306 | return status; | 306 | return status; |
307 | } | 307 | } |
308 | 308 | ||
309 | void acpi_processor_set_pdc(acpi_handle handle) | 309 | void __cpuinit acpi_processor_set_pdc(acpi_handle handle) |
310 | { | 310 | { |
311 | struct acpi_object_list *obj_list; | 311 | struct acpi_object_list *obj_list; |
312 | 312 | ||
@@ -323,9 +323,8 @@ void acpi_processor_set_pdc(acpi_handle handle) | |||
323 | kfree(obj_list->pointer); | 323 | kfree(obj_list->pointer); |
324 | kfree(obj_list); | 324 | kfree(obj_list); |
325 | } | 325 | } |
326 | EXPORT_SYMBOL_GPL(acpi_processor_set_pdc); | ||
327 | 326 | ||
328 | static acpi_status | 327 | static acpi_status __init |
329 | early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) | 328 | early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) |
330 | { | 329 | { |
331 | if (processor_physically_present(handle) == false) | 330 | if (processor_physically_present(handle) == false) |
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 360a74e6add0..a4e0f1ba6040 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -635,8 +635,8 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device) | |||
635 | return 0; | 635 | return 0; |
636 | } | 636 | } |
637 | 637 | ||
638 | static void __ref acpi_processor_hotplug_notify(acpi_handle handle, | 638 | static void acpi_processor_hotplug_notify(acpi_handle handle, |
639 | u32 event, void *data) | 639 | u32 event, void *data) |
640 | { | 640 | { |
641 | struct acpi_processor *pr; | 641 | struct acpi_processor *pr; |
642 | struct acpi_device *device = NULL; | 642 | struct acpi_device *device = NULL; |