Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262271
b: refs/heads/master
c: ae6f618
h: refs/heads/master
i:
  262269: 8a53eb0
  262267: 68bb632
  262263: fd8db01
  262255: 1b17ce7
  262239: cc2760f
  262207: 796a868
  262143: 10438bb
v: v3
  • Loading branch information
Lan Tianyu authored and Len Brown committed Jul 14, 2011
1 parent 2739835 commit 38b4dff
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 64 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: 3eb208f0a36cf7a86953afa7a4eb6776294e6768
refs/heads/master: ae6f61870490c10a0b0436e5afffa00c9dacffef
6 changes: 0 additions & 6 deletions trunk/drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,6 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);
*/
u8 ACPI_INIT_GLOBAL(acpi_gbl_truncate_io_addresses, FALSE);

/*
* Disable runtime checking and repair of values returned by control methods.
* Use only if the repair is causing a problem on a particular machine.
*/
u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_auto_repair, FALSE);

/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */

struct acpi_table_fadt acpi_gbl_FADT;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ struct acpi_predefined_data {
char *pathname;
const union acpi_predefined_info *predefined;
union acpi_operand_object *parent_package;
struct acpi_namespace_node *node;
u32 flags;
u8 node_flags;
};
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/acpi/acpica/acpredef.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ static const union acpi_predefined_info predefined_names[] =
{{"_SWS", 0, ACPI_RTYPE_INTEGER}},
{{"_TC1", 0, ACPI_RTYPE_INTEGER}},
{{"_TC2", 0, ACPI_RTYPE_INTEGER}},
{{"_TDL", 0, ACPI_RTYPE_INTEGER}},
{{"_TIP", 1, ACPI_RTYPE_INTEGER}},
{{"_TIV", 1, ACPI_RTYPE_INTEGER}},
{{"_TMP", 0, ACPI_RTYPE_INTEGER}},
Expand Down
19 changes: 6 additions & 13 deletions trunk/drivers/acpi/acpica/nspredef.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,14 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
}

/*
* Return value validation and possible repair.
* 1) We have a return value, but if one wasn't expected, just exit, this is
* not a problem. For example, if the "Implicit Return" feature is
* enabled, methods will always return a value.
*
* 1) Don't perform return value validation/repair if this feature
* has been disabled via a global option.
*
* 2) We have a return value, but if one wasn't expected, just exit,
* this is not a problem. For example, if the "Implicit Return"
* feature is enabled, methods will always return a value.
*
* 3) If the return value can be of any type, then we cannot perform
* any validation, just exit.
* 2) If the return value can be of any type, then we cannot perform any
* validation, exit.
*/
if (acpi_gbl_disable_auto_repair ||
(!predefined->info.expected_btypes) ||
if ((!predefined->info.expected_btypes) ||
(predefined->info.expected_btypes == ACPI_RTYPE_ALL)) {
goto cleanup;
}
Expand All @@ -218,7 +212,6 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
goto cleanup;
}
data->predefined = predefined;
data->node = node;
data->node_flags = node->flags;
data->pathname = pathname;

