diff options
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r-- | drivers/acpi/osl.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index b998340e23d4..f4760cfa61e1 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -73,6 +73,9 @@ static void *acpi_irq_context; | |||
73 | static struct workqueue_struct *kacpid_wq; | 73 | static struct workqueue_struct *kacpid_wq; |
74 | static struct workqueue_struct *kacpi_notify_wq; | 74 | static struct workqueue_struct *kacpi_notify_wq; |
75 | 75 | ||
76 | #define OSI_STRING_LENGTH_MAX 64 /* arbitrary */ | ||
77 | static char osi_additional_string[OSI_STRING_LENGTH_MAX]; | ||
78 | |||
76 | static void __init acpi_request_region (struct acpi_generic_address *addr, | 79 | static void __init acpi_request_region (struct acpi_generic_address *addr, |
77 | unsigned int length, char *desc) | 80 | unsigned int length, char *desc) |
78 | { | 81 | { |
@@ -961,19 +964,23 @@ static int __init acpi_os_name_setup(char *str) | |||
961 | __setup("acpi_os_name=", acpi_os_name_setup); | 964 | __setup("acpi_os_name=", acpi_os_name_setup); |
962 | 965 | ||
963 | /* | 966 | /* |
964 | * _OSI control | 967 | * Modify the list of "OS Interfaces" reported to BIOS via _OSI |
968 | * | ||
965 | * empty string disables _OSI | 969 | * empty string disables _OSI |
966 | * TBD additional string adds to _OSI | 970 | * string starting with '!' disables that string |
971 | * otherwise string is added to list, augmenting built-in strings | ||
967 | */ | 972 | */ |
968 | static int __init acpi_osi_setup(char *str) | 973 | static int __init acpi_osi_setup(char *str) |
969 | { | 974 | { |
970 | if (str == NULL || *str == '\0') { | 975 | if (str == NULL || *str == '\0') { |
971 | printk(KERN_INFO PREFIX "_OSI method disabled\n"); | 976 | printk(KERN_INFO PREFIX "_OSI method disabled\n"); |
972 | acpi_gbl_create_osi_method = FALSE; | 977 | acpi_gbl_create_osi_method = FALSE; |
973 | } else { | 978 | } else if (*str == '!') { |
974 | /* TBD */ | 979 | if (acpi_osi_invalidate(++str) == AE_OK) |
975 | printk(KERN_ERR PREFIX "_OSI additional string ignored -- %s\n", | 980 | printk(KERN_INFO PREFIX "Deleted _OSI(%s)\n", str); |
976 | str); | 981 | } else if (*osi_additional_string == '\0') { |
982 | strncpy(osi_additional_string, str, OSI_STRING_LENGTH_MAX); | ||
983 | printk(KERN_INFO PREFIX "Added _OSI(%s)\n", str); | ||
977 | } | 984 | } |
978 | 985 | ||
979 | return 1; | 986 | return 1; |
@@ -1143,11 +1150,11 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object) | |||
1143 | acpi_status | 1150 | acpi_status |
1144 | acpi_os_validate_interface (char *interface) | 1151 | acpi_os_validate_interface (char *interface) |
1145 | { | 1152 | { |
1146 | 1153 | if (!strncmp(osi_additional_string, interface, OSI_STRING_LENGTH_MAX)) | |
1147 | return AE_SUPPORT; | 1154 | return AE_OK; |
1155 | return AE_SUPPORT; | ||
1148 | } | 1156 | } |
1149 | 1157 | ||
1150 | |||
1151 | /****************************************************************************** | 1158 | /****************************************************************************** |
1152 | * | 1159 | * |
1153 | * FUNCTION: acpi_os_validate_address | 1160 | * FUNCTION: acpi_os_validate_address |