Skip to content

Commit

Permalink
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/lenb/linux

Pull ACPI & power management update from Len Brown:
 "Re-write of the turbostat tool.
     lower overhead was necessary for measuring very large system when
     they are very idle.

  IVB support in intel_idle
     It's what I run on my IVB, others should be able to also:-)

  ACPICA core update
     We have found some bugs due to divergence between Linux and the
     upstream ACPICA base.  Most of these patches are to reduce that
     divergence to reduce the risk of future bugs.

  Some cpuidle updates, mostly for non-Intel
     More will be coming, as they depend on this part.

  Some thermal management changes needed by non-ACPI systems.

  Some _OST (OS Status Indication) updates for hot ACPI hot-plug."

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (51 commits)
  Thermal: Documentation update
  Thermal: Add Hysteresis attributes
  Thermal: Make Thermal trip points writeable
  ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check
  tools/power: turbostat: fix large c1% issue
  tools/power: turbostat v2 - re-write for efficiency
  ACPICA: Update to version 20120711
  ACPICA: AcpiSrc: Fix some translation issues for Linux conversion
  ACPICA: Update header files copyrights to 2012
  ACPICA: Add new ACPI table load/unload external interfaces
  ACPICA: Split file: tbxface.c -> tbxfload.c
  ACPICA: Add PCC address space to space ID decode function
  ACPICA: Fix some comment fields
  ACPICA: Table manager: deploy new firmware error/warning interfaces
  ACPICA: Add new interfaces for BIOS(firmware) errors and warnings
  ACPICA: Split exception code utilities to a new file, utexcep.c
  ACPI: acpi_pad: tune round_robin_time
  ACPICA: Update to version 20120620
  ACPICA: Add support for implicit notify on multiple devices
  ACPICA: Update comments; no functional change
  ...
  • Loading branch information
torvalds committed Jul 26, 2012
2 parents bd22dc1 + ec033d0 commit 4765250
Show file tree
Hide file tree
Showing 172 changed files with 4,203 additions and 2,340 deletions.
14 changes: 14 additions & 0 deletions Documentation/devicetree/bindings/thermal/spear-thermal.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
* SPEAr Thermal

Required properties:
- compatible : "st,thermal-spear1340"
- reg : Address range of the thermal registers
- st,thermal-flags: flags used to enable thermal sensor

Example:

thermal@fc000000 {
compatible = "st,thermal-spear1340";
reg = <0xfc000000 0x1000>;
st,thermal-flags = <0x7000>;
};
30 changes: 19 additions & 11 deletions Documentation/thermal/sysfs-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,26 @@ temperature) and throttle appropriate devices.

1.1 thermal zone device interface
1.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name,
int trips, void *devdata, struct thermal_zone_device_ops *ops)
int trips, int mask, void *devdata,
struct thermal_zone_device_ops *ops)

This interface function adds a new thermal zone device (sensor) to
/sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the
thermal cooling devices registered at the same time.

name: the thermal zone name.
trips: the total number of trip points this thermal zone supports.
mask: Bit string: If 'n'th bit is set, then trip point 'n' is writeable.
devdata: device private data
ops: thermal zone device call-backs.
.bind: bind the thermal zone device with a thermal cooling device.
.unbind: unbind the thermal zone device with a thermal cooling device.
.get_temp: get the current temperature of the thermal zone.
.get_mode: get the current mode (user/kernel) of the thermal zone.
- "kernel" means thermal management is done in kernel.
- "user" will prevent kernel thermal driver actions upon trip points
.get_mode: get the current mode (enabled/disabled) of the thermal zone.
- "enabled" means the kernel thermal management is enabled.
- "disabled" will prevent kernel thermal driver action upon trip points
so that user applications can take charge of thermal management.
.set_mode: set the mode (user/kernel) of the thermal zone.
.set_mode: set the mode (enabled/disabled) of the thermal zone.
.get_trip_type: get the type of certain trip point.
.get_trip_temp: get the temperature above which the certain trip point
will be fired.
Expand Down Expand Up @@ -119,6 +121,7 @@ Thermal zone device sys I/F, created once it's registered:
|---mode: Working mode of the thermal zone
|---trip_point_[0-*]_temp: Trip point temperature
|---trip_point_[0-*]_type: Trip point type
|---trip_point_[0-*]_hyst: Hysteresis value for this trip point

