Commit af4eb14f authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branches 'acpica', 'acpi-processor' and 'acpi-scan'

* acpica:
  ACPICA: ACPI 5.1: Add support for runtime validation of _DSD package.

* acpi-processor:
  ACPI / cpuidle: fix deadlock between cpuidle_lock and cpu_hotplug.lock

* acpi-scan:
  ACPI / scan: not cache _SUN value in struct acpi_device_pnp
...@@ -1071,9 +1071,9 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr) ...@@ -1071,9 +1071,9 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
if (pr->id == 0 && cpuidle_get_driver() == &acpi_idle_driver) { if (pr->id == 0 && cpuidle_get_driver() == &acpi_idle_driver) {
cpuidle_pause_and_lock();
/* Protect against cpu-hotplug */ /* Protect against cpu-hotplug */
get_online_cpus(); get_online_cpus();
cpuidle_pause_and_lock();
/* Disable all cpuidle devices */ /* Disable all cpuidle devices */
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
...@@ -1100,8 +1100,8 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr) ...@@ -1100,8 +1100,8 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
cpuidle_enable_device(dev); cpuidle_enable_device(dev);
} }
} }
put_online_cpus();
cpuidle_resume_and_unlock(); cpuidle_resume_and_unlock();
put_online_cpus();
} }
return 0; return 0;
......
...@@ -667,8 +667,14 @@ static ssize_t ...@@ -667,8 +667,14 @@ static ssize_t
acpi_device_sun_show(struct device *dev, struct device_attribute *attr, acpi_device_sun_show(struct device *dev, struct device_attribute *attr,
char *buf) { char *buf) {
struct acpi_device *acpi_dev = to_acpi_device(dev); struct acpi_device *acpi_dev = to_acpi_device(dev);
acpi_status status;
unsigned long long sun;
status = acpi_evaluate_integer(acpi_dev->handle, "_SUN", NULL, &sun);
if (ACPI_FAILURE(status))
return -ENODEV;
return sprintf(buf, "%lu\n", acpi_dev->pnp.sun); return sprintf(buf, "%llu\n", sun);
} }
static DEVICE_ATTR(sun, 0444, acpi_device_sun_show, NULL); static DEVICE_ATTR(sun, 0444, acpi_device_sun_show, NULL);
...@@ -690,7 +696,6 @@ static int acpi_device_setup_files(struct acpi_device *dev) ...@@ -690,7 +696,6 @@ static int acpi_device_setup_files(struct acpi_device *dev)
{ {
struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
acpi_status status; acpi_status status;
unsigned long long sun;
int result = 0; int result = 0;
/* /*
...@@ -731,14 +736,10 @@ static int acpi_device_setup_files(struct acpi_device *dev) ...@@ -731,14 +736,10 @@ static int acpi_device_setup_files(struct acpi_device *dev)
if (dev->pnp.unique_id) if (dev->pnp.unique_id)
result = device_create_file(&dev->dev, &dev_attr_uid); result = device_create_file(&dev->dev, &dev_attr_uid);
status = acpi_evaluate_integer(dev->handle, "_SUN", NULL, &sun); if (acpi_has_method(dev->handle, "_SUN")) {
if (ACPI_SUCCESS(status)) {
dev->pnp.sun = (unsigned long)sun;
result = device_create_file(&dev->dev, &dev_attr_sun); result = device_create_file(&dev->dev, &dev_attr_sun);
if (result) if (result)
goto end; goto end;
} else {
dev->pnp.sun = (unsigned long)-1;
} }
if (acpi_has_method(dev->handle, "_STA")) { if (acpi_has_method(dev->handle, "_STA")) {
......
...@@ -246,7 +246,6 @@ struct acpi_device_pnp { ...@@ -246,7 +246,6 @@ struct acpi_device_pnp {
acpi_device_name device_name; /* Driver-determined */ acpi_device_name device_name; /* Driver-determined */
acpi_device_class device_class; /* " */ acpi_device_class device_class; /* " */
union acpi_object *str_obj; /* unicode string for _STR method */ union acpi_object *str_obj; /* unicode string for _STR method */
unsigned long sun; /* _SUN */
}; };
#define acpi_device_bid(d) ((d)->pnp.bus_id) #define acpi_device_bid(d) ((d)->pnp.bus_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment