Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57299
b: refs/heads/master
c: 20c4856
h: refs/heads/master
i:
  57297: b2772a4
  57295: fd21aba
v: v3
  • Loading branch information
Linus Torvalds committed Jun 3, 2007
1 parent b376aaa commit ef23945
Show file tree
Hide file tree
Showing 17 changed files with 268 additions and 131 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: 627aa944a17ba82ca3ba87dc1d6ee85bd314ec79
refs/heads/master: 20c4856b1d1939647f71dce5e54fe69fde80013f
5 changes: 4 additions & 1 deletion trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ 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] empty param disables _OSI
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_serialize [HW,ACPI] force serialization of AML methods

Expand Down
25 changes: 11 additions & 14 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,30 +196,27 @@ The following commands can be written to the /proc/acpi/ibm/hotkey file:

sysfs notes:

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

bios_enabled:
hotkey_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

bios_mask:
hotkey_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.

enable:
hotkey_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

mask:
hotkey_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 @@ -229,7 +226,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 @@ -244,15 +241,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.
generic rfkill class, so it is NOT to be considered stable yet.

Video output control -- /proc/acpi/ibm/video
--------------------------------------------
Expand Down Expand Up @@ -898,7 +895,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 @@ -921,15 +918,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.
generic rfkill class, so it is NOT to be considered stable yet.

Multiple Commands, Module Parameters
------------------------------------
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 __cpuinit acpi_map_pxm_to_node(int pxm)
int acpi_map_pxm_to_node(int pxm)
{
int node = pxm_to_node_map[pxm];

Expand Down
118 changes: 108 additions & 10 deletions trunk/drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#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 @@ -73,6 +74,21 @@ 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 @@ -121,8 +137,9 @@ static int __init acpi_reserve_resources(void)
}
device_initcall(acpi_reserve_resources);

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

Expand Down Expand Up @@ -960,20 +977,38 @@ 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;
}

/*
* _OSI control
* Modify the list of "OS Interfaces" reported to BIOS via _OSI
*
* empty string disables _OSI
* TBD additional string adds to _OSI
* string starting with '!' disables that string
* otherwise string is added to list, augmenting built-in strings
*/
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 {
/* TBD */
printk(KERN_ERR PREFIX "_OSI additional string ignored -- %s\n",
str);
} 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);
}

return 1;
Expand Down Expand Up @@ -1143,11 +1178,28 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
acpi_status
acpi_os_validate_interface (char *interface)
{

return AE_SUPPORT;
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;
}


/******************************************************************************
*
* FUNCTION: acpi_os_validate_address
Expand All @@ -1174,5 +1226,51 @@ 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 */
/* The table must be either an SSDT or a PSDT or an OEMx */

if ((!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT))
&&
(!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)))
{
(!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT))
&& (strncmp(table_desc->pointer->signature, "OEM", 3))) {
ACPI_ERROR((AE_INFO,
"Table has invalid signature [%4.4s], must be SSDT or PSDT",
"Table has invalid signature [%4.4s], must be SSDT, PSDT or OEMx",
table_desc->pointer->signature));
return_ACPI_STATUS(AE_BAD_SIGNATURE);
}
Expand Down
13 changes: 7 additions & 6 deletions trunk/drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,7 @@ 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 @@ -849,9 +850,8 @@ 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++) {

seq_printf(seq, "0x%p ",
tz->trips.passive.devices.handles[j]);
acpi_bus_get_device(tz->trips.passive.devices.handles[j], &device);
seq_printf(seq, "%4.4s ", acpi_device_bid(device));
}
seq_puts(seq, "\n");
}
Expand All @@ -862,9 +862,10 @@ 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++)
seq_printf(seq, "0x%p ",
tz->trips.active[i].devices.handles[j]);
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));
}
seq_puts(seq, "\n");
}

Expand Down
Loading

0 comments on commit ef23945

Please sign in to comment.