Thermal cooling device sys I/F, created once it's registered:
/sys/class/thermal/cooling_device[0-*]:
Expand Down Expand Up @@ -167,14 +170,14 @@ temp
RO, Required

mode
One of the predefined values in [kernel, user].
One of the predefined values in [enabled, disabled].
This file gives information about the algorithm that is currently
managing the thermal zone. It can be either default kernel based
algorithm or user space application.
kernel = Thermal management in kernel thermal zone driver.
user = Preventing kernel thermal zone driver actions upon
trip points so that user application can take full
charge of the thermal management.
enabled = enable Kernel Thermal management.
disabled = Preventing kernel thermal zone driver actions upon
trip points so that user application can take full
charge of the thermal management.
RW, Optional

trip_point_[0-*]_temp
Expand All @@ -188,6 +191,11 @@ trip_point_[0-*]_type
thermal zone.
RO, Optional

trip_point_[0-*]_hyst
The hysteresis value for a trip point, represented as an integer
Unit: Celsius
RW, Optional

cdev[0-*]
Sysfs link to the thermal cooling device node where the sys I/F
for cooling device throttling control represents.
Expand Down Expand Up @@ -248,7 +256,7 @@ method, the sys I/F structure will be built like this:
|thermal_zone1:
|---type: acpitz
|---temp: 37000
|---mode: kernel
|---mode: enabled
|---trip_point_0_temp: 100000
|---trip_point_0_type: critical
|---trip_point_1_temp: 80000
Expand Down
7 changes: 0 additions & 7 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,6 @@ W: http://www.lesswatts.org/projects/acpi/
S: Supported
F: drivers/acpi/fan.c

ACPI PROCESSOR AGGREGATOR DRIVER
M: Shaohua Li <shaohua.li@intel.com>
L: linux-acpi@vger.kernel.org
W: http://www.lesswatts.org/projects/acpi/
S: Supported
F: drivers/acpi/acpi_pad.c

ACPI THERMAL DRIVER
M: Zhang Rui <rui.zhang@intel.com>
L: linux-acpi@vger.kernel.org
Expand Down
4 changes: 3 additions & 1 deletion drivers/acpi/ac.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ static int acpi_ac_add(struct acpi_device *device)
ac->charger.properties = ac_props;
ac->charger.num_properties = ARRAY_SIZE(ac_props);
ac->charger.get_property = get_ac_property;
power_supply_register(&ac->device->dev, &ac->charger);
result = power_supply_register(&ac->device->dev, &ac->charger);
if (result)
goto end;

printk(KERN_INFO PREFIX "%s [%s] (%s)\n",
acpi_device_name(device), acpi_device_bid(device),
Expand Down
43 changes: 32 additions & 11 deletions drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
{
struct acpi_memory_device *mem_device;
struct acpi_device *device;

u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; /* default */

switch (event) {
case ACPI_NOTIFY_BUS_CHECK:
Expand All @@ -354,15 +354,20 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
"\nReceived DEVICE CHECK notification for device\n"));
if (acpi_memory_get_device(handle, &mem_device)) {
printk(KERN_ERR PREFIX "Cannot find driver data\n");
return;
break;
}

if (!acpi_memory_check_device(mem_device)) {
if (acpi_memory_enable_device(mem_device))
printk(KERN_ERR PREFIX
"Cannot enable memory device\n");
if (acpi_memory_check_device(mem_device))
break;

if (acpi_memory_enable_device(mem_device)) {
printk(KERN_ERR PREFIX "Cannot enable memory device\n");
break;
}

ost_code = ACPI_OST_SC_SUCCESS;
break;

case ACPI_NOTIFY_EJECT_REQUEST:
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"\nReceived EJECT REQUEST notification for device\n"));
Expand All @@ -383,19 +388,35 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
* TBD: Can also be disabled by Callback registration
* with generic sysfs driver
*/
if (acpi_memory_disable_device(mem_device))
printk(KERN_ERR PREFIX
"Disable memory device\n");
if (acpi_memory_disable_device(mem_device)) {
printk(KERN_ERR PREFIX "Disable memory device\n");
/*
* If _EJ0 was called but failed, _OST is not
* necessary.
*/
if (mem_device->state == MEMORY_INVALID_STATE)
return;

break;
}

