Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57285
b: refs/heads/master
c: 5169b8a
h: refs/heads/master
i:
  57283: b78d089
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Jun 2, 2007
1 parent b374379 commit 5435d01
Show file tree
Hide file tree
Showing 18 changed files with 137 additions and 273 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: c4d36a822e7c51cd6ffcf9133854d5e32489d269
refs/heads/master: 5169b8a1659fef9cc093ed3d889a854945a18177
5 changes: 1 addition & 4 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,7 @@ and is between 256 and 4096 characters. It is defined in the file
acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
Format: To spoof as Windows 98: ="Microsoft Windows"

acpi_osi= [HW,ACPI] Modify list of supported OS interface strings
acpi_osi="string1" # add string1 -- only one string
acpi_osi="!string2" # remove built-in string2
acpi_osi= # disable all strings
acpi_osi= [HW,ACPI] empty param disables _OSI

acpi_serialize [HW,ACPI] force serialization of AML methods

Expand Down
25 changes: 14 additions & 11 deletions trunk/Documentation/thinkpad-acpi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Hot keys
--------

procfs: /proc/acpi/ibm/hotkey
sysfs device attribute: hotkey_*
sysfs device attribute: hotkey/*

Without this driver, only the Fn-F4 key (sleep button) generates an
ACPI event. With the driver loaded, the hotkey feature enabled and the
Expand Down Expand Up @@ -196,27 +196,30 @@ The following commands can be written to the /proc/acpi/ibm/hotkey file:

sysfs notes:

hotkey_bios_enabled:
The hot keys attributes are in a hotkey/ subdirectory off the
thinkpad device.

bios_enabled:
Returns the status of the hot keys feature when
thinkpad-acpi was loaded. Upon module unload, the hot
key feature status will be restored to this value.

0: hot keys were disabled
1: hot keys were enabled

hotkey_bios_mask:
bios_mask:
Returns the hot keys mask when thinkpad-acpi was loaded.
Upon module unload, the hot keys mask will be restored
to this value.

hotkey_enable:
enable:
Enables/disables the hot keys feature, and reports
current status of the hot keys feature.

0: disables the hot keys feature / feature disabled
1: enables the hot keys feature / feature enabled

hotkey_mask:
mask:
bit mask to enable ACPI event generation for each hot
key (see above). Returns the current status of the hot
keys mask, and allows one to modify it.
Expand All @@ -226,7 +229,7 @@ Bluetooth
---------

procfs: /proc/acpi/ibm/bluetooth
sysfs device attribute: bluetooth_enable
sysfs device attribute: bluetooth/enable

This feature shows the presence and current state of a ThinkPad
Bluetooth device in the internal ThinkPad CDC slot.
Expand All @@ -241,15 +244,15 @@ If Bluetooth is installed, the following commands can be used:
Sysfs notes:

If the Bluetooth CDC card is installed, it can be enabled /
disabled through the "bluetooth_enable" thinkpad-acpi device
disabled through the "bluetooth/enable" thinkpad-acpi device
attribute, and its current status can also be queried.

enable:
0: disables Bluetooth / Bluetooth is disabled
1: enables Bluetooth / Bluetooth is enabled.

Note: this interface will be probably be superseeded by the
generic rfkill class, so it is NOT to be considered stable yet.
generic rfkill class.

Video output control -- /proc/acpi/ibm/video
--------------------------------------------
Expand Down Expand Up @@ -895,7 +898,7 @@ EXPERIMENTAL: WAN
-----------------

procfs: /proc/acpi/ibm/wan
sysfs device attribute: wwan_enable
sysfs device attribute: wwan/enable

This feature is marked EXPERIMENTAL because the implementation
directly accesses hardware registers and may not work as expected. USE
Expand All @@ -918,15 +921,15 @@ If the W-WAN card is installed, the following commands can be used:
Sysfs notes:

If the W-WAN card is installed, it can be enabled /
disabled through the "wwan_enable" thinkpad-acpi device
disabled through the "wwan/enable" thinkpad-acpi device
attribute, and its current status can also be queried.

enable:
0: disables WWAN card / WWAN card is disabled
1: enables WWAN card / WWAN card is enabled.

Note: this interface will be probably be superseeded by the
generic rfkill class, so it is NOT to be considered stable yet.
generic rfkill class.

Multiple Commands, Module Parameters
------------------------------------
Expand Down
11 changes: 6 additions & 5 deletions trunk/arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1171,11 +1171,12 @@ EXPORT_SYMBOL(of_find_node_by_name);

/**
* of_find_node_by_type - Find a node by its "device_type" property
* @from: The node to start searching from or NULL, the node
* you pass will not be searched, only the next one
* will; typically, you pass what the previous call
* returned. of_node_put() will be called on it
* @name: The type string to match against
* @from: The node to start searching from, or NULL to start searching
* the entire device tree. The node you pass will not be
* searched, only the next one will; typically, you pass
* what the previous call returned. of_node_put() will be
* called on from for you.
* @type: The type string to match against
*
* Returns a node pointer with refcount incremented, use
* of_node_put() on it when done.
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int node_to_pxm(int node)
return node_to_pxm_map[node];
}

int acpi_map_pxm_to_node(int pxm)
int __cpuinit acpi_map_pxm_to_node(int pxm)
{
int node = pxm_to_node_map[pxm];

Expand Down
118 changes: 10 additions & 108 deletions trunk/drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <linux/interrupt.h>
#include <linux/kmod.h>
#include <linux/delay.h>
#include <linux/dmi.h>
#include <linux/workqueue.h>
#include <linux/nmi.h>
#include <linux/acpi.h>
Expand Down Expand Up @@ -74,21 +73,6 @@ static void *acpi_irq_context;
static struct workqueue_struct *kacpid_wq;
static struct workqueue_struct *kacpi_notify_wq;

#define OSI_STRING_LENGTH_MAX 64 /* arbitrary */
static char osi_additional_string[OSI_STRING_LENGTH_MAX];