Expand Down
15 changes: 0 additions & 15 deletions trunk/drivers/acpi/acpica/nsrepair2.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,21 +503,6 @@ acpi_ns_repair_TSS(struct acpi_predefined_data *data,
{
union acpi_operand_object *return_object = *return_object_ptr;
acpi_status status;
struct acpi_namespace_node *node;

/*
* We can only sort the _TSS return package if there is no _PSS in the
* same scope. This is because if _PSS is present, the ACPI specification
* dictates that the _TSS Power Dissipation field is to be ignored, and
* therefore some BIOSs leave garbage values in the _TSS Power field(s).
* In this case, it is best to just return the _TSS package as-is.
* (May, 2011)
*/
status =
acpi_ns_get_node(data->node, "^_PSS", ACPI_NS_NO_UPSEARCH, &node);
if (ACPI_SUCCESS(status)) {
return (AE_OK);
}

status = acpi_ns_check_sorted_list(data, return_object, 5, 1,
ACPI_SORT_DESCENDING,
Expand Down
27 changes: 5 additions & 22 deletions trunk/drivers/acpi/acpica/tbinstal.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,29 +126,12 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
}

/*
* Validate the incoming table signature.
*
* 1) Originally, we checked the table signature for "SSDT" or "PSDT".
* 2) We added support for OEMx tables, signature "OEM".
* 3) Valid tables were encountered with a null signature, so we just
* gave up on validating the signature, (05/2008).
* 4) We encountered non-AML tables such as the MADT, which caused
* interpreter errors and kernel faults. So now, we once again allow
* only "SSDT", "OEMx", and now, also a null signature. (05/2011).
* Originally, we checked the table signature for "SSDT" or "PSDT" here.
* Next, we added support for OEMx tables, signature "OEM".
* Valid tables were encountered with a null signature, so we've just
* given up on validating the signature, since it seems to be a waste
* of code. The original code was removed (05/2008).
*/
if ((table_desc->pointer->signature[0] != 0x00) &&
(!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT))
&& (ACPI_STRNCMP(table_desc->pointer->signature, "OEM", 3))) {
ACPI_ERROR((AE_INFO,
"Table has invalid signature [%4.4s] (0x%8.8X), must be SSDT or OEMx",
acpi_ut_valid_acpi_name(*(u32 *)table_desc->
pointer->
signature) ? table_desc->
pointer->signature : "????",
*(u32 *)table_desc->pointer->signature));

return_ACPI_STATUS(AE_BAD_SIGNATURE);
}

(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);

Expand Down
11 changes: 8 additions & 3 deletions trunk/drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
#define ACPI_BATTERY_NOTIFY_INFO 0x81
#define ACPI_BATTERY_NOTIFY_THRESHOLD 0x82

/* Battery power unit: 0 means mW, 1 means mA */
#define ACPI_BATTERY_POWER_UNIT_MA 1

#define _COMPONENT ACPI_BATTERY_COMPONENT

ACPI_MODULE_NAME("battery");
Expand Down Expand Up @@ -301,7 +304,8 @@ static enum power_supply_property energy_battery_props[] = {
#ifdef CONFIG_ACPI_PROCFS_POWER
inline char *acpi_battery_units(struct acpi_battery *battery)
{
return (battery->power_unit)?"mA":"mW";
return (battery->power_unit == ACPI_BATTERY_POWER_UNIT_MA) ?
"mA" : "mW";
}
#endif

Expand Down Expand Up @@ -544,7 +548,7 @@ static int sysfs_add_battery(struct acpi_battery *battery)
{
int result;

if (battery->power_unit) {
if (battery->power_unit == ACPI_BATTERY_POWER_UNIT_MA) {
battery->bat.properties = charge_battery_props;
battery->bat.num_properties =
ARRAY_SIZE(charge_battery_props);
Expand Down Expand Up @@ -575,7 +579,8 @@ static void sysfs_remove_battery(struct acpi_battery *battery)

static void acpi_battery_quirks(struct acpi_battery *battery)
{
if (dmi_name_in_vendors("Acer") && battery->power_unit) {
if (dmi_name_in_vendors("Acer") &&
battery->power_unit == ACPI_BATTERY_POWER_UNIT_MA) {
set_bit(ACPI_BATTERY_QUIRK_SIGNED16_CURRENT, &battery->flags);
}
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/acpi/acpixf.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

/* Current ACPICA subsystem version in YYYYMMDD format */

#define ACPI_CA_VERSION 0x20110623
#define ACPI_CA_VERSION 0x20110413

#include "actypes.h"
#include "actbl.h"
Expand All @@ -69,7 +69,6 @@ extern u32 acpi_gbl_trace_flags;
extern u32 acpi_gbl_enable_aml_debug_object;
extern u8 acpi_gbl_copy_dsdt_locally;
extern u8 acpi_gbl_truncate_io_addresses;
extern u8 acpi_gbl_disable_auto_repair;

extern u32 acpi_current_gpe_count;
extern struct acpi_table_fadt acpi_gbl_FADT;
Expand Down

0 comments on commit 38b4dff

Please sign in to comment.