/*
* TBD: Invoke acpi_bus_remove to cleanup data structures
*/
break;

/* _EJ0 succeeded; _OST is not necessary */
return;

default:
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Unsupported event [0x%x]\n", event));
break;

/* non-hotplug event; possibly handled by other handler */
return;
}

/* Inform firmware that the hotplug operation has completed */
(void) acpi_evaluate_hotplug_ost(handle, event, ost_code, NULL);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpi_pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static void exit_round_robin(unsigned int tsk_index)
}

static unsigned int idle_pct = 5; /* percentage */
static unsigned int round_robin_time = 10; /* second */
static unsigned int round_robin_time = 1; /* second */
static int power_saving_thread(void *data)
{
struct sched_param param = {.sched_priority = 1};
Expand Down Expand Up @@ -235,7 +235,7 @@ static int create_power_saving_task(void)

ps_tsks[ps_tsk_num] = kthread_run(power_saving_thread,
(void *)(unsigned long)ps_tsk_num,
"power_saving/%d", ps_tsk_num);
"acpi_pad/%d", ps_tsk_num);
rc = IS_ERR(ps_tsks[ps_tsk_num]) ? PTR_ERR(ps_tsks[ps_tsk_num]) : 0;
if (!rc)
ps_tsk_num++;
Expand Down
2 changes: 2 additions & 0 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,14 @@ acpi-y += \
tbinstal.o \
tbutils.o \
tbxface.o \
tbxfload.o \
tbxfroot.o

acpi-y += \
utaddress.o \
utalloc.o \
utcopy.o \
utexcep.o \
utdebug.o \
utdecode.o \
utdelete.o \
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ u32 acpi_ev_install_sci_handler(void);

acpi_status acpi_ev_remove_sci_handler(void);

u32 acpi_ev_initialize_sCI(u32 program_sCI);
u32 acpi_ev_initialize_SCI(u32 program_SCI);

ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_ev_terminate(void))
#endif /* __ACEVENTS_H__ */
19 changes: 9 additions & 10 deletions drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,7 @@ ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache;

/* Global handlers */

ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify;
ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify;
ACPI_EXTERN struct acpi_global_notify_handler acpi_gbl_global_notify[2];
ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler;
ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
ACPI_EXTERN acpi_tbl_handler acpi_gbl_table_handler;
Expand Down Expand Up @@ -327,14 +326,6 @@ extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];

#endif

/* Exception codes */

extern char const *acpi_gbl_exception_names_env[];
extern char const *acpi_gbl_exception_names_pgm[];
extern char const *acpi_gbl_exception_names_tbl[];
extern char const *acpi_gbl_exception_names_aml[];
extern char const *acpi_gbl_exception_names_ctrl[];

/*****************************************************************************
*
* Namespace globals
Expand Down Expand Up @@ -463,4 +454,12 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;

#endif /* ACPI_DEBUGGER */

/*****************************************************************************
*
* Info/help support
*
****************************************************************************/

extern const struct ah_predefined_name asl_predefined_info[];

#endif /* __ACGLOBAL_H__ */
43 changes: 37 additions & 6 deletions drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state);
* Information structure for ACPI predefined names.
* Each entry in the table contains the following items:
*
* Name - The ACPI reserved name
* name - The ACPI reserved name
* param_count - Number of arguments to the method
* expected_return_btypes - Allowed type(s) for the return value
*/
Expand Down Expand Up @@ -404,6 +404,13 @@ struct acpi_gpe_handler_info {
u8 originally_enabled; /* True if GPE was originally enabled */
};

/* Notify info for implicit notify, multiple device objects */

struct acpi_gpe_notify_info {
struct acpi_namespace_node *device_node; /* Device to be notified */
struct acpi_gpe_notify_info *next;
};

struct acpi_gpe_notify_object {
struct acpi_namespace_node *node;
struct acpi_gpe_notify_object *next;
Expand All @@ -412,15 +419,15 @@ struct acpi_gpe_notify_object {
union acpi_gpe_dispatch_info {
struct acpi_namespace_node *method_node; /* Method node for this GPE level */
struct acpi_gpe_handler_info *handler; /* Installed GPE handler */
struct acpi_gpe_notify_object device; /* List of _PRW devices for implicit notify */
struct acpi_gpe_notify_info *notify_list; /* List of _PRW devices for implicit notifies */
};

/*
* Information about a GPE, one per each GPE in an array.
* NOTE: Important to keep this struct as small as possible.
*/
struct acpi_gpe_event_info {
union acpi_gpe_dispatch_info dispatch; /* Either Method or Handler */
union acpi_gpe_dispatch_info dispatch; /* Either Method, Handler, or notify_list */
struct acpi_gpe_register_info *register_info; /* Backpointer to register info */
u8 flags; /* Misc info about this GPE */
u8 gpe_number; /* This GPE */
Expand Down Expand Up @@ -600,13 +607,22 @@ acpi_status(*acpi_parse_downwards) (struct acpi_walk_state * walk_state,

typedef acpi_status(*acpi_parse_upwards) (struct acpi_walk_state * walk_state);

/* Global handlers for AML Notifies */

struct acpi_global_notify_handler {
acpi_notify_handler handler;
void *context;
};

/*
* Notify info - used to pass info to the deferred notify
* handler/dispatcher.
*/
struct acpi_notify_info {
ACPI_STATE_COMMON struct acpi_namespace_node *node;
union acpi_operand_object *handler_obj;
ACPI_STATE_COMMON u8 handler_list_id;
struct acpi_namespace_node *node;
union acpi_operand_object *handler_list_head;
struct acpi_global_notify_handler *global;
};

/* Generic state is union of structs above */
Expand Down Expand Up @@ -718,7 +734,7 @@ struct acpi_parse_obj_named {
u32 name; /* 4-byte name or zero if no name */
};

/* This version is used by the i_aSL compiler only */
/* This version is used by the iASL compiler only */

#define ACPI_MAX_PARSEOP_NAME 20

Expand Down Expand Up @@ -787,6 +803,7 @@ struct acpi_parse_state {
#define ACPI_PARSEOP_IGNORE 0x01
#define ACPI_PARSEOP_PARAMLIST 0x02
#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
#define ACPI_PARSEOP_PREDEF_CHECKED 0x08
#define ACPI_PARSEOP_SPECIAL 0x10

/*****************************************************************************
Expand Down Expand Up @@ -1075,4 +1092,18 @@ struct acpi_debug_mem_block {
#define ACPI_MEM_LIST_MAX 1
#define ACPI_NUM_MEM_LISTS 2

/*****************************************************************************
*
* Info/help support
*
****************************************************************************/

struct ah_predefined_name {
char *name;
char *description;
#ifndef ACPI_ASL_COMPILER
char *action;
#endif
};

#endif /* __ACLOCAL_H__ */
6 changes: 3 additions & 3 deletions drivers/acpi/acpica/acmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
* printf() format helpers
*/

/* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */
/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */

#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)

Expand Down Expand Up @@ -283,8 +283,8 @@
#define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask))

/*
* A struct acpi_namespace_node can appear in some contexts
* where a pointer to a union acpi_operand_object can also
* An object of type struct acpi_namespace_node can appear in some contexts
* where a pointer to an object of type union acpi_operand_object can also
* appear. This macro is used to distinguish them.
*
* The "Descriptor" field is the first field in both structures.
Expand Down
Loading

0 comments on commit 4765250

Please sign in to comment.