#define OSI_LINUX_ENABLED
#ifdef OSI_LINUX_ENABLED
int osi_linux = 1; /* enable _OSI(Linux) by default */
#else
int osi_linux; /* disable _OSI(Linux) by default */
#endif


#ifdef CONFIG_DMI
static struct __initdata dmi_system_id acpi_osl_dmi_table[];
#endif

static void __init acpi_request_region (struct acpi_generic_address *addr,
unsigned int length, char *desc)
{
Expand Down Expand Up @@ -137,9 +121,8 @@ static int __init acpi_reserve_resources(void)
}
device_initcall(acpi_reserve_resources);

acpi_status __init acpi_os_initialize(void)
acpi_status acpi_os_initialize(void)
{
dmi_check_system(acpi_osl_dmi_table);
return AE_OK;
}

Expand Down Expand Up @@ -977,38 +960,20 @@ static int __init acpi_os_name_setup(char *str)

__setup("acpi_os_name=", acpi_os_name_setup);

static void enable_osi_linux(int enable) {

if (osi_linux != enable)
printk(KERN_INFO PREFIX "%sabled _OSI(Linux)\n",
enable ? "En": "Dis");

osi_linux = enable;
return;
}

/*
* Modify the list of "OS Interfaces" reported to BIOS via _OSI
*
* _OSI control
* empty string disables _OSI
* string starting with '!' disables that string
* otherwise string is added to list, augmenting built-in strings
* TBD additional string adds to _OSI
*/
static int __init acpi_osi_setup(char *str)
{
if (str == NULL || *str == '\0') {
printk(KERN_INFO PREFIX "_OSI method disabled\n");
acpi_gbl_create_osi_method = FALSE;
} else if (*str == '!') {
if (acpi_osi_invalidate(++str) == AE_OK)
printk(KERN_INFO PREFIX "Deleted _OSI(%s)\n", str);
} else if (!strcmp("!Linux", str)) {
enable_osi_linux(0);
} else if (!strcmp("Linux", str)) {
enable_osi_linux(1);
} else if (*osi_additional_string == '\0') {
strncpy(osi_additional_string, str, OSI_STRING_LENGTH_MAX);
printk(KERN_INFO PREFIX "Added _OSI(%s)\n", str);
} else {
/* TBD */
printk(KERN_ERR PREFIX "_OSI additional string ignored -- %s\n",
str);
}

return 1;
Expand Down Expand Up @@ -1178,28 +1143,11 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
acpi_status
acpi_os_validate_interface (char *interface)
{
if (!strncmp(osi_additional_string, interface, OSI_STRING_LENGTH_MAX))
return AE_OK;
if (!strcmp("Linux", interface)) {
printk(KERN_WARNING PREFIX
"System BIOS is requesting _OSI(Linux)\n");
#ifdef OSI_LINUX_ENABLED
printk(KERN_WARNING PREFIX
"Please test with \"acpi_osi=!Linux\"\n"
"Please send dmidecode "
"to linux-acpi@vger.kernel.org\n");
#else
printk(KERN_WARNING PREFIX
"If \"acpi_osi=Linux\" works better,\n"
"Please send dmidecode "
"to linux-acpi@vger.kernel.org\n");
#endif
if(osi_linux)
return AE_OK;
}
return AE_SUPPORT;

return AE_SUPPORT;
}


/******************************************************************************
*
* FUNCTION: acpi_os_validate_address
Expand All @@ -1226,51 +1174,5 @@ acpi_os_validate_address (
return AE_OK;
}

#ifdef CONFIG_DMI
#ifdef OSI_LINUX_ENABLED
static int dmi_osi_not_linux(struct dmi_system_id *d)
{
printk(KERN_NOTICE "%s detected: requires not _OSI(Linux)\n", d->ident);
enable_osi_linux(0);
return 0;
}
#else
static int dmi_osi_linux(struct dmi_system_id *d)
{
printk(KERN_NOTICE "%s detected: requires _OSI(Linux)\n", d->ident);
enable_osi_linux(1);
return 0;
}
#endif

static struct dmi_system_id acpi_osl_dmi_table[] __initdata = {
#ifdef OSI_LINUX_ENABLED
/*
* Boxes that need NOT _OSI(Linux)
*/
{
.callback = dmi_osi_not_linux,
.ident = "Toshiba Satellite P100",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_BOARD_NAME, "Satellite P100"),
},
},
#else
/*
* Boxes that need _OSI(Linux)
*/
{
.callback = dmi_osi_linux,
.ident = "Intel Napa CRB",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
DMI_MATCH(DMI_BOARD_NAME, "MPAD-MSAE Customer Reference Boards"),
},
},
#endif
{}
};
#endif /* CONFIG_DMI */

