From 09532c1425d78804014a7713ecd57848adcc7c56 Mon Sep 17 00:00:00 2001 From: Dennis Noordsij Date: Fri, 15 Aug 2008 09:37:58 +0800 Subject: [PATCH] --- yaml --- r: 117289 b: refs/heads/master c: f0e0da8a6cca44396c7a711e308d58084e881617 h: refs/heads/master i: 117287: a176fa254e40838104761ae3249c8a1e6fe4ef06 v: v3 --- [refs] | 2 +- trunk/Documentation/kernel-parameters.txt | 55 ++--- trunk/Documentation/laptops/acer-wmi.txt | 28 ++- .../arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 42 ++-- trunk/drivers/acpi/bus.c | 53 +---- trunk/drivers/acpi/executer/exconfig.c | 113 ++++++--- trunk/drivers/acpi/pci_link.c | 4 +- trunk/drivers/acpi/power.c | 68 ++---- trunk/drivers/acpi/processor_perflib.c | 18 +- trunk/drivers/acpi/scan.c | 62 ++--- trunk/drivers/acpi/wmi.c | 49 +--- trunk/drivers/misc/Kconfig | 1 - trunk/drivers/misc/acer-wmi.c | 225 +++++++----------- trunk/drivers/pnp/pnpacpi/core.c | 6 +- trunk/include/acpi/acpi_drivers.h | 1 - trunk/include/linux/kernel.h | 24 -- 16 files changed, 296 insertions(+), 455 deletions(-) diff --git a/[refs] b/[refs] index ce6654a2488c..ed043b46a2c8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 955ba395616a78780e70dc3f3b0b56ca4db52e5c +refs/heads/master: f0e0da8a6cca44396c7a711e308d58084e881617 diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 99cf83fd6947..1150444a21ab 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -217,47 +217,20 @@ and is between 256 and 4096 characters. It is defined in the file acpi.debug_level= [HW,ACPI] Format: Each bit of the indicates an ACPI debug level, - which corresponds to the level in an ACPI_DEBUG_PRINT - statement. After system has booted up, this mask - can be set via /sys/module/acpi/parameters/debug_level. - - CONFIG_ACPI_DEBUG must be enabled for this to produce - any output. The number can be in decimal or prefixed - with 0x in hex. Some of these options produce so much - output that the system is unusable. - - The following global components are defined by the - ACPI CA: - 0x01 error - 0x02 warn - 0x04 init - 0x08 debug object - 0x10 info - 0x20 init names - 0x40 parse - 0x80 load - 0x100 dispatch - 0x200 execute - 0x400 names - 0x800 operation region - 0x1000 bfield - 0x2000 tables - 0x4000 values - 0x8000 objects - 0x10000 resources - 0x20000 user requests - 0x40000 package - The number can be in decimal or prefixed with 0x in hex. - Warning: Many of these options can produce a lot of - output and make your system unusable. Be very careful. - - acpi.power_nocheck= [HW,ACPI] - Format: 1/0 enable/disable the check of power state. - On some bogus BIOS the _PSC object/_STA object of - power resource can't return the correct device power - state. In such case it is unneccessary to check its - power state again in power transition. - 1 : disable the power state check + 1: enable, 0: disable. It is useful for boot time + debugging. After system has booted up, it can be set + via /sys/module/acpi/parameters/debug_level. + CONFIG_ACPI_DEBUG must be enabled for this to produce any output. + Available bits (add the numbers together) to enable different + debug output levels of the ACPI subsystem: + 0x01 error 0x02 warn 0x04 init 0x08 debug object + 0x10 info 0x20 init names 0x40 parse 0x80 load + 0x100 dispatch 0x200 execute 0x400 names 0x800 operation region + 0x1000 bfield 0x2000 tables 0x4000 values 0x8000 objects + 0x10000 resources 0x20000 user requests 0x40000 package. + The number can be in decimal or prefixed with 0x in hex. + Warning: Many of these options can produce a lot of + output and make your system unusable. Be very careful. acpi_pm_good [X86-32,X86-64] Override the pmtimer bug detection: force the kernel diff --git a/trunk/Documentation/laptops/acer-wmi.txt b/trunk/Documentation/laptops/acer-wmi.txt index 2b3a6b5260bf..69b5dd4e5a59 100644 --- a/trunk/Documentation/laptops/acer-wmi.txt +++ b/trunk/Documentation/laptops/acer-wmi.txt @@ -1,7 +1,7 @@ Acer Laptop WMI Extras Driver http://code.google.com/p/aceracpi -Version 0.2 -18th August 2008 +Version 0.1 +9th February 2008 Copyright 2007-2008 Carlos Corbacho @@ -87,7 +87,17 @@ acer-wmi come with built-in wireless. However, should you feel so inclined to ever wish to remove the card, or swap it out at some point, please get in touch with me, as we may well be able to gain some data on wireless card detection. -The wireless radio is exposed through rfkill. +To read the status of the wireless radio (0=off, 1=on): +cat /sys/devices/platform/acer-wmi/wireless + +To enable the wireless radio: +echo 1 > /sys/devices/platform/acer-wmi/wireless + +To disable the wireless radio: +echo 0 > /sys/devices/platform/acer-wmi/wireless + +To set the state of the wireless radio when loading acer-wmi, pass: +wireless=X (where X is 0 or 1) Bluetooth ********* @@ -107,7 +117,17 @@ For the adventurously minded - if you want to buy an internal bluetooth module off the internet that is compatible with your laptop and fit it, then it will work just fine with acer-wmi. -Bluetooth is exposed through rfkill. +To read the status of the bluetooth module (0=off, 1=on): +cat /sys/devices/platform/acer-wmi/wireless + +To enable the bluetooth module: +echo 1 > /sys/devices/platform/acer-wmi/bluetooth + +To disable the bluetooth module: +echo 0 > /sys/devices/platform/acer-wmi/bluetooth + +To set the state of the bluetooth module when loading acer-wmi, pass: +bluetooth=X (where X is 0 or 1) 3G ** diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/trunk/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 4e0c6abd7ca4..84bb395038d8 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/powernow-k8.c @@ -45,6 +45,7 @@ #endif #define PFX "powernow-k8: " +#define BFX PFX "BIOS error: " #define VERSION "version 2.20.00" #include "powernow-k8.h" @@ -535,40 +536,35 @@ static int check_pst_table(struct powernow_k8_data *data, struct pst_s *pst, u8 for (j = 0; j < data->numps; j++) { if (pst[j].vid > LEAST_VID) { - printk(KERN_ERR FW_BUG PFX "vid %d invalid : 0x%x\n", - j, pst[j].vid); + printk(KERN_ERR PFX "vid %d invalid : 0x%x\n", j, pst[j].vid); return -EINVAL; } if (pst[j].vid < data->rvo) { /* vid + rvo >= 0 */ - printk(KERN_ERR FW_BUG PFX "0 vid exceeded with pstate" - " %d\n", j); + printk(KERN_ERR BFX "0 vid exceeded with pstate %d\n", j); return -ENODEV; } if (pst[j].vid < maxvid + data->rvo) { /* vid + rvo >= maxvid */ - printk(KERN_ERR FW_BUG PFX "maxvid exceeded with pstate" - " %d\n", j); + printk(KERN_ERR BFX "maxvid exceeded with pstate %d\n", j); return -ENODEV; } if (pst[j].fid > MAX_FID) { - printk(KERN_ERR FW_BUG PFX "maxfid exceeded with pstate" - " %d\n", j); + printk(KERN_ERR BFX "maxfid exceeded with pstate %d\n", j); return -ENODEV; } if (j && (pst[j].fid < HI_FID_TABLE_BOTTOM)) { /* Only first fid is allowed to be in "low" range */ - printk(KERN_ERR FW_BUG PFX "two low fids - %d : " - "0x%x\n", j, pst[j].fid); + printk(KERN_ERR BFX "two low fids - %d : 0x%x\n", j, pst[j].fid); return -EINVAL; } if (pst[j].fid < lastfid) lastfid = pst[j].fid; } if (lastfid & 1) { - printk(KERN_ERR FW_BUG PFX "lastfid invalid\n"); + printk(KERN_ERR BFX "lastfid invalid\n"); return -EINVAL; } if (lastfid > LO_FID_TABLE_TOP) - printk(KERN_INFO FW_BUG PFX "first fid not from lo freq table\n"); + printk(KERN_INFO BFX "first fid not from lo freq table\n"); return 0; } @@ -676,13 +672,13 @@ static int find_psb_table(struct powernow_k8_data *data) dprintk("table vers: 0x%x\n", psb->tableversion); if (psb->tableversion != PSB_VERSION_1_4) { - printk(KERN_ERR FW_BUG PFX "PSB table is not v1.4\n"); + printk(KERN_ERR BFX "PSB table is not v1.4\n"); return -ENODEV; } dprintk("flags: 0x%x\n", psb->flags1); if (psb->flags1) { - printk(KERN_ERR FW_BUG PFX "unknown flags\n"); + printk(KERN_ERR BFX "unknown flags\n"); return -ENODEV; } @@ -709,7 +705,7 @@ static int find_psb_table(struct powernow_k8_data *data) } } if (cpst != 1) { - printk(KERN_ERR FW_BUG PFX "numpst must be 1\n"); + printk(KERN_ERR BFX "numpst must be 1\n"); return -ENODEV; } @@ -1134,19 +1130,17 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) "ACPI Processor module before starting this " "driver.\n"); #else - printk(KERN_ERR FW_BUG PFX "Your BIOS does not provide" - " ACPI _PSS objects in a way that Linux " - "understands. Please report this to the Linux " - "ACPI maintainers and complain to your BIOS " - "vendor.\n"); + printk(KERN_ERR PFX "Your BIOS does not provide ACPI " + "_PSS objects in a way that Linux understands. " + "Please report this to the Linux ACPI maintainers" + " and complain to your BIOS vendor.\n"); #endif kfree(data); return -ENODEV; } if (pol->cpu != 0) { - printk(KERN_ERR FW_BUG PFX "No ACPI _PSS objects for " - "CPU other than CPU0. Complain to your BIOS " - "vendor.\n"); + printk(KERN_ERR PFX "No ACPI _PSS objects for CPU other than " + "CPU0. Complain to your BIOS vendor.\n"); kfree(data); return -ENODEV; } @@ -1199,7 +1193,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) /* min/max the cpu is capable of */ if (cpufreq_frequency_table_cpuinfo(pol, data->powernow_table)) { - printk(KERN_ERR FW_BUG PFX "invalid powernow_table\n"); + printk(KERN_ERR PFX "invalid powernow_table\n"); powernow_k8_cpu_exit_acpi(data); kfree(data->powernow_table); kfree(data); diff --git a/trunk/drivers/acpi/bus.c b/trunk/drivers/acpi/bus.c index e9b116d2b56d..ccae305ee55d 100644 --- a/trunk/drivers/acpi/bus.c +++ b/trunk/drivers/acpi/bus.c @@ -48,23 +48,6 @@ EXPORT_SYMBOL(acpi_root_dir); #define STRUCT_TO_INT(s) (*((int*)&s)) -static int set_power_nocheck(const struct dmi_system_id *id) -{ - printk(KERN_NOTICE PREFIX "%s detected - " - "disable power check in power transistion\n", id->ident); - acpi_power_nocheck = 1; - return 0; -} -static struct dmi_system_id __cpuinitdata power_nocheck_dmi_table[] = { - { - set_power_nocheck, "HP Pavilion 05", { - DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), - DMI_MATCH(DMI_SYS_VENDOR, "HP Pavilion 05"), - DMI_MATCH(DMI_PRODUCT_VERSION, "2001211RE101GLEND") }, NULL}, - {}, -}; - - /* -------------------------------------------------------------------------- Device Management -------------------------------------------------------------------------- */ @@ -112,21 +95,21 @@ int acpi_bus_get_status(struct acpi_device *device) } /* - * According to ACPI spec some device can be present and functional - * even if the parent is not present but functional. - * In such conditions the child device should not inherit the status - * from the parent. + * Otherwise we assume the status of our parent (unless we don't + * have one, in which case status is implied). */ + else if (device->parent) + device->status = device->parent->status; else STRUCT_TO_INT(device->status) = ACPI_STA_DEVICE_PRESENT | ACPI_STA_DEVICE_ENABLED | ACPI_STA_DEVICE_UI | ACPI_STA_DEVICE_FUNCTIONING; if (device->status.functional && !device->status.present) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] status [%08x]: " - "functional but not present;\n", - device->pnp.bus_id, - (u32) STRUCT_TO_INT(device->status))); + printk(KERN_WARNING PREFIX "Device [%s] status [%08x]: " + "functional but not present; setting present\n", + device->pnp.bus_id, (u32) STRUCT_TO_INT(device->status)); + device->status.present = 1; } ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] status [%08x]\n", @@ -240,19 +223,7 @@ int acpi_bus_set_power(acpi_handle handle, int state) /* * Get device's current power state */ - if (!acpi_power_nocheck) { - /* - * Maybe the incorrect power state is returned on the bogus - * bios, which is different with the real power state. - * For example: the bios returns D0 state and the real power - * state is D3. OS expects to set the device to D0 state. In - * such case if OS uses the power state returned by the BIOS, - * the device can't be transisted to the correct power state. - * So if the acpi_power_nocheck is set, it is unnecessary to - * get the power state by calling acpi_bus_get_power. - */ - acpi_bus_get_power(device->handle, &device->power.state); - } + acpi_bus_get_power(device->handle, &device->power.state); if ((state == device->power.state) && !device->flags.force_power_state) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", state)); @@ -847,11 +818,7 @@ static int __init acpi_init(void) } } else disable_acpi(); - /* - * If the laptop falls into the DMI check table, the power state check - * will be disabled in the course of device power transistion. - */ - dmi_check_system(power_nocheck_dmi_table); + return result; } diff --git a/trunk/drivers/acpi/executer/exconfig.c b/trunk/drivers/acpi/executer/exconfig.c index 8892b9824fae..331a114f42c9 100644 --- a/trunk/drivers/acpi/executer/exconfig.c +++ b/trunk/drivers/acpi/executer/exconfig.c @@ -280,6 +280,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, struct acpi_walk_state *walk_state) { union acpi_operand_object *ddb_handle; + struct acpi_table_header *table; struct acpi_table_desc table_desc; u32 table_index; acpi_status status; @@ -294,9 +295,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_REGION: - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Load from Region %p %s\n", - obj_desc, - acpi_ut_get_object_type_name(obj_desc))); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, + "Load table from Region %p\n", obj_desc)); /* Region must be system_memory (from ACPI spec) */ @@ -316,61 +316,112 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, } /* - * We will simply map the memory region for the table. However, the - * memory region is technically not guaranteed to remain stable and - * we may eventually have to copy the table to a local buffer. + * Map the table header and get the actual table length. The region + * length is not guaranteed to be the same as the table length. + */ + table = acpi_os_map_memory(obj_desc->region.address, + sizeof(struct acpi_table_header)); + if (!table) { + return_ACPI_STATUS(AE_NO_MEMORY); + } + + length = table->length; + acpi_os_unmap_memory(table, sizeof(struct acpi_table_header)); + + /* Must have at least an ACPI table header */ + + if (length < sizeof(struct acpi_table_header)) { + return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); + } + + /* + * The memory region is not guaranteed to remain stable and we must + * copy the table to a local buffer. For example, the memory region + * is corrupted after suspend on some machines. Dynamically loaded + * tables are usually small, so this overhead is minimal. */ + + /* Allocate a buffer for the table */ + + table_desc.pointer = ACPI_ALLOCATE(length); + if (!table_desc.pointer) { + return_ACPI_STATUS(AE_NO_MEMORY); + } + + /* Map the entire table and copy it */ + + table = acpi_os_map_memory(obj_desc->region.address, length); + if (!table) { + ACPI_FREE(table_desc.pointer); + return_ACPI_STATUS(AE_NO_MEMORY); + } + + ACPI_MEMCPY(table_desc.pointer, table, length); + acpi_os_unmap_memory(table, length); + table_desc.address = obj_desc->region.address; - table_desc.length = obj_desc->region.length; - table_desc.flags = ACPI_TABLE_ORIGIN_MAPPED; break; case ACPI_TYPE_BUFFER: /* Buffer or resolved region_field */ ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Load from Buffer or Field %p %s\n", obj_desc, - acpi_ut_get_object_type_name(obj_desc))); - - length = obj_desc->buffer.length; + "Load table from Buffer or Field %p\n", + obj_desc)); /* Must have at least an ACPI table header */ - if (length < sizeof(struct acpi_table_header)) { + if (obj_desc->buffer.length < sizeof(struct acpi_table_header)) { return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); } - /* Validate checksum here. It won't get validated in tb_add_table */ + /* Get the actual table length from the table header */ - status = - acpi_tb_verify_checksum(ACPI_CAST_PTR - (struct acpi_table_header, - obj_desc->buffer.pointer), length); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); + table = + ACPI_CAST_PTR(struct acpi_table_header, + obj_desc->buffer.pointer); + length = table->length; + + /* Table cannot extend beyond the buffer */ + + if (length > obj_desc->buffer.length) { + return_ACPI_STATUS(AE_AML_BUFFER_LIMIT); + } + if (length < sizeof(struct acpi_table_header)) { + return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); } /* - * We need to copy the buffer since the original buffer could be - * changed or deleted in the future + * Copy the table from the buffer because the buffer could be modified + * or even deleted in the future */ table_desc.pointer = ACPI_ALLOCATE(length); if (!table_desc.pointer) { return_ACPI_STATUS(AE_NO_MEMORY); } - ACPI_MEMCPY(table_desc.pointer, obj_desc->buffer.pointer, - length); - table_desc.length = length; - table_desc.flags = ACPI_TABLE_ORIGIN_ALLOCATED; + ACPI_MEMCPY(table_desc.pointer, table, length); + table_desc.address = ACPI_TO_INTEGER(table_desc.pointer); break; default: return_ACPI_STATUS(AE_AML_OPERAND_TYPE); } - /* - * Install the new table into the local data structures - */ + /* Validate table checksum (will not get validated in tb_add_table) */ + + status = acpi_tb_verify_checksum(table_desc.pointer, length); + if (ACPI_FAILURE(status)) { + ACPI_FREE(table_desc.pointer); + return_ACPI_STATUS(status); + } + + /* Complete the table descriptor */ + + table_desc.length = length; + table_desc.flags = ACPI_TABLE_ORIGIN_ALLOCATED; + + /* Install the new table into the local data structures */ + status = acpi_tb_add_table(&table_desc, &table_index); if (ACPI_FAILURE(status)) { goto cleanup; @@ -379,7 +430,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, /* * Add the table to the namespace. * - * Note: We load the table objects relative to the root of the namespace. + * Note: Load the table objects relative to the root of the namespace. * This appears to go against the ACPI specification, but we do it for * compatibility with other ACPI implementations. */ @@ -415,7 +466,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, cleanup: if (ACPI_FAILURE(status)) { - /* Delete allocated buffer or mapping */ + /* Delete allocated table buffer */ acpi_tb_delete_table(&table_desc); } diff --git a/trunk/drivers/acpi/pci_link.c b/trunk/drivers/acpi/pci_link.c index 65bf4fa59633..cf47805a7448 100644 --- a/trunk/drivers/acpi/pci_link.c +++ b/trunk/drivers/acpi/pci_link.c @@ -709,7 +709,7 @@ int acpi_pci_link_free_irq(acpi_handle handle) acpi_device_bid(link->device))); if (link->refcnt == 0) { - acpi_evaluate_object(link->device->handle, "_DIS", NULL, NULL); + acpi_ut_evaluate_object(link->device->handle, "_DIS", 0, NULL); } mutex_unlock(&acpi_link_lock); return (link->irq.active); @@ -773,7 +773,7 @@ static int acpi_pci_link_add(struct acpi_device *device) end: /* disable all links -- to be activated on use */ - acpi_evaluate_object(device->handle, "_DIS", NULL, NULL); + acpi_ut_evaluate_object(device->handle, "_DIS", 0, NULL); mutex_unlock(&acpi_link_lock); if (result) diff --git a/trunk/drivers/acpi/power.c b/trunk/drivers/acpi/power.c index 7ff7349c0c52..4ab21cb1c8c7 100644 --- a/trunk/drivers/acpi/power.c +++ b/trunk/drivers/acpi/power.c @@ -54,14 +54,6 @@ ACPI_MODULE_NAME("power"); #define ACPI_POWER_RESOURCE_STATE_OFF 0x00 #define ACPI_POWER_RESOURCE_STATE_ON 0x01 #define ACPI_POWER_RESOURCE_STATE_UNKNOWN 0xFF - -#ifdef MODULE_PARAM_PREFIX -#undef MODULE_PARAM_PREFIX -#endif -#define MODULE_PARAM_PREFIX "acpi." -int acpi_power_nocheck; -module_param_named(power_nocheck, acpi_power_nocheck, bool, 000); - static int acpi_power_add(struct acpi_device *device); static int acpi_power_remove(struct acpi_device *device, int type); static int acpi_power_resume(struct acpi_device *device); @@ -136,16 +128,16 @@ acpi_power_get_context(acpi_handle handle, return 0; } -static int acpi_power_get_state(acpi_handle handle, int *state) +static int acpi_power_get_state(struct acpi_power_resource *resource, int *state) { acpi_status status = AE_OK; unsigned long sta = 0; - if (!handle || !state) + if (!resource || !state) return -EINVAL; - status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); + status = acpi_evaluate_integer(resource->device->handle, "_STA", NULL, &sta); if (ACPI_FAILURE(status)) return -ENODEV; @@ -153,7 +145,7 @@ static int acpi_power_get_state(acpi_handle handle, int *state) ACPI_POWER_RESOURCE_STATE_OFF; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] is %s\n", - acpi_ut_get_node_name(handle), state ? "on" : "off")); + resource->name, state ? "on" : "off")); return 0; } @@ -161,6 +153,7 @@ static int acpi_power_get_state(acpi_handle handle, int *state) static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state) { int result = 0, state1; + struct acpi_power_resource *resource = NULL; u32 i = 0; @@ -168,15 +161,12 @@ static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state) return -EINVAL; /* The state of the list is 'on' IFF all resources are 'on'. */ - /* */ for (i = 0; i < list->count; i++) { - /* - * The state of the power resource can be obtained by - * using the ACPI handle. In such case it is unnecessary to - * get the Power resource first and then get its state again. - */ - result = acpi_power_get_state(list->handles[i], &state1); + result = acpi_power_get_context(list->handles[i], &resource); + if (result) + return result; + result = acpi_power_get_state(resource, &state1); if (result) return result; @@ -236,18 +226,12 @@ static int acpi_power_on(acpi_handle handle, struct acpi_device *dev) if (ACPI_FAILURE(status)) return -ENODEV; - if (!acpi_power_nocheck) { - /* - * If acpi_power_nocheck is set, it is unnecessary to check - * the power state after power transition. - */ - result = acpi_power_get_state(resource->device->handle, - &state); - if (result) - return result; - if (state != ACPI_POWER_RESOURCE_STATE_ON) - return -ENOEXEC; - } + result = acpi_power_get_state(resource, &state); + if (result) + return result; + if (state != ACPI_POWER_RESOURCE_STATE_ON) + return -ENOEXEC; + /* Update the power resource's _device_ power state */ resource->device->power.state = ACPI_STATE_D0; @@ -293,17 +277,11 @@ static int acpi_power_off_device(acpi_handle handle, struct acpi_device *dev) if (ACPI_FAILURE(status)) return -ENODEV; - if (!acpi_power_nocheck) { - /* - * If acpi_power_nocheck is set, it is unnecessary to check - * the power state after power transition. - */ - result = acpi_power_get_state(handle, &state); - if (result) - return result; - if (state != ACPI_POWER_RESOURCE_STATE_OFF) - return -ENOEXEC; - } + result = acpi_power_get_state(resource, &state); + if (result) + return result; + if (state != ACPI_POWER_RESOURCE_STATE_OFF) + return -ENOEXEC; /* Update the power resource's _device_ power state */ resource->device->power.state = ACPI_STATE_D3; @@ -577,7 +555,7 @@ static int acpi_power_seq_show(struct seq_file *seq, void *offset) if (!resource) goto end; - result = acpi_power_get_state(resource->device->handle, &state); + result = acpi_power_get_state(resource, &state); if (result) goto end; @@ -690,7 +668,7 @@ static int acpi_power_add(struct acpi_device *device) resource->system_level = acpi_object.power_resource.system_level; resource->order = acpi_object.power_resource.resource_order; - result = acpi_power_get_state(device->handle, &state); + result = acpi_power_get_state(resource, &state); if (result) goto end; @@ -757,7 +735,7 @@ static int acpi_power_resume(struct acpi_device *device) resource = (struct acpi_power_resource *)acpi_driver_data(device); - result = acpi_power_get_state(device->handle, &state); + result = acpi_power_get_state(resource, &state); if (result) return result; diff --git a/trunk/drivers/acpi/processor_perflib.c b/trunk/drivers/acpi/processor_perflib.c index 242f8143008a..80c251ec6d2a 100644 --- a/trunk/drivers/acpi/processor_perflib.c +++ b/trunk/drivers/acpi/processor_perflib.c @@ -38,7 +38,6 @@ #include #endif -#include #include #include @@ -335,6 +334,7 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr) acpi_status status = AE_OK; acpi_handle handle = NULL; + if (!pr || !pr->performance || !pr->handle) return -EINVAL; @@ -347,25 +347,13 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr) result = acpi_processor_get_performance_control(pr); if (result) - goto update_bios; + return result; result = acpi_processor_get_performance_states(pr); if (result) - goto update_bios; + return result; return 0; - - /* - * Having _PPC but missing frequencies (_PSS, _PCT) is a very good hint that - * the BIOS is older than the CPU and does not know its frequencies - */ - update_bios: - if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){ - if(boot_cpu_has(X86_FEATURE_EST)) - printk(KERN_WARNING FW_BUG "BIOS needs update for CPU " - "frequency support\n"); - } - return result; } int acpi_processor_notify_smm(struct module *calling_module) diff --git a/trunk/drivers/acpi/scan.c b/trunk/drivers/acpi/scan.c index 91fed422bae8..f6f52c1a2aba 100644 --- a/trunk/drivers/acpi/scan.c +++ b/trunk/drivers/acpi/scan.c @@ -276,13 +276,6 @@ int acpi_match_device_ids(struct acpi_device *device, { const struct acpi_device_id *id; - /* - * If the device is not present, it is unnecessary to load device - * driver for it. - */ - if (!device->status.present) - return -ENODEV; - if (device->flags.hardware_id) { for (id = ids; id->id[0]; id++) { if (!strcmp((char*)id->id, device->pnp.hardware_id)) @@ -814,7 +807,6 @@ static int acpi_bus_get_power_flags(struct acpi_device *device) /* TBD: System wake support and resource requirements. */ device->power.state = ACPI_STATE_UNKNOWN; - acpi_bus_get_power(device->handle, &(device->power.state)); return 0; } @@ -1160,6 +1152,20 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice) return 0; } +static int +acpi_is_child_device(struct acpi_device *device, + int (*matcher)(struct acpi_device *)) +{ + int result = -ENODEV; + + do { + if (ACPI_SUCCESS(matcher(device))) + return AE_OK; + } while ((device = device->parent)); + + return result; +} + static int acpi_add_single_object(struct acpi_device **child, struct acpi_device *parent, acpi_handle handle, int type, @@ -1215,18 +1221,15 @@ acpi_add_single_object(struct acpi_device **child, result = -ENODEV; goto end; } - /* - * When the device is neither present nor functional, the - * device should not be added to Linux ACPI device tree. - * When the status of the device is not present but functinal, - * it should be added to Linux ACPI tree. For example : bay - * device , dock device. - * In such conditions it is unncessary to check whether it is - * bay device or dock device. - */ - if (!device->status.present && !device->status.functional) { - result = -ENODEV; - goto end; + if (!device->status.present) { + /* Bay and dock should be handled even if absent */ + if (!ACPI_SUCCESS( + acpi_is_child_device(device, acpi_bay_match)) && + !ACPI_SUCCESS( + acpi_is_child_device(device, acpi_dock_match))) { + result = -ENODEV; + goto end; + } } break; default: @@ -1248,16 +1251,6 @@ acpi_add_single_object(struct acpi_device **child, */ acpi_device_set_id(device, parent, handle, type); - /* - * The ACPI device is attached to acpi handle before getting - * the power/wakeup/peformance flags. Otherwise OS can't get - * the corresponding ACPI device by the acpi handle in the course - * of getting the power/wakeup/performance flags. - */ - result = acpi_device_set_context(device, type); - if (result) - goto end; - /* * Power Management * ---------------- @@ -1288,6 +1281,8 @@ acpi_add_single_object(struct acpi_device **child, goto end; } + if ((result = acpi_device_set_context(device, type))) + goto end; result = acpi_device_register(device, parent); @@ -1407,12 +1402,7 @@ static int acpi_bus_scan(struct acpi_device *start, struct acpi_bus_ops *ops) * TBD: Need notifications and other detection mechanisms * in place before we can fully implement this. */ - /* - * When the device is not present but functional, it is also - * necessary to scan the children of this device. - */ - if (child->status.present || (!child->status.present && - child->status.functional)) { + if (child->status.present) { status = acpi_get_next_object(ACPI_TYPE_ANY, chandle, NULL, NULL); if (ACPI_SUCCESS(status)) { diff --git a/trunk/drivers/acpi/wmi.c b/trunk/drivers/acpi/wmi.c index 47cd7baf9b1b..cfe2c833474d 100644 --- a/trunk/drivers/acpi/wmi.c +++ b/trunk/drivers/acpi/wmi.c @@ -217,35 +217,6 @@ static bool find_guid(const char *guid_string, struct wmi_block **out) return 0; } -static acpi_status wmi_method_enable(struct wmi_block *wblock, int enable) -{ - struct guid_block *block = NULL; - char method[5]; - struct acpi_object_list input; - union acpi_object params[1]; - acpi_status status; - acpi_handle handle; - - block = &wblock->gblock; - handle = wblock->handle; - - if (!block) - return AE_NOT_EXIST; - - input.count = 1; - input.pointer = params; - params[0].type = ACPI_TYPE_INTEGER; - params[0].integer.value = enable; - - snprintf(method, 5, "WE%02X", block->notify_id); - status = acpi_evaluate_object(handle, method, &input, NULL); - - if (status != AE_OK && status != AE_NOT_FOUND) - return status; - else - return AE_OK; -} - /* * Exported WMI functions */ @@ -271,7 +242,7 @@ u32 method_id, const struct acpi_buffer *in, struct acpi_buffer *out) char method[4] = "WM"; if (!find_guid(guid_string, &wblock)) - return AE_ERROR; + return AE_BAD_ADDRESS; block = &wblock->gblock; handle = wblock->handle; @@ -333,7 +304,7 @@ struct acpi_buffer *out) return AE_BAD_PARAMETER; if (!find_guid(guid_string, &wblock)) - return AE_ERROR; + return AE_BAD_ADDRESS; block = &wblock->gblock; handle = wblock->handle; @@ -343,7 +314,7 @@ struct acpi_buffer *out) /* Check GUID is a data block */ if (block->flags & (ACPI_WMI_EVENT | ACPI_WMI_METHOD)) - return AE_ERROR; + return AE_BAD_ADDRESS; input.count = 1; input.pointer = wq_params; @@ -414,7 +385,7 @@ const struct acpi_buffer *in) return AE_BAD_DATA; if (!find_guid(guid_string, &wblock)) - return AE_ERROR; + return AE_BAD_ADDRESS; block = &wblock->gblock; handle = wblock->handle; @@ -424,7 +395,7 @@ const struct acpi_buffer *in) /* Check GUID is a data block */ if (block->flags & (ACPI_WMI_EVENT | ACPI_WMI_METHOD)) - return AE_ERROR; + return AE_BAD_ADDRESS; input.count = 2; input.pointer = params; @@ -456,7 +427,6 @@ acpi_status wmi_install_notify_handler(const char *guid, wmi_notify_handler handler, void *data) { struct wmi_block *block; - acpi_status status; if (!guid || !handler) return AE_BAD_PARAMETER; @@ -471,9 +441,7 @@ wmi_notify_handler handler, void *data) block->handler = handler; block->handler_data = data; - status = wmi_method_enable(block, 1); - - return status; + return AE_OK; } EXPORT_SYMBOL_GPL(wmi_install_notify_handler); @@ -485,7 +453,6 @@ EXPORT_SYMBOL_GPL(wmi_install_notify_handler); acpi_status wmi_remove_notify_handler(const char *guid) { struct wmi_block *block; - acpi_status status; if (!guid) return AE_BAD_PARAMETER; @@ -497,12 +464,10 @@ acpi_status wmi_remove_notify_handler(const char *guid) if (!block->handler) return AE_NULL_ENTRY; - status = wmi_method_enable(block, 0); - block->handler = NULL; block->handler_data = NULL; - return status; + return AE_OK; } EXPORT_SYMBOL_GPL(wmi_remove_notify_handler); diff --git a/trunk/drivers/misc/Kconfig b/trunk/drivers/misc/Kconfig index 6abb95919c38..a726f3b01a6b 100644 --- a/trunk/drivers/misc/Kconfig +++ b/trunk/drivers/misc/Kconfig @@ -145,7 +145,6 @@ config ACER_WMI depends on NEW_LEDS depends on BACKLIGHT_CLASS_DEVICE depends on SERIO_I8042 - depends on RFKILL select ACPI_WMI ---help--- This is a driver for newer Acer (and Wistron) laptops. It adds diff --git a/trunk/drivers/misc/acer-wmi.c b/trunk/drivers/misc/acer-wmi.c index 0532a2de2ce4..d8b0d326e452 100644 --- a/trunk/drivers/misc/acer-wmi.c +++ b/trunk/drivers/misc/acer-wmi.c @@ -33,8 +33,6 @@ #include #include #include -#include -#include #include #include @@ -125,15 +123,21 @@ enum interface_flags { static int max_brightness = 0xF; +static int wireless = -1; +static int bluetooth = -1; static int mailled = -1; static int brightness = -1; static int threeg = -1; static int force_series; module_param(mailled, int, 0444); +module_param(wireless, int, 0444); +module_param(bluetooth, int, 0444); module_param(brightness, int, 0444); module_param(threeg, int, 0444); module_param(force_series, int, 0444); +MODULE_PARM_DESC(wireless, "Set initial state of Wireless hardware"); +MODULE_PARM_DESC(bluetooth, "Set initial state of Bluetooth hardware"); MODULE_PARM_DESC(mailled, "Set initial state of Mail LED"); MODULE_PARM_DESC(brightness, "Set initial LCD backlight brightness"); MODULE_PARM_DESC(threeg, "Set initial state of 3G hardware"); @@ -141,6 +145,8 @@ MODULE_PARM_DESC(force_series, "Force a different laptop series"); struct acer_data { int mailled; + int wireless; + int bluetooth; int threeg; int brightness; }; @@ -151,9 +157,6 @@ struct acer_debug { u32 wmid_devices; }; -static struct rfkill *wireless_rfkill; -static struct rfkill *bluetooth_rfkill; - /* Each low-level interface must define at least some of the following */ struct wmi_interface { /* The WMI device type */ @@ -473,7 +476,7 @@ struct wmi_interface *iface) } break; default: - return AE_ERROR; + return AE_BAD_ADDRESS; } return AE_OK; } @@ -511,7 +514,7 @@ static acpi_status AMW0_set_u32(u32 value, u32 cap, struct wmi_interface *iface) break; } default: - return AE_ERROR; + return AE_BAD_ADDRESS; } /* Actually do the set */ @@ -686,7 +689,7 @@ struct wmi_interface *iface) return 0; } default: - return AE_ERROR; + return AE_BAD_ADDRESS; } status = WMI_execute_u32(method_id, 0, &result); @@ -732,7 +735,7 @@ static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface) } break; default: - return AE_ERROR; + return AE_BAD_ADDRESS; } return WMI_execute_u32(method_id, (u32)value, NULL); } @@ -782,7 +785,7 @@ static struct wmi_interface wmid_interface = { static acpi_status get_u32(u32 *value, u32 cap) { - acpi_status status = AE_ERROR; + acpi_status status = AE_BAD_ADDRESS; switch (interface->type) { case ACER_AMW0: @@ -843,6 +846,8 @@ static void __init acer_commandline_init(void) * capability isn't available on the given interface */ set_u32(mailled, ACER_CAP_MAILLED); + set_u32(wireless, ACER_CAP_WIRELESS); + set_u32(bluetooth, ACER_CAP_BLUETOOTH); set_u32(threeg, ACER_CAP_THREEG); set_u32(brightness, ACER_CAP_BRIGHTNESS); } @@ -928,135 +933,40 @@ static void acer_backlight_exit(void) } /* - * Rfkill devices + * Read/ write bool sysfs macro */ -static void acer_rfkill_update(struct work_struct *ignored); -static DECLARE_DELAYED_WORK(acer_rfkill_work, acer_rfkill_update); -static void acer_rfkill_update(struct work_struct *ignored) -{ - u32 state; - acpi_status status; - - status = get_u32(&state, ACER_CAP_WIRELESS); - if (ACPI_SUCCESS(status)) - rfkill_force_state(wireless_rfkill, state ? - RFKILL_STATE_UNBLOCKED : RFKILL_STATE_SOFT_BLOCKED); - - if (has_cap(ACER_CAP_BLUETOOTH)) { - status = get_u32(&state, ACER_CAP_BLUETOOTH); - if (ACPI_SUCCESS(status)) - rfkill_force_state(bluetooth_rfkill, state ? - RFKILL_STATE_UNBLOCKED : - RFKILL_STATE_SOFT_BLOCKED); - } - - schedule_delayed_work(&acer_rfkill_work, round_jiffies_relative(HZ)); -} - -static int acer_rfkill_set(void *data, enum rfkill_state state) -{ - acpi_status status; - u32 *cap = data; - status = set_u32((u32) (state == RFKILL_STATE_UNBLOCKED), *cap); - if (ACPI_FAILURE(status)) - return -ENODEV; - return 0; -} - -static struct rfkill * acer_rfkill_register(struct device *dev, -enum rfkill_type type, char *name, u32 cap) -{ - int err; - u32 state; - u32 *data; - struct rfkill *rfkill_dev; - - rfkill_dev = rfkill_allocate(dev, type); - if (!rfkill_dev) - return ERR_PTR(-ENOMEM); - rfkill_dev->name = name; - get_u32(&state, cap); - rfkill_dev->state = state ? RFKILL_STATE_UNBLOCKED : - RFKILL_STATE_SOFT_BLOCKED; - data = kzalloc(sizeof(u32), GFP_KERNEL); - if (!data) { - rfkill_free(rfkill_dev); - return ERR_PTR(-ENOMEM); - } - *data = cap; - rfkill_dev->data = data; - rfkill_dev->toggle_radio = acer_rfkill_set; - rfkill_dev->user_claim_unsupported = 1; - - err = rfkill_register(rfkill_dev); - if (err) { - kfree(rfkill_dev->data); - rfkill_free(rfkill_dev); - return ERR_PTR(err); - } - return rfkill_dev; -} - -static int acer_rfkill_init(struct device *dev) -{ - wireless_rfkill = acer_rfkill_register(dev, RFKILL_TYPE_WLAN, - "acer-wireless", ACER_CAP_WIRELESS); - if (IS_ERR(wireless_rfkill)) - return PTR_ERR(wireless_rfkill); - - if (has_cap(ACER_CAP_BLUETOOTH)) { - bluetooth_rfkill = acer_rfkill_register(dev, - RFKILL_TYPE_BLUETOOTH, "acer-bluetooth", - ACER_CAP_BLUETOOTH); - if (IS_ERR(bluetooth_rfkill)) { - kfree(wireless_rfkill->data); - rfkill_unregister(wireless_rfkill); - return PTR_ERR(bluetooth_rfkill); - } - } - - schedule_delayed_work(&acer_rfkill_work, round_jiffies_relative(HZ)); - - return 0; -} - -static void acer_rfkill_exit(void) -{ - cancel_delayed_work_sync(&acer_rfkill_work); - kfree(wireless_rfkill->data); - rfkill_unregister(wireless_rfkill); - if (has_cap(ACER_CAP_BLUETOOTH)) { - kfree(wireless_rfkill->data); - rfkill_unregister(bluetooth_rfkill); - } - return; -} +#define show_set_bool(value, cap) \ +static ssize_t \ +show_bool_##value(struct device *dev, struct device_attribute *attr, \ + char *buf) \ +{ \ + u32 result; \ + acpi_status status = get_u32(&result, cap); \ + if (ACPI_SUCCESS(status)) \ + return sprintf(buf, "%u\n", result); \ + return sprintf(buf, "Read error\n"); \ +} \ +\ +static ssize_t \ +set_bool_##value(struct device *dev, struct device_attribute *attr, \ + const char *buf, size_t count) \ +{ \ + u32 tmp = simple_strtoul(buf, NULL, 10); \ + acpi_status status = set_u32(tmp, cap); \ + if (ACPI_FAILURE(status)) \ + return -EINVAL; \ + return count; \ +} \ +static DEVICE_ATTR(value, S_IWUGO | S_IRUGO | S_IWUSR, \ + show_bool_##value, set_bool_##value); + +show_set_bool(wireless, ACER_CAP_WIRELESS); +show_set_bool(bluetooth, ACER_CAP_BLUETOOTH); +show_set_bool(threeg, ACER_CAP_THREEG); /* - * sysfs interface + * Read interface sysfs macro */ -static ssize_t show_bool_threeg(struct device *dev, - struct device_attribute *attr, char *buf) -{ - u32 result; \ - acpi_status status = get_u32(&result, ACER_CAP_THREEG); - if (ACPI_SUCCESS(status)) - return sprintf(buf, "%u\n", result); - return sprintf(buf, "Read error\n"); -} - -static ssize_t set_bool_threeg(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count) -{ - u32 tmp = simple_strtoul(buf, NULL, 10); - acpi_status status = set_u32(tmp, ACER_CAP_THREEG); - if (ACPI_FAILURE(status)) - return -EINVAL; - return count; -} -static DEVICE_ATTR(threeg, S_IWUGO | S_IRUGO | S_IWUSR, show_bool_threeg, - set_bool_threeg); - static ssize_t show_interface(struct device *dev, struct device_attribute *attr, char *buf) { @@ -1116,9 +1026,7 @@ static int __devinit acer_platform_probe(struct platform_device *device) goto error_brightness; } - err = acer_rfkill_init(&device->dev); - - return err; + return 0; error_brightness: acer_led_exit(); @@ -1132,8 +1040,6 @@ static int acer_platform_remove(struct platform_device *device) acer_led_exit(); if (has_cap(ACER_CAP_BRIGHTNESS)) acer_backlight_exit(); - - acer_rfkill_exit(); return 0; } @@ -1146,6 +1052,16 @@ pm_message_t state) if (!data) return -ENOMEM; + if (has_cap(ACER_CAP_WIRELESS)) { + get_u32(&value, ACER_CAP_WIRELESS); + data->wireless = value; + } + + if (has_cap(ACER_CAP_BLUETOOTH)) { + get_u32(&value, ACER_CAP_BLUETOOTH); + data->bluetooth = value; + } + if (has_cap(ACER_CAP_MAILLED)) { get_u32(&value, ACER_CAP_MAILLED); data->mailled = value; @@ -1166,6 +1082,15 @@ static int acer_platform_resume(struct platform_device *device) if (!data) return -ENOMEM; + if (has_cap(ACER_CAP_WIRELESS)) + set_u32(data->wireless, ACER_CAP_WIRELESS); + + if (has_cap(ACER_CAP_BLUETOOTH)) + set_u32(data->bluetooth, ACER_CAP_BLUETOOTH); + + if (has_cap(ACER_CAP_THREEG)) + set_u32(data->threeg, ACER_CAP_THREEG); + if (has_cap(ACER_CAP_MAILLED)) set_u32(data->mailled, ACER_CAP_MAILLED); @@ -1190,6 +1115,12 @@ static struct platform_device *acer_platform_device; static int remove_sysfs(struct platform_device *device) { + if (has_cap(ACER_CAP_WIRELESS)) + device_remove_file(&device->dev, &dev_attr_wireless); + + if (has_cap(ACER_CAP_BLUETOOTH)) + device_remove_file(&device->dev, &dev_attr_bluetooth); + if (has_cap(ACER_CAP_THREEG)) device_remove_file(&device->dev, &dev_attr_threeg); @@ -1202,6 +1133,20 @@ static int create_sysfs(void) { int retval = -ENOMEM; + if (has_cap(ACER_CAP_WIRELESS)) { + retval = device_create_file(&acer_platform_device->dev, + &dev_attr_wireless); + if (retval) + goto error_sysfs; + } + + if (has_cap(ACER_CAP_BLUETOOTH)) { + retval = device_create_file(&acer_platform_device->dev, + &dev_attr_bluetooth); + if (retval) + goto error_sysfs; + } + if (has_cap(ACER_CAP_THREEG)) { retval = device_create_file(&acer_platform_device->dev, &dev_attr_threeg); diff --git a/trunk/drivers/pnp/pnpacpi/core.c b/trunk/drivers/pnp/pnpacpi/core.c index 98b9df7776e9..c1b9ea34977b 100644 --- a/trunk/drivers/pnp/pnpacpi/core.c +++ b/trunk/drivers/pnp/pnpacpi/core.c @@ -148,13 +148,9 @@ static int __init pnpacpi_add_device(struct acpi_device *device) acpi_status status; struct pnp_dev *dev; - /* - * If a PnPacpi device is not present , the device - * driver should not be loaded. - */ status = acpi_get_handle(device->handle, "_CRS", &temp); if (ACPI_FAILURE(status) || !ispnpidacpi(acpi_device_hid(device)) || - is_exclusive_device(device) || (!device->status.present)) + is_exclusive_device(device)) return 0; dev = pnp_alloc_dev(&pnpacpi_protocol, num, acpi_device_hid(device)); diff --git a/trunk/include/acpi/acpi_drivers.h b/trunk/include/acpi/acpi_drivers.h index efbaa271ee11..e5f38e5ce86f 100644 --- a/trunk/include/acpi/acpi_drivers.h +++ b/trunk/include/acpi/acpi_drivers.h @@ -93,7 +93,6 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state); int acpi_disable_wakeup_device_power(struct acpi_device *dev); int acpi_power_get_inferred_state(struct acpi_device *device); int acpi_power_transition(struct acpi_device *device, int state); -extern int acpi_power_nocheck; #endif /* -------------------------------------------------------------------------- diff --git a/trunk/include/linux/kernel.h b/trunk/include/linux/kernel.h index 0b19848e380e..2651f805ba6d 100644 --- a/trunk/include/linux/kernel.h +++ b/trunk/include/linux/kernel.h @@ -190,30 +190,6 @@ extern int kernel_text_address(unsigned long addr); struct pid; extern struct pid *session_of_pgrp(struct pid *pgrp); -/* - * FW_BUG - * Add this to a message where you are sure the firmware is buggy or behaves - * really stupid or out of spec. Be aware that the responsible BIOS developer - * should be able to fix this issue or at least get a concrete idea of the - * problem by reading your message without the need of looking at the kernel - * code. - * - * Use it for definite and high priority BIOS bugs. - * - * FW_WARN - * Use it for not that clear (e.g. could the kernel messed up things already?) - * and medium priority BIOS bugs. - * - * FW_INFO - * Use this one if you want to tell the user or vendor about something - * suspicious, but generally harmless related to the firmware. - * - * Use it for information or very low priority BIOS bugs. - */ -#define FW_BUG "[Firmware Bug]: " -#define FW_WARN "[Firmware Warn]: " -#define FW_INFO "[Firmware Info]: " - #ifdef CONFIG_PRINTK asmlinkage int vprintk(const char *fmt, va_list args) __attribute__ ((format (printf, 1, 0)));