Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275029
b: refs/heads/master
c: e751b75
h: refs/heads/master
i:
  275027: 0fe0dbf
v: v3
  • Loading branch information
Len Brown committed Nov 7, 2011
1 parent ed96d68 commit 89f715a
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18fd470a48396c8795ba7256c5973e92ffa25cb3
refs/heads/master: e751b759e82629798c4a5e4a87eb3a30c0510154
22 changes: 22 additions & 0 deletions trunk/Documentation/ABI/stable/sysfs-acpi-pmprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
What: /sys/firmware/acpi/pm_profile
Date: 03-Nov-2011
KernelVersion: v3.2
Contact: linux-acpi@vger.kernel.org
Description: The ACPI pm_profile sysfs interface exports the platform
power management (and performance) requirement expectations
as provided by BIOS. The integer value is directly passed as
retrieved from the FADT ACPI table.
Values: For possible values see ACPI specification:
5.2.9 Fixed ACPI Description Table (FADT)
Field: Preferred_PM_Profile

Currently these values are defined by spec:
0 Unspecified
1 Desktop
2 Mobile
3 Workstation
4 Enterprise Server
5 SOHO Server
6 Appliance PC
7 Performance Server
>7 Reserved
11 changes: 6 additions & 5 deletions trunk/drivers/acpi/acpica/hwregs.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,16 +269,17 @@ acpi_status acpi_hw_clear_acpi_status(void)

status = acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS,
ACPI_BITMASK_ALL_FIXED_STATUS);
if (ACPI_FAILURE(status)) {
goto unlock_and_exit;
}

acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags);

if (ACPI_FAILURE(status))
goto exit;

/* Clear the GPE Bits in all GPE registers in all GPE blocks */

status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL);

unlock_and_exit:
acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags);
exit:
return_ACPI_STATUS(status);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/atomicio.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static void __iomem *__acpi_ioremap_fast(phys_addr_t paddr,
{
struct acpi_iomap *map;

map = __acpi_find_iomap(paddr, size);
map = __acpi_find_iomap(paddr, size/8);
if (map)
return map->vaddr + (paddr - map->paddr);
else
Expand Down
8 changes: 2 additions & 6 deletions trunk/drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,10 +911,7 @@ void __init acpi_early_init(void)
}
#endif

status =
acpi_enable_subsystem(~
(ACPI_NO_HARDWARE_INIT |
ACPI_NO_ACPI_ENABLE));
status = acpi_enable_subsystem(~ACPI_NO_ACPI_ENABLE);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX "Unable to enable ACPI\n");
goto error0;
Expand All @@ -935,8 +932,7 @@ static int __init acpi_bus_init(void)

acpi_os_initialize1();

status =
acpi_enable_subsystem(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE);
status = acpi_enable_subsystem(ACPI_NO_ACPI_ENABLE);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX
"Unable to start the ACPI Interpreter\n");
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,13 +1062,12 @@ static void acpi_add_id(struct acpi_device *device, const char *dev_id)
if (!id)
return;

id->id = kmalloc(strlen(dev_id) + 1, GFP_KERNEL);
id->id = kstrdup(dev_id, GFP_KERNEL);
if (!id->id) {
kfree(id);
return;
}

strcpy(id->id, dev_id);
list_add_tail(&id->list, &device->pnp.ids);
}

Expand Down
14 changes: 13 additions & 1 deletion trunk/drivers/acpi/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,23 @@ static void __exit interrupt_stats_exit(void)
return;
}

static ssize_t
acpi_show_profile(struct device *dev, struct device_attribute *attr,
char *buf)
{
return sprintf(buf, "%d\n", acpi_gbl_FADT.preferred_profile);
}

static const struct device_attribute pm_profile_attr =
__ATTR(pm_profile, S_IRUGO, acpi_show_profile, NULL);

int __init acpi_sysfs_init(void)
{
int result;

result = acpi_tables_sysfs_init();

if (result)
return result;
result = sysfs_create_file(acpi_kobj, &pm_profile_attr.attr);
return result;
}
4 changes: 2 additions & 2 deletions trunk/drivers/thermal/thermal_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,10 @@ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz,
return;

if (delay > 1000)
schedule_delayed_work(&(tz->poll_queue),
queue_delayed_work(system_freezable_wq, &(tz->poll_queue),
round_jiffies(msecs_to_jiffies(delay)));
else
schedule_delayed_work(&(tz->poll_queue),
queue_delayed_work(system_freezable_wq, &(tz->poll_queue),
msecs_to_jiffies(delay));
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/acpi/acpi_drivers.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static inline void unregister_dock_notifier(struct notifier_block *nb)
{
}
static inline int register_hotplug_dock_device(acpi_handle handle,
struct acpi_dock_ops *ops,
const struct acpi_dock_ops *ops,
void *context)
{
return -ENODEV;
Expand Down
1 change: 0 additions & 1 deletion trunk/include/acpi/actypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@ typedef u64 acpi_integer;
*/
#define ACPI_FULL_INITIALIZATION 0x00
#define ACPI_NO_ADDRESS_SPACE_INIT 0x01
#define ACPI_NO_HARDWARE_INIT 0x02
#define ACPI_NO_EVENT_INIT 0x04
#define ACPI_NO_HANDLER_INIT 0x08
#define ACPI_NO_ACPI_ENABLE 0x10
Expand Down

0 comments on commit 89f715a

Please sign in to comment.