#endif
8 changes: 4 additions & 4 deletions trunk/drivers/acpi/tables/tbinstal.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc,
}
}

/* The table must be either an SSDT or a PSDT or an OEMx */
/* The table must be either an SSDT or a PSDT */

if ((!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT))
&&
(!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT))
&& (strncmp(table_desc->pointer->signature, "OEM", 3))) {
(!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)))
{
ACPI_ERROR((AE_INFO,
"Table has invalid signature [%4.4s], must be SSDT, PSDT or OEMx",
"Table has invalid signature [%4.4s], must be SSDT or PSDT",
table_desc->pointer->signature));
return_ACPI_STATUS(AE_BAD_SIGNATURE);
}
Expand Down
13 changes: 6 additions & 7 deletions trunk/drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,6 @@ static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file)
static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_thermal *tz = seq->private;
struct acpi_device *device;
int i = 0;
int j = 0;

Expand All @@ -850,8 +849,9 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
tz->trips.passive.tc1, tz->trips.passive.tc2,
tz->trips.passive.tsp);
for (j = 0; j < tz->trips.passive.devices.count; j++) {
acpi_bus_get_device(tz->trips.passive.devices.handles[j], &device);
seq_printf(seq, "%4.4s ", acpi_device_bid(device));

seq_printf(seq, "0x%p ",
tz->trips.passive.devices.handles[j]);
}
seq_puts(seq, "\n");
}
Expand All @@ -862,10 +862,9 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
seq_printf(seq, "active[%d]: %ld C: devices=",
i,
KELVIN_TO_CELSIUS(tz->trips.active[i].temperature));
for (j = 0; j < tz->trips.active[i].devices.count; j++){
acpi_bus_get_device(tz->trips.active[i].devices.handles[j], &device);
seq_printf(seq, "%4.4s ", acpi_device_bid(device));
}
for (j = 0; j < tz->trips.active[i].devices.count; j++)
seq_printf(seq, "0x%p ",
tz->trips.active[i].devices.handles[j]);
seq_puts(seq, "\n");
}

Expand Down
Loading

0 comments on commit 5435d01

Please sign in to comment.