Commit c2778660 authored by Richard Russon's avatar Richard Russon

Merge flatcap.org:/home/flatcap/backup/bk/ntfs-2.6

into flatcap.org:/home/flatcap/backup/bk/ntfs-2.6-devel
parents 6c2447fd e5689329
...@@ -135,6 +135,20 @@ running once the system is up. ...@@ -135,6 +135,20 @@ running once the system is up.
Recognize and ignore IRQ0/pin2 Interrupt Override. Recognize and ignore IRQ0/pin2 Interrupt Override.
For broken nForce2 BIOS resulting in XT-PIC timer. For broken nForce2 BIOS resulting in XT-PIC timer.
acpi_dbg_layer= [HW,ACPI]
Format: <int>
Each bit of the <int> indicates an acpi debug layer,
1: enable, 0: disable. It is useful for boot time
debugging. After system has booted up, it can be set
via /proc/acpi/debug_layer.
acpi_dbg_level= [HW,ACPI]
Format: <int>
Each bit of the <int> indicates an acpi debug level,
1: enable, 0: disable. It is useful for boot time
debugging. After system has booted up, it can be set
via /proc/acpi/debug_level.
ad1816= [HW,OSS] ad1816= [HW,OSS]
Format: <io>,<irq>,<dma>,<dma2> Format: <io>,<irq>,<dma>,<dma2>
See also Documentation/sound/oss/AD1816. See also Documentation/sound/oss/AD1816.
......
...@@ -71,6 +71,7 @@ int acpi_ht __initdata = 1; /* enable HT */ ...@@ -71,6 +71,7 @@ int acpi_ht __initdata = 1; /* enable HT */
int acpi_lapic; int acpi_lapic;
int acpi_ioapic; int acpi_ioapic;
int acpi_strict; int acpi_strict;
EXPORT_SYMBOL(acpi_strict);
acpi_interrupt_flags acpi_sci_flags __initdata; acpi_interrupt_flags acpi_sci_flags __initdata;
int acpi_sci_override_gsi __initdata; int acpi_sci_override_gsi __initdata;
...@@ -829,10 +830,16 @@ acpi_boot_init (void) ...@@ -829,10 +830,16 @@ acpi_boot_init (void)
*/ */
error = acpi_blacklisted(); error = acpi_blacklisted();
if (error) { if (error) {
printk(KERN_WARNING PREFIX "BIOS listed in blacklist, disabling ACPI support\n"); extern int acpi_force;
if (acpi_force) {
printk(KERN_WARNING PREFIX "acpi=force override\n");
} else {
printk(KERN_WARNING PREFIX "Disabling ACPI support\n");
disable_acpi(); disable_acpi();
return error; return error;
} }
}
/* /*
* set sci_int and PM timer address * set sci_int and PM timer address
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/acpi.h> #include <linux/acpi.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -444,41 +444,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={ ...@@ -444,41 +444,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
{ NULL, } { NULL, }
}; };
/*
* Walk the blacklist table running matching functions until someone
* returns 1 or we hit the end.
*/
static __init void dmi_check_blacklist(void)
{
#ifdef CONFIG_ACPI_BOOT
#define ACPI_BLACKLIST_CUTOFF_YEAR 2001
if (dmi_ident[DMI_BIOS_DATE]) {
char *s = strrchr(dmi_ident[DMI_BIOS_DATE], '/');
if (s) {
int year, disable = 0;
s++;
year = simple_strtoul(s,NULL,0);
if (year >= 1000)
disable = year < ACPI_BLACKLIST_CUTOFF_YEAR;
else if (year < 1 || (year > 90 && year <= 99))
disable = 1;
if (disable && !acpi_force) {
printk(KERN_NOTICE "ACPI disabled because your bios is from %s and too old\n", s);
printk(KERN_NOTICE "You can enable it with acpi=force\n");
disable_acpi();
}
}
}
#endif
dmi_check_system(dmi_blacklist);
}
/* /*
* Process a DMI table entry. Right now all we care about are the BIOS * Process a DMI table entry. Right now all we care about are the BIOS
* and machine entries. For 2.5 we should pull the smbus controller info * and machine entries. For 2.5 we should pull the smbus controller info
...@@ -535,7 +500,7 @@ void __init dmi_scan_machine(void) ...@@ -535,7 +500,7 @@ void __init dmi_scan_machine(void)
{ {
int err = dmi_iterate(dmi_decode); int err = dmi_iterate(dmi_decode);
if(err == 0) if(err == 0)
dmi_check_blacklist(); dmi_check_system(dmi_blacklist);
else else
printk(KERN_INFO "DMI not present.\n"); printk(KERN_INFO "DMI not present.\n");
} }
......
...@@ -2520,15 +2520,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a ...@@ -2520,15 +2520,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq,
edge_level, active_high_low); edge_level, active_high_low);
if (use_pci_vector() && !platform_legacy_irq(irq)) ioapic_register_intr(irq, entry.vector, edge_level);
irq = IO_APIC_VECTOR(irq);
if (edge_level) {
irq_desc[irq].handler = &ioapic_level_type;
} else {
irq_desc[irq].handler = &ioapic_edge_type;
}
set_intr_gate(entry.vector, interrupt[irq]);
if (!ioapic && (irq < 16)) if (!ioapic && (irq < 16))
disable_8259A_irq(irq); disable_8259A_irq(irq);
......
/*
* Copyright (C) 2004 Matthew Wilcox <matthew@wil.cx>
* Copyright (C) 2004 Intel Corp.
*
* This code is released under the GNU General Public License version 2.
*/
/* /*
* mmconfig.c - Low-level direct PCI config space access via MMCONFIG * mmconfig.c - Low-level direct PCI config space access via MMCONFIG
*/ */
......
...@@ -2029,15 +2029,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a ...@@ -2029,15 +2029,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq,
edge_level, active_high_low); edge_level, active_high_low);
if (use_pci_vector() && !platform_legacy_irq(irq)) ioapic_register_intr(irq, entry.vector, edge_level);
irq = IO_APIC_VECTOR(irq);
if (edge_level) {
irq_desc[irq].handler = &ioapic_level_type;
} else {
irq_desc[irq].handler = &ioapic_edge_type;
}
set_intr_gate(entry.vector, interrupt[irq]);
if (!ioapic && (irq < 16)) if (!ioapic && (irq < 16))
disable_8259A_irq(irq); disable_8259A_irq(irq);
......
...@@ -71,7 +71,7 @@ EXPORT_SYMBOL(acpi_disabled); ...@@ -71,7 +71,7 @@ EXPORT_SYMBOL(acpi_disabled);
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI_BOOT
extern int __initdata acpi_ht; extern int __initdata acpi_ht;
extern acpi_interrupt_flags acpi_sci_flags; extern acpi_interrupt_flags acpi_sci_flags;
/* int __initdata acpi_force = 0; */ int __initdata acpi_force = 0;
#endif #endif
/* For PCI or other memory-mapped resources */ /* For PCI or other memory-mapped resources */
...@@ -251,14 +251,14 @@ static __init void parse_cmdline_early (char ** cmdline_p) ...@@ -251,14 +251,14 @@ static __init void parse_cmdline_early (char ** cmdline_p)
if (!memcmp(from, "acpi=force", 10)) { if (!memcmp(from, "acpi=force", 10)) {
/* add later when we do DMI horrors: */ /* add later when we do DMI horrors: */
/* acpi_force = 1; */ acpi_force = 1;
acpi_disabled = 0; acpi_disabled = 0;
} }
/* acpi=ht just means: do ACPI MADT parsing /* acpi=ht just means: do ACPI MADT parsing
at bootup, but don't enable the full ACPI interpreter */ at bootup, but don't enable the full ACPI interpreter */
if (!memcmp(from, "acpi=ht", 7)) { if (!memcmp(from, "acpi=ht", 7)) {
/* if (!acpi_force) */ if (!acpi_force)
disable_acpi(); disable_acpi();
acpi_ht = 1; acpi_ht = 1;
} }
......
...@@ -204,6 +204,32 @@ config ACPI_TOSHIBA ...@@ -204,6 +204,32 @@ config ACPI_TOSHIBA
If you have a legacy free Toshiba laptop (such as the Libretto L1 If you have a legacy free Toshiba laptop (such as the Libretto L1
series), say Y. series), say Y.
config ACPI_CUSTOM_DSDT
bool "Include Custom DSDT"
depends on X86 && ACPI_INTERPRETER && !STANDALONE
default n
help
Thist option is to load a custom ACPI DSDT
If you don't know what that is, say N.
config ACPI_CUSTOM_DSDT_FILE
string "Custom DSDT Table file to include"
depends on ACPI_CUSTOM_DSDT
default ""
help
Enter the full path name to the file wich includes the AmlCode declaration.
config ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year"
default 0
help
enter a 4-digit year, eg. 2001 to disable ACPI by default
on platforms with DMI BIOS date before January 1st that year.
"acpi=force" can be used to override this mechanism.
Enter 0 to disable this mechanism and allow ACPI to
run by default no matter what the year. (default)
config ACPI_DEBUG config ACPI_DEBUG
bool "Debug Statements" bool "Debug Statements"
depends on ACPI_INTERPRETER depends on ACPI_INTERPRETER
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include <acpi/acpi_bus.h> #include <acpi/acpi_bus.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#define ASUS_ACPI_VERSION "0.28" #define ASUS_ACPI_VERSION "0.29"
#define PROC_ASUS "asus" //the directory #define PROC_ASUS "asus" //the directory
#define PROC_MLED "mled" #define PROC_MLED "mled"
...@@ -129,10 +129,12 @@ struct asus_hotk { ...@@ -129,10 +129,12 @@ struct asus_hotk {
M1A, //M1300A M1A, //M1300A
M2E, //M2400E, L4400L M2E, //M2400E, L4400L
M6N, //M6800N M6N, //M6800N
M6R, //M6700R
P30, //Samsung P30 P30, //Samsung P30
S1x, //S1300A, but also L1400B and M2400A (L84F) S1x, //S1300A, but also L1400B and M2400A (L84F)
S2x, //S200 (J1 reported), Victor MP-XP7210 S2x, //S200 (J1 reported), Victor MP-XP7210
xxN, //M2400N, M3700N, M5200N, S1300N, S5200N (Centrino) xxN, //M2400N, M3700N, M5200N, S1300N, S5200N, W1OOON
//(Centrino)
END_MODEL END_MODEL
} model; //Models currently supported } model; //Models currently supported
u16 event_count[128]; //count for each event TODO make this better u16 event_count[128]; //count for each event TODO make this better
...@@ -315,6 +317,18 @@ static struct model_data model_conf[END_MODEL] = { ...@@ -315,6 +317,18 @@ static struct model_data model_conf[END_MODEL] = {
.display_set = "SDSP", .display_set = "SDSP",
.display_get = "\\SSTE" .display_get = "\\SSTE"
}, },
{
.name = "M6R",
.mt_mled = "MLED",
.mt_wled = "WLED",
.mt_lcd_switch = xxN_PREFIX "_Q10",
.lcd_status = "\\_SB.PCI0.SBSM.SEO4",
.brightness_set = "SPLV",
.brightness_get = "GPLV",
.display_set = "SDSP",
.display_get = "\\SSTE"
},
{ {
.name = "P30", .name = "P30",
...@@ -372,6 +386,9 @@ static struct proc_dir_entry *asus_proc_dir; ...@@ -372,6 +386,9 @@ static struct proc_dir_entry *asus_proc_dir;
*/ */
static struct acpi_table_header *asus_info; static struct acpi_table_header *asus_info;
/* The actual device the driver binds to */
static struct asus_hotk *hotk;
/* /*
* The hotkey driver declaration * The hotkey driver declaration
*/ */
...@@ -436,7 +453,6 @@ proc_read_info(char *page, char **start, off_t off, int count, int *eof, ...@@ -436,7 +453,6 @@ proc_read_info(char *page, char **start, off_t off, int count, int *eof,
{ {
int len = 0; int len = 0;
int temp; int temp;
struct asus_hotk *hotk = (struct asus_hotk *) data;
char buf[16]; //enough for all info char buf[16]; //enough for all info
/* /*
* We use the easy way, we don't care of off and count, so we don't set eof * We use the easy way, we don't care of off and count, so we don't set eof
...@@ -495,7 +511,7 @@ proc_read_info(char *page, char **start, off_t off, int count, int *eof, ...@@ -495,7 +511,7 @@ proc_read_info(char *page, char **start, off_t off, int count, int *eof,
/* Generic LED functions */ /* Generic LED functions */
static int static int
read_led(struct asus_hotk *hotk, const char *ledname, int ledmask) read_led(const char *ledname, int ledmask)
{ {
if (ledname) { if (ledname) {
int led_status; int led_status;
...@@ -526,7 +542,7 @@ static int parse_arg(const char __user *buf, unsigned long count, int *val) ...@@ -526,7 +542,7 @@ static int parse_arg(const char __user *buf, unsigned long count, int *val)
/* FIXME: kill extraneous args so it can be called independently */ /* FIXME: kill extraneous args so it can be called independently */
static int static int
write_led(const char __user *buffer, unsigned long count, struct asus_hotk *hotk, write_led(const char __user *buffer, unsigned long count,
char *ledname, int ledmask, int invert) char *ledname, int ledmask, int invert)
{ {
int value; int value;
...@@ -556,8 +572,7 @@ static int ...@@ -556,8 +572,7 @@ static int
proc_read_mled(char *page, char **start, off_t off, int count, int *eof, proc_read_mled(char *page, char **start, off_t off, int count, int *eof,
void *data) void *data)
{ {
struct asus_hotk *hotk = (struct asus_hotk *) data; return sprintf(page, "%d\n", read_led(hotk->methods->mled_status, MLED_ON));
return sprintf(page, "%d\n", read_led(hotk, hotk->methods->mled_status, MLED_ON));
} }
...@@ -565,8 +580,7 @@ static int ...@@ -565,8 +580,7 @@ static int
proc_write_mled(struct file *file, const char __user *buffer, proc_write_mled(struct file *file, const char __user *buffer,
unsigned long count, void *data) unsigned long count, void *data)
{ {
struct asus_hotk *hotk = (struct asus_hotk *) data; return write_led(buffer, count, hotk->methods->mt_mled, MLED_ON, 1);
return write_led(buffer, count, hotk, hotk->methods->mt_mled, MLED_ON, 1);
} }
/* /*
...@@ -576,16 +590,14 @@ static int ...@@ -576,16 +590,14 @@ static int
proc_read_wled(char *page, char **start, off_t off, int count, int *eof, proc_read_wled(char *page, char **start, off_t off, int count, int *eof,
void *data) void *data)
{ {
struct asus_hotk *hotk = (struct asus_hotk *) data; return sprintf(page, "%d\n", read_led(hotk->methods->wled_status, WLED_ON));
return sprintf(page, "%d\n", read_led(hotk, hotk->methods->wled_status, WLED_ON));
} }
static int static int
proc_write_wled(struct file *file, const char __user *buffer, proc_write_wled(struct file *file, const char __user *buffer,
unsigned long count, void *data) unsigned long count, void *data)
{ {
struct asus_hotk *hotk = (struct asus_hotk *) data; return write_led(buffer, count, hotk->methods->mt_wled, WLED_ON, 0);
return write_led(buffer, count, hotk, hotk->methods->mt_wled, WLED_ON, 0);
} }
/* /*
...@@ -595,20 +607,18 @@ static int ...@@ -595,20 +607,18 @@ static int
proc_read_tled(char *page, char **start, off_t off, int count, int *eof, proc_read_tled(char *page, char **start, off_t off, int count, int *eof,
void *data) void *data)
{ {
struct asus_hotk *hotk = (struct asus_hotk *) data; return sprintf(page, "%d\n", read_led(hotk->methods->tled_status, TLED_ON));
return sprintf(page, "%d\n", read_led(hotk, hotk->methods->tled_status, TLED_ON));
} }
static int static int
proc_write_tled(struct file *file, const char __user *buffer, proc_write_tled(struct file *file, const char __user *buffer,
unsigned long count, void *data) unsigned long count, void *data)
{ {
struct asus_hotk *hotk = (struct asus_hotk *) data; return write_led(buffer, count, hotk->methods->mt_tled, TLED_ON, 0);
return write_led(buffer, count, hotk, hotk->methods->mt_tled, TLED_ON, 0);
} }
static int get_lcd_state(struct asus_hotk *hotk) static int get_lcd_state(void)
{ {
int lcd = 0; int lcd = 0;
...@@ -649,13 +659,13 @@ static int get_lcd_state(struct asus_hotk *hotk) ...@@ -649,13 +659,13 @@ static int get_lcd_state(struct asus_hotk *hotk)
return (lcd & 1); return (lcd & 1);
} }
static int set_lcd_state(struct asus_hotk *hotk, int value) static int set_lcd_state(int value)
{ {
int lcd = 0; int lcd = 0;
acpi_status status = 0; acpi_status status = 0;
lcd = value ? 1 : 0; lcd = value ? 1 : 0;
if (lcd != get_lcd_state(hotk)) { if (lcd != get_lcd_state()) {
/* switch */ /* switch */
if (hotk->model != L3H) { if (hotk->model != L3H) {
status = status =
...@@ -678,7 +688,7 @@ static int ...@@ -678,7 +688,7 @@ static int
proc_read_lcd(char *page, char **start, off_t off, int count, int *eof, proc_read_lcd(char *page, char **start, off_t off, int count, int *eof,
void *data) void *data)
{ {
return sprintf(page, "%d\n", get_lcd_state((struct asus_hotk *) data)); return sprintf(page, "%d\n", get_lcd_state());
} }
...@@ -687,16 +697,15 @@ proc_write_lcd(struct file *file, const char __user *buffer, ...@@ -687,16 +697,15 @@ proc_write_lcd(struct file *file, const char __user *buffer,
unsigned long count, void *data) unsigned long count, void *data)
{ {
int value; int value;
struct asus_hotk *hotk = (struct asus_hotk *) data;
count = parse_arg(buffer, count, &value); count = parse_arg(buffer, count, &value);
if (count > 0) if (count > 0)
set_lcd_state(hotk, value); set_lcd_state(value);
return count; return count;
} }
static int read_brightness(struct asus_hotk *hotk) static int read_brightness(void)
{ {
int value; int value;
...@@ -716,7 +725,7 @@ static int read_brightness(struct asus_hotk *hotk) ...@@ -716,7 +725,7 @@ static int read_brightness(struct asus_hotk *hotk)
/* /*
* Change the brightness level * Change the brightness level
*/ */
static void set_brightness(int value, struct asus_hotk *hotk) static void set_brightness(int value)
{ {
acpi_status status = 0; acpi_status status = 0;
...@@ -729,7 +738,7 @@ static void set_brightness(int value, struct asus_hotk *hotk) ...@@ -729,7 +738,7 @@ static void set_brightness(int value, struct asus_hotk *hotk)
} }
/* No SPLV method if we are here, act as appropriate */ /* No SPLV method if we are here, act as appropriate */
value -= read_brightness(hotk); value -= read_brightness();
while (value != 0) { while (value != 0) {
status = acpi_evaluate_object(NULL, (value > 0) ? status = acpi_evaluate_object(NULL, (value > 0) ?
hotk->methods->brightness_up : hotk->methods->brightness_up :
...@@ -746,8 +755,7 @@ static int ...@@ -746,8 +755,7 @@ static int
proc_read_brn(char *page, char **start, off_t off, int count, int *eof, proc_read_brn(char *page, char **start, off_t off, int count, int *eof,
void *data) void *data)
{ {
struct asus_hotk *hotk = (struct asus_hotk *) data; return sprintf(page, "%d\n", read_brightness());
return sprintf(page, "%d\n", read_brightness(hotk));
} }
static int static int
...@@ -755,13 +763,12 @@ proc_write_brn(struct file *file, const char __user *buffer, ...@@ -755,13 +763,12 @@ proc_write_brn(struct file *file, const char __user *buffer,
unsigned long count, void *data) unsigned long count, void *data)
{ {
int value; int value;
struct asus_hotk *hotk = (struct asus_hotk *) data;
count = parse_arg(buffer, count, &value); count = parse_arg(buffer, count, &value);
if (count > 0) { if (count > 0) {
value = (0 < value) ? ((15 < value) ? 15 : value) : 0; value = (0 < value) ? ((15 < value) ? 15 : value) : 0;
/* 0 <= value <= 15 */ /* 0 <= value <= 15 */
set_brightness(value, hotk); set_brightness(value);
} else if (count < 0) { } else if (count < 0) {
printk(KERN_WARNING "Asus ACPI: Error reading user input\n"); printk(KERN_WARNING "Asus ACPI: Error reading user input\n");
} }
...@@ -769,7 +776,7 @@ proc_write_brn(struct file *file, const char __user *buffer, ...@@ -769,7 +776,7 @@ proc_write_brn(struct file *file, const char __user *buffer,
return count; return count;
} }
static void set_display(int value, struct asus_hotk *hotk) static void set_display(int value)
{ {
/* no sanity check needed for now */ /* no sanity check needed for now */
if (!write_acpi_int(hotk->handle, hotk->methods->display_set, if (!write_acpi_int(hotk->handle, hotk->methods->display_set,
...@@ -787,7 +794,6 @@ proc_read_disp(char *page, char **start, off_t off, int count, int *eof, ...@@ -787,7 +794,6 @@ proc_read_disp(char *page, char **start, off_t off, int count, int *eof,
void *data) void *data)
{ {
int value = 0; int value = 0;
struct asus_hotk *hotk = (struct asus_hotk *) data;
if (!read_acpi_int(hotk->handle, hotk->methods->display_get, &value)) if (!read_acpi_int(hotk->handle, hotk->methods->display_get, &value))
printk(KERN_WARNING "Asus ACPI: Error reading display status\n"); printk(KERN_WARNING "Asus ACPI: Error reading display status\n");
...@@ -806,11 +812,10 @@ proc_write_disp(struct file *file, const char __user *buffer, ...@@ -806,11 +812,10 @@ proc_write_disp(struct file *file, const char __user *buffer,
unsigned long count, void *data) unsigned long count, void *data)
{ {
int value; int value;
struct asus_hotk *hotk = (struct asus_hotk *) data;
count = parse_arg(buffer, count, &value); count = parse_arg(buffer, count, &value);
if (count > 0) if (count > 0)
set_display(value, hotk); set_display(value);
else if (count < 0) else if (count < 0)
printk(KERN_WARNING "Asus ACPI: Error reading user input\n"); printk(KERN_WARNING "Asus ACPI: Error reading user input\n");
...@@ -845,7 +850,6 @@ __init asus_proc_add(char *name, proc_writefunc *writefunc, ...@@ -845,7 +850,6 @@ __init asus_proc_add(char *name, proc_writefunc *writefunc,
static int __init asus_hotk_add_fs(struct acpi_device *device) static int __init asus_hotk_add_fs(struct acpi_device *device)
{ {
struct proc_dir_entry *proc; struct proc_dir_entry *proc;
struct asus_hotk *hotk = acpi_driver_data(device);
mode_t mode; mode_t mode;
/* /*
...@@ -910,9 +914,6 @@ static int __init asus_hotk_add_fs(struct acpi_device *device) ...@@ -910,9 +914,6 @@ static int __init asus_hotk_add_fs(struct acpi_device *device)
static int asus_hotk_remove_fs(struct acpi_device* device) static int asus_hotk_remove_fs(struct acpi_device* device)
{ {
struct asus_hotk* hotk = acpi_driver_data(device);
if(acpi_device_dir(device)) { if(acpi_device_dir(device)) {
remove_proc_entry(PROC_INFO,acpi_device_dir(device)); remove_proc_entry(PROC_INFO,acpi_device_dir(device));
if (hotk->methods->mt_wled) if (hotk->methods->mt_wled)
...@@ -935,11 +936,7 @@ static int asus_hotk_remove_fs(struct acpi_device* device) ...@@ -935,11 +936,7 @@ static int asus_hotk_remove_fs(struct acpi_device* device)
static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
{ {
/* TODO Find a better way to handle events count. Here, in data, we receive /* TODO Find a better way to handle events count.*/
* the hotk, so we can do anything!
*/
struct asus_hotk *hotk = (struct asus_hotk *) data;
if (!hotk) if (!hotk)
return; return;
...@@ -959,7 +956,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) ...@@ -959,7 +956,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
* This function is used to initialize the hotk with right values. In this * This function is used to initialize the hotk with right values. In this
* method, we can make all the detection we want, and modify the hotk struct * method, we can make all the detection we want, and modify the hotk struct
*/ */
static int __init asus_hotk_get_info(struct asus_hotk *hotk) static int __init asus_hotk_get_info(void)
{ {
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL };
...@@ -1030,12 +1027,15 @@ static int __init asus_hotk_get_info(struct asus_hotk *hotk) ...@@ -1030,12 +1027,15 @@ static int __init asus_hotk_get_info(struct asus_hotk *hotk)
hotk->model = L4R; hotk->model = L4R;
else if (strncmp(model->string.pointer, "M6N", 3) == 0) else if (strncmp(model->string.pointer, "M6N", 3) == 0)
hotk->model = M6N; hotk->model = M6N;
else if (strncmp(model->string.pointer, "M6R", 3) == 0)
hotk->model = M6R;
else if (strncmp(model->string.pointer, "M2N", 3) == 0 || else if (strncmp(model->string.pointer, "M2N", 3) == 0 ||
strncmp(model->string.pointer, "M3N", 3) == 0 || strncmp(model->string.pointer, "M3N", 3) == 0 ||
strncmp(model->string.pointer, "M5N", 3) == 0 || strncmp(model->string.pointer, "M5N", 3) == 0 ||
strncmp(model->string.pointer, "M6N", 3) == 0 || strncmp(model->string.pointer, "M6N", 3) == 0 ||
strncmp(model->string.pointer, "S1N", 3) == 0 || strncmp(model->string.pointer, "S1N", 3) == 0 ||
strncmp(model->string.pointer, "S5N", 3) == 0) strncmp(model->string.pointer, "S5N", 3) == 0 ||
strncmp(model->string.pointer, "W1N", 3) == 0)
hotk->model = xxN; hotk->model = xxN;
else if (strncmp(model->string.pointer, "M1", 2) == 0) else if (strncmp(model->string.pointer, "M1", 2) == 0)
hotk->model = M1A; hotk->model = M1A;
...@@ -1072,12 +1072,14 @@ static int __init asus_hotk_get_info(struct asus_hotk *hotk) ...@@ -1072,12 +1072,14 @@ static int __init asus_hotk_get_info(struct asus_hotk *hotk)
hotk->methods->lcd_status = NULL; hotk->methods->lcd_status = NULL;
/* L2B is similar enough to L3C to use its settings, with this only /* L2B is similar enough to L3C to use its settings, with this only
exception */ exception */
else if (strncmp(model->string.pointer, "S5N", 3) == 0) else if (strncmp(model->string.pointer, "S5N", 3) == 0 ||
strncmp(model->string.pointer, "M5N", 3) == 0)
hotk->methods->mt_mled = NULL; hotk->methods->mt_mled = NULL;
/* S5N has no MLED */ /* S5N and M5N have no MLED */
else if (strncmp(model->string.pointer, "M2N", 3) == 0) else if (strncmp(model->string.pointer, "M2N", 3) == 0 ||
strncmp(model->string.pointer, "W1N", 3) == 0)
hotk->methods->mt_wled = "WLED"; hotk->methods->mt_wled = "WLED";
/* M2N has a usable WLED */ /* M2N and W1N have a usable WLED */
else if (asus_info) { else if (asus_info) {
if (strncmp(asus_info->oem_table_id, "L1", 2) == 0) if (strncmp(asus_info->oem_table_id, "L1", 2) == 0)
hotk->methods->mled_status = NULL; hotk->methods->mled_status = NULL;
...@@ -1090,19 +1092,16 @@ static int __init asus_hotk_get_info(struct asus_hotk *hotk) ...@@ -1090,19 +1092,16 @@ static int __init asus_hotk_get_info(struct asus_hotk *hotk)
} }
static int __init asus_hotk_check(struct asus_hotk *hotk) static int __init asus_hotk_check(void)
{ {
int result = 0; int result = 0;
if (!hotk)
return(-EINVAL);
result = acpi_bus_get_status(hotk->device); result = acpi_bus_get_status(hotk->device);
if (result) if (result)
return(result); return(result);
if (hotk->device->status.present) { if (hotk->device->status.present) {
result = asus_hotk_get_info(hotk); result = asus_hotk_get_info();
} else { } else {
printk(KERN_ERR " Hotkey device not present, aborting\n"); printk(KERN_ERR " Hotkey device not present, aborting\n");
return(-EINVAL); return(-EINVAL);
...@@ -1114,7 +1113,6 @@ static int __init asus_hotk_check(struct asus_hotk *hotk) ...@@ -1114,7 +1113,6 @@ static int __init asus_hotk_check(struct asus_hotk *hotk)
static int __init asus_hotk_add(struct acpi_device *device) static int __init asus_hotk_add(struct acpi_device *device)
{ {
struct asus_hotk *hotk = NULL;
acpi_status status = AE_OK; acpi_status status = AE_OK;
int result; int result;
...@@ -1137,7 +1135,7 @@ static int __init asus_hotk_add(struct acpi_device *device) ...@@ -1137,7 +1135,7 @@ static int __init asus_hotk_add(struct acpi_device *device)
hotk->device = device; hotk->device = device;
result = asus_hotk_check(hotk); result = asus_hotk_check();
if (result) if (result)
goto end; goto end;
...@@ -1182,13 +1180,10 @@ static int __init asus_hotk_add(struct acpi_device *device) ...@@ -1182,13 +1180,10 @@ static int __init asus_hotk_add(struct acpi_device *device)
static int asus_hotk_remove(struct acpi_device *device, int type) static int asus_hotk_remove(struct acpi_device *device, int type)
{ {
acpi_status status = 0; acpi_status status = 0;
struct asus_hotk *hotk = NULL;
if (!device || !acpi_driver_data(device)) if (!device || !acpi_driver_data(device))
return(-EINVAL); return(-EINVAL);
hotk = (struct asus_hotk *) acpi_driver_data(device);
status = acpi_remove_notify_handler(hotk->handle, ACPI_SYSTEM_NOTIFY, status = acpi_remove_notify_handler(hotk->handle, ACPI_SYSTEM_NOTIFY,
asus_hotk_notify); asus_hotk_notify);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
...@@ -1206,20 +1201,24 @@ static int __init asus_acpi_init(void) ...@@ -1206,20 +1201,24 @@ static int __init asus_acpi_init(void)
{ {
int result; int result;
if (acpi_disabled)
return -ENODEV;
asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir); asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir);
if (!asus_proc_dir) { if (!asus_proc_dir) {
printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n"); printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n");
return(-ENODEV); return -ENODEV;
} }
asus_proc_dir->owner = THIS_MODULE; asus_proc_dir->owner = THIS_MODULE;
result = acpi_bus_register_driver(&asus_hotk_driver); result = acpi_bus_register_driver(&asus_hotk_driver);
if (result < 0) { if (result < 1) {
acpi_bus_unregister_driver(&asus_hotk_driver);
remove_proc_entry(PROC_ASUS, acpi_root_dir); remove_proc_entry(PROC_ASUS, acpi_root_dir);
return(-ENODEV); return -ENODEV;
} }
return(0); return 0;
} }
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
* blacklist.c * blacklist.c
* *
* Check to see if the given machine has a known bad ACPI BIOS * Check to see if the given machine has a known bad ACPI BIOS
* or if the BIOS is too old.
* *
* Copyright (C) 2004 Len Brown <len.brown@intel.com>
* Copyright (C) 2002 Andy Grover <andrew.grover@intel.com> * Copyright (C) 2002 Andy Grover <andrew.grover@intel.com>
* *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -30,6 +32,7 @@ ...@@ -30,6 +32,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <acpi/acpi_bus.h> #include <acpi/acpi_bus.h>
#include <linux/dmi.h>
enum acpi_blacklist_predicates enum acpi_blacklist_predicates
{ {
...@@ -70,6 +73,45 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata = ...@@ -70,6 +73,45 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata =
}; };
#if CONFIG_ACPI_BLACKLIST_YEAR
static int __init
blacklist_by_year(void)
{
int year;
char *s = dmi_get_system_info(DMI_BIOS_DATE);
if (!s)
return 0;
if (!*s)
return 0;
s = strrchr(s, '/');
if (!s)
return 0;
s += 1;
year = simple_strtoul(s,NULL,0);
if (year < 100) { /* 2-digit year */
year += 1900;
if (year < 1996) /* no dates < spec 1.0 */
year += 100;
}
if (year < CONFIG_ACPI_BLACKLIST_YEAR) {
printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), "
"acpi=force is required to enable ACPI\n",
year, CONFIG_ACPI_BLACKLIST_YEAR);
return 1;
}
return 0;
}
#else
static inline int blacklist_by_year(void) { return 0; }
#endif
int __init int __init
acpi_blacklisted(void) acpi_blacklisted(void)
{ {
...@@ -120,6 +162,8 @@ acpi_blacklisted(void) ...@@ -120,6 +162,8 @@ acpi_blacklisted(void)
} }
} }
blacklisted += blacklist_by_year();
return blacklisted; return blacklisted;
} }
...@@ -596,7 +596,14 @@ acpi_early_init (void) ...@@ -596,7 +596,14 @@ acpi_early_init (void)
acpi_status status = AE_OK; acpi_status status = AE_OK;
struct acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt}; struct acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt};
ACPI_FUNCTION_TRACE("acpi_bus_init"); ACPI_FUNCTION_TRACE("acpi_early_init");
if (acpi_disabled)
return;
/* enable workarounds, unless strict ACPI spec. compliance */
if (!acpi_strict)
acpi_gbl_enable_interpreter_slack = TRUE;
status = acpi_initialize_subsystem(); status = acpi_initialize_subsystem();
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
...@@ -734,9 +741,6 @@ static int __init acpi_init (void) ...@@ -734,9 +741,6 @@ static int __init acpi_init (void)
printk(KERN_INFO PREFIX "Subsystem revision %08x\n", printk(KERN_INFO PREFIX "Subsystem revision %08x\n",
ACPI_CA_VERSION); ACPI_CA_VERSION);
/* Initial core debug level excludes drivers, so include them now */
acpi_set_debug(ACPI_DEBUG_LOW);
if (acpi_disabled) { if (acpi_disabled) {
printk(KERN_INFO PREFIX "Interpreter disabled.\n"); printk(KERN_INFO PREFIX "Interpreter disabled.\n");
return -ENODEV; return -ENODEV;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/moduleparam.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <acpi/acpi_drivers.h> #include <acpi/acpi_drivers.h>
...@@ -13,6 +14,81 @@ ACPI_MODULE_NAME ("debug") ...@@ -13,6 +14,81 @@ ACPI_MODULE_NAME ("debug")
#define ACPI_SYSTEM_FILE_DEBUG_LAYER "debug_layer" #define ACPI_SYSTEM_FILE_DEBUG_LAYER "debug_layer"
#define ACPI_SYSTEM_FILE_DEBUG_LEVEL "debug_level" #define ACPI_SYSTEM_FILE_DEBUG_LEVEL "debug_level"
#ifdef MODULE_PARAM_PREFIX
#undef MODULE_PARAM_PREFIX
#endif
#define MODULE_PARAM_PREFIX
module_param(acpi_dbg_layer, uint, 0400);
module_param(acpi_dbg_level, uint, 0400);
struct acpi_dlayer {
const char *name;
unsigned long value;
};
struct acpi_dlevel {
const char *name;
unsigned long value;
};
#define ACPI_DEBUG_INIT(v) { .name = #v, .value = v }
const struct acpi_dlayer acpi_debug_layers[] =
{
ACPI_DEBUG_INIT(ACPI_UTILITIES),
ACPI_DEBUG_INIT(ACPI_HARDWARE),
ACPI_DEBUG_INIT(ACPI_EVENTS),
ACPI_DEBUG_INIT(ACPI_TABLES),
ACPI_DEBUG_INIT(ACPI_NAMESPACE),
ACPI_DEBUG_INIT(ACPI_PARSER),
ACPI_DEBUG_INIT(ACPI_DISPATCHER),
ACPI_DEBUG_INIT(ACPI_EXECUTER),
ACPI_DEBUG_INIT(ACPI_RESOURCES),
ACPI_DEBUG_INIT(ACPI_CA_DEBUGGER),
ACPI_DEBUG_INIT(ACPI_OS_SERVICES),
ACPI_DEBUG_INIT(ACPI_CA_DISASSEMBLER),
ACPI_DEBUG_INIT(ACPI_COMPILER),
ACPI_DEBUG_INIT(ACPI_TOOLS),
};
const struct acpi_dlevel acpi_debug_levels[] =
{
ACPI_DEBUG_INIT(ACPI_LV_ERROR),
ACPI_DEBUG_INIT(ACPI_LV_WARN),
ACPI_DEBUG_INIT(ACPI_LV_INIT),
ACPI_DEBUG_INIT(ACPI_LV_DEBUG_OBJECT),
ACPI_DEBUG_INIT(ACPI_LV_INFO),
ACPI_DEBUG_INIT(ACPI_LV_INIT_NAMES),
ACPI_DEBUG_INIT(ACPI_LV_PARSE),
ACPI_DEBUG_INIT(ACPI_LV_LOAD),
ACPI_DEBUG_INIT(ACPI_LV_DISPATCH),
ACPI_DEBUG_INIT(ACPI_LV_EXEC),
ACPI_DEBUG_INIT(ACPI_LV_NAMES),
ACPI_DEBUG_INIT(ACPI_LV_OPREGION),
ACPI_DEBUG_INIT(ACPI_LV_BFIELD),
ACPI_DEBUG_INIT(ACPI_LV_TABLES),
ACPI_DEBUG_INIT(ACPI_LV_VALUES),
ACPI_DEBUG_INIT(ACPI_LV_OBJECTS),
ACPI_DEBUG_INIT(ACPI_LV_RESOURCES),
ACPI_DEBUG_INIT(ACPI_LV_USER_REQUESTS),
ACPI_DEBUG_INIT(ACPI_LV_PACKAGE),
ACPI_DEBUG_INIT(ACPI_LV_ALLOCATIONS),
ACPI_DEBUG_INIT(ACPI_LV_FUNCTIONS),
ACPI_DEBUG_INIT(ACPI_LV_OPTIMIZATIONS),
ACPI_DEBUG_INIT(ACPI_LV_MUTEX),
ACPI_DEBUG_INIT(ACPI_LV_THREADS),
ACPI_DEBUG_INIT(ACPI_LV_IO),
ACPI_DEBUG_INIT(ACPI_LV_INTERRUPTS),
ACPI_DEBUG_INIT(ACPI_LV_AML_DISASSEMBLE),
ACPI_DEBUG_INIT(ACPI_LV_VERBOSE_INFO),
ACPI_DEBUG_INIT(ACPI_LV_FULL_TABLES),
ACPI_DEBUG_INIT(ACPI_LV_EVENTS),
};
#define NUM_OF(v) ( sizeof(v)/sizeof(v[0]) )
static int static int
acpi_system_read_debug ( acpi_system_read_debug (
char *page, char *page,
...@@ -24,16 +100,41 @@ acpi_system_read_debug ( ...@@ -24,16 +100,41 @@ acpi_system_read_debug (
{ {
char *p = page; char *p = page;
int size = 0; int size = 0;
int i;
if (off != 0) if (off != 0)
goto end; goto end;
p += sprintf(p, "%-25s\tHex SET\n", "Description");
switch ((unsigned long) data) { switch ((unsigned long) data) {
case 0: case 0:
p += sprintf(p, "0x%08x\n", acpi_dbg_layer); for (i = 0; i < NUM_OF(acpi_debug_layers); i++) {
p += sprintf(p, "%-25s\t0x%08lX [%c]\n",
acpi_debug_layers[i].name,
acpi_debug_layers[i].value,
(acpi_dbg_layer & acpi_debug_layers[i].value) ?
'*' : ' ');
}
p += sprintf(p, "%-25s\t0x%08X [%c]\n", "ACPI_ALL_DRIVERS",
ACPI_ALL_DRIVERS,
(acpi_dbg_layer & ACPI_ALL_DRIVERS) == ACPI_ALL_DRIVERS?
'*' : (acpi_dbg_layer & ACPI_ALL_DRIVERS) == 0 ?
' ' : '-');
p += sprintf(p,
"--\ndebug_layer = 0x%08X (* = enabled, - = partial)\n",
acpi_dbg_layer);
break; break;
case 1: case 1:
p += sprintf(p, "0x%08x\n", acpi_dbg_level); for (i = 0; i < NUM_OF(acpi_debug_levels); i++) {
p += sprintf(p, "%-25s\t0x%08lX [%c]\n",
acpi_debug_levels[i].name,
acpi_debug_levels[i].value,
(acpi_dbg_level & acpi_debug_levels[i].value) ?
'*' : ' ');
}
p += sprintf(p, "--\ndebug_level = 0x%08X (* = enabled)\n",
acpi_dbg_level);
break; break;
default: default:
p += sprintf(p, "Invalid debug option\n"); p += sprintf(p, "Invalid debug option\n");
......
...@@ -58,15 +58,12 @@ ...@@ -58,15 +58,12 @@
* *
* FUNCTION: acpi_ds_parse_method * FUNCTION: acpi_ds_parse_method
* *
* PARAMETERS: obj_handle - Node of the method * PARAMETERS: obj_handle - Method node
* Level - Current nesting level
* Context - Points to a method counter
* return_value - Not used
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: Call the parser and parse the AML that is * DESCRIPTION: Call the parser and parse the AML that is associated with the
* associated with the method. * method.
* *
* MUTEX: Assumes parser is locked * MUTEX: Assumes parser is locked
* *
...@@ -191,8 +188,6 @@ acpi_ds_parse_method ( ...@@ -191,8 +188,6 @@ acpi_ds_parse_method (
* increments the thread count, and waits at the method semaphore * increments the thread count, and waits at the method semaphore
* for clearance to execute. * for clearance to execute.
* *
* MUTEX: Locks/unlocks parser.
*
******************************************************************************/ ******************************************************************************/
acpi_status acpi_status
...@@ -251,7 +246,8 @@ acpi_ds_begin_method_execution ( ...@@ -251,7 +246,8 @@ acpi_ds_begin_method_execution (
* *
* FUNCTION: acpi_ds_call_control_method * FUNCTION: acpi_ds_call_control_method
* *
* PARAMETERS: walk_state - Current state of the walk * PARAMETERS: Thread - Info for this thread
* this_walk_state - Current walk state
* Op - Current Op to be walked * Op - Current Op to be walked
* *
* RETURN: Status * RETURN: Status
...@@ -401,12 +397,13 @@ acpi_ds_call_control_method ( ...@@ -401,12 +397,13 @@ acpi_ds_call_control_method (
* *
* FUNCTION: acpi_ds_restart_control_method * FUNCTION: acpi_ds_restart_control_method
* *
* PARAMETERS: walk_state - State of the method when it was preempted * PARAMETERS: walk_state - State for preempted method (caller)
* Op - Pointer to new current op * return_desc - Return value from the called method
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: Restart a method that was preempted * DESCRIPTION: Restart a method that was preempted by another (nested) method
* invocation. Handle the return value (if any) from the callee.
* *
******************************************************************************/ ******************************************************************************/
...@@ -421,17 +418,35 @@ acpi_ds_restart_control_method ( ...@@ -421,17 +418,35 @@ acpi_ds_restart_control_method (
ACPI_FUNCTION_TRACE_PTR ("ds_restart_control_method", walk_state); ACPI_FUNCTION_TRACE_PTR ("ds_restart_control_method", walk_state);
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"****Restart [%4.4s] Op %p return_value_from_callee %p\n",
(char *) &walk_state->method_node->name, walk_state->method_call_op,
return_desc));
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
" return_from_this_method_used?=%X res_stack %p Walk %p\n",
walk_state->return_used,
walk_state->results, walk_state));
/* Did the called method return a value? */
if (return_desc) { if (return_desc) {
/* Are we actually going to use the return value? */
if (walk_state->return_used) { if (walk_state->return_used) {
/* /* Save the return value from the previous method */
* Get the return value (if any) from the previous method.
* NULL if no return value
*/
status = acpi_ds_result_push (return_desc, walk_state); status = acpi_ds_result_push (return_desc, walk_state);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
acpi_ut_remove_reference (return_desc); acpi_ut_remove_reference (return_desc);
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
/*
* Save as THIS method's return value in case it is returned
* immediately to yet another method
*/
walk_state->return_desc = return_desc;
} }
else { else {
/* /*
...@@ -442,11 +457,6 @@ acpi_ds_restart_control_method ( ...@@ -442,11 +457,6 @@ acpi_ds_restart_control_method (
} }
} }
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"Method=%p Return=%p return_used?=%X res_stack=%p State=%p\n",
walk_state->method_call_op, return_desc, walk_state->return_used,
walk_state->results, walk_state));
return_ACPI_STATUS (AE_OK); return_ACPI_STATUS (AE_OK);
} }
......
...@@ -60,11 +60,10 @@ ...@@ -60,11 +60,10 @@
* *
* FUNCTION: acpi_ds_is_result_used * FUNCTION: acpi_ds_is_result_used
* *
* PARAMETERS: Op * PARAMETERS: Op - Current Op
* result_obj * walk_state - Current State
* walk_state
* *
* RETURN: Status * RETURN: TRUE if result is used, FALSE otherwise
* *
* DESCRIPTION: Check if a result object will be used by the parent * DESCRIPTION: Check if a result object will be used by the parent
* *
...@@ -89,18 +88,39 @@ acpi_ds_is_result_used ( ...@@ -89,18 +88,39 @@ acpi_ds_is_result_used (
} }
/* /*
* If there is no parent, the result can't possibly be used! * If there is no parent, we are executing at the method level.
* (An executing method typically has no parent, since each * An executing method typically has no parent, since each method
* method is parsed separately) However, a method that is * is parsed separately.
* invoked from another method has a parent.
*/ */
if (!op->common.parent) { if (!op->common.parent) {
/*
* If this is the last statement in the method, we know it is not a
* Return() operator (would not come here.) The following code is the
* optional support for a so-called "implicit return". Some AML code
* assumes that the last value of the method is "implicitly" returned
* to the caller. Just save the last result as the return value.
* NOTE: this is optional because the ASL language does not actually
* support this behavior.
*/
if ((acpi_gbl_enable_interpreter_slack) &&
(walk_state->parser_state.aml >= walk_state->parser_state.aml_end)) {
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"Result of [%s] will be implicitly returned\n",
acpi_ps_get_opcode_name (op->common.aml_opcode)));
/* Use the top of the result stack as the implicit return value */
walk_state->return_desc = walk_state->results->results.obj_desc[0];
return_VALUE (TRUE);
}
/* No parent, the return value cannot possibly be used */
return_VALUE (FALSE); return_VALUE (FALSE);
} }
/* /* Get info on the parent. The root_op is AML_SCOPE */
* Get info on the parent. The root Op is AML_SCOPE
*/
parent_info = acpi_ps_get_opcode_info (op->common.parent->common.aml_opcode); parent_info = acpi_ps_get_opcode_info (op->common.parent->common.aml_opcode);
if (parent_info->class == AML_CLASS_UNKNOWN) { if (parent_info->class == AML_CLASS_UNKNOWN) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown parent opcode. Op=%p\n", op)); ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown parent opcode. Op=%p\n", op));
...@@ -204,9 +224,9 @@ acpi_ds_is_result_used ( ...@@ -204,9 +224,9 @@ acpi_ds_is_result_used (
* *
* FUNCTION: acpi_ds_delete_result_if_not_used * FUNCTION: acpi_ds_delete_result_if_not_used
* *
* PARAMETERS: Op * PARAMETERS: Op - Current parse Op
* result_obj * result_obj - Result of the operation
* walk_state * walk_state - Current state
* *
* RETURN: Status * RETURN: Status
* *
...@@ -338,8 +358,9 @@ acpi_ds_clear_operands ( ...@@ -338,8 +358,9 @@ acpi_ds_clear_operands (
* *
* FUNCTION: acpi_ds_create_operand * FUNCTION: acpi_ds_create_operand
* *
* PARAMETERS: walk_state * PARAMETERS: walk_state - Current walk state
* Arg * Arg - Parse object for the argument
* arg_index - Which argument (zero based)
* *
* RETURN: Status * RETURN: Status
* *
......
...@@ -102,6 +102,8 @@ acpi_ev_set_gpe_type ( ...@@ -102,6 +102,8 @@ acpi_ev_set_gpe_type (
* FUNCTION: acpi_ev_update_gpe_enable_masks * FUNCTION: acpi_ev_update_gpe_enable_masks
* *
* PARAMETERS: gpe_event_info - GPE to update * PARAMETERS: gpe_event_info - GPE to update
* Type - What to do: ACPI_GPE_DISABLE or
* ACPI_GPE_ENABLE
* *
* RETURN: Status * RETURN: Status
* *
...@@ -166,6 +168,8 @@ acpi_ev_update_gpe_enable_masks ( ...@@ -166,6 +168,8 @@ acpi_ev_update_gpe_enable_masks (
* FUNCTION: acpi_ev_enable_gpe * FUNCTION: acpi_ev_enable_gpe
* *
* PARAMETERS: gpe_event_info - GPE to enable * PARAMETERS: gpe_event_info - GPE to enable
* write_to_hardware - Enable now, or just mark data structs
* (WAKE GPEs should be deferred)
* *
* RETURN: Status * RETURN: Status
* *
...@@ -707,7 +711,7 @@ acpi_ev_gpe_dispatch ( ...@@ -707,7 +711,7 @@ acpi_ev_gpe_dispatch (
#ifdef ACPI_GPE_NOTIFY_CHECK #ifdef ACPI_GPE_NOTIFY_CHECK
/******************************************************************************* /*******************************************************************************
* NOT USED, PROTOTYPE ONLY AND WILL PROBABLY BE REMOVED * TBD: NOT USED, PROTOTYPE ONLY AND WILL PROBABLY BE REMOVED
* *
* FUNCTION: acpi_ev_check_for_wake_only_gpe * FUNCTION: acpi_ev_check_for_wake_only_gpe
* *
......
...@@ -88,9 +88,10 @@ acpi_ev_is_notify_object ( ...@@ -88,9 +88,10 @@ acpi_ev_is_notify_object (
* *
* FUNCTION: acpi_ev_queue_notify_request * FUNCTION: acpi_ev_queue_notify_request
* *
* PARAMETERS: * PARAMETERS: Node - NS node for the notified object
* notify_value - Value from the Notify() request
* *
* RETURN: None. * RETURN: Status
* *
* DESCRIPTION: Dispatch a device notification event to a previously * DESCRIPTION: Dispatch a device notification event to a previously
* installed handler. * installed handler.
...@@ -143,9 +144,8 @@ acpi_ev_queue_notify_request ( ...@@ -143,9 +144,8 @@ acpi_ev_queue_notify_request (
notify_value)); notify_value));
} }
/* /* Get the notify object attached to the NS Node */
* Get the notify object attached to the NS Node
*/
obj_desc = acpi_ns_get_attached_object (node); obj_desc = acpi_ns_get_attached_object (node);
if (obj_desc) { if (obj_desc) {
/* We have the notify object, Get the right handler */ /* We have the notify object, Get the right handler */
...@@ -193,8 +193,10 @@ acpi_ev_queue_notify_request ( ...@@ -193,8 +193,10 @@ acpi_ev_queue_notify_request (
} }
if (!handler_obj) { if (!handler_obj) {
/* There is no per-device notify handler for this device */ /*
* There is no per-device notify handler for this device.
* This may or may not be a problem.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"No notify handler for Notify(%4.4s, %X) node %p\n", "No notify handler for Notify(%4.4s, %X) node %p\n",
acpi_ut_get_node_name (node), notify_value, node)); acpi_ut_get_node_name (node), notify_value, node));
...@@ -208,7 +210,7 @@ acpi_ev_queue_notify_request ( ...@@ -208,7 +210,7 @@ acpi_ev_queue_notify_request (
* *
* FUNCTION: acpi_ev_notify_dispatch * FUNCTION: acpi_ev_notify_dispatch
* *
* PARAMETERS: * PARAMETERS: Context - To be passsed to the notify handler
* *
* RETURN: None. * RETURN: None.
* *
...@@ -275,6 +277,8 @@ acpi_ev_notify_dispatch ( ...@@ -275,6 +277,8 @@ acpi_ev_notify_dispatch (
* *
* FUNCTION: acpi_ev_global_lock_thread * FUNCTION: acpi_ev_global_lock_thread
* *
* PARAMETERS: Context - From thread interface, not used
*
* RETURN: None * RETURN: None
* *
* DESCRIPTION: Invoked by SCI interrupt handler upon acquisition of the * DESCRIPTION: Invoked by SCI interrupt handler upon acquisition of the
...@@ -308,7 +312,9 @@ acpi_ev_global_lock_thread ( ...@@ -308,7 +312,9 @@ acpi_ev_global_lock_thread (
* *
* FUNCTION: acpi_ev_global_lock_handler * FUNCTION: acpi_ev_global_lock_handler
* *
* RETURN: Status * PARAMETERS: Context - From thread interface, not used
*
* RETURN: ACPI_INTERRUPT_HANDLED or ACPI_INTERRUPT_NOT_HANDLED
* *
* DESCRIPTION: Invoked directly from the SCI handler when a global lock * DESCRIPTION: Invoked directly from the SCI handler when a global lock
* release interrupt occurs. Grab the global lock and queue * release interrupt occurs. Grab the global lock and queue
...@@ -355,6 +361,8 @@ acpi_ev_global_lock_handler ( ...@@ -355,6 +361,8 @@ acpi_ev_global_lock_handler (
* *
* FUNCTION: acpi_ev_init_global_lock_handler * FUNCTION: acpi_ev_init_global_lock_handler
* *
* PARAMETERS: None
*
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: Install a handler for the global lock release event * DESCRIPTION: Install a handler for the global lock release event
...@@ -394,6 +402,8 @@ acpi_ev_init_global_lock_handler (void) ...@@ -394,6 +402,8 @@ acpi_ev_init_global_lock_handler (void)
* *
* FUNCTION: acpi_ev_acquire_global_lock * FUNCTION: acpi_ev_acquire_global_lock
* *
* PARAMETERS: Timeout - Max time to wait for the lock, in millisec.
*
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: Attempt to gain ownership of the Global Lock. * DESCRIPTION: Attempt to gain ownership of the Global Lock.
...@@ -461,6 +471,10 @@ acpi_ev_acquire_global_lock ( ...@@ -461,6 +471,10 @@ acpi_ev_acquire_global_lock (
* *
* FUNCTION: acpi_ev_release_global_lock * FUNCTION: acpi_ev_release_global_lock
* *
* PARAMETERS: None
*
* RETURN: Status
*
* DESCRIPTION: Releases ownership of the Global Lock. * DESCRIPTION: Releases ownership of the Global Lock.
* *
******************************************************************************/ ******************************************************************************/
......
...@@ -180,7 +180,7 @@ acpi_ev_initialize_op_regions ( ...@@ -180,7 +180,7 @@ acpi_ev_initialize_op_regions (
* FUNCTION: acpi_ev_execute_reg_method * FUNCTION: acpi_ev_execute_reg_method
* *
* PARAMETERS: region_obj - Object structure * PARAMETERS: region_obj - Object structure
* Function - On (1) or Off (0) * Function - Passed to _REG: On (1) or Off (0)
* *
* RETURN: Status * RETURN: Status
* *
...@@ -232,7 +232,7 @@ acpi_ev_execute_reg_method ( ...@@ -232,7 +232,7 @@ acpi_ev_execute_reg_method (
goto cleanup; goto cleanup;
} }
/* Set up the parameter objects */ /* Setup the parameter objects */
params[0]->integer.value = region_obj->region.space_id; params[0]->integer.value = region_obj->region.space_id;
params[1]->integer.value = function; params[1]->integer.value = function;
...@@ -262,7 +262,6 @@ acpi_ev_execute_reg_method ( ...@@ -262,7 +262,6 @@ acpi_ev_execute_reg_method (
* FUNCTION: acpi_ev_address_space_dispatch * FUNCTION: acpi_ev_address_space_dispatch
* *
* PARAMETERS: region_obj - Internal region object * PARAMETERS: region_obj - Internal region object
* space_id - ID of the address space (0-255)
* Function - Read or Write operation * Function - Read or Write operation
* Address - Where in the space to read or write * Address - Where in the space to read or write
* bit_width - Field width in bits (8, 16, 32, or 64) * bit_width - Field width in bits (8, 16, 32, or 64)
...@@ -971,7 +970,7 @@ acpi_ev_install_space_handler ( ...@@ -971,7 +970,7 @@ acpi_ev_install_space_handler (
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: Run _REG methods for the Space ID; * DESCRIPTION: Run all _REG methods for the input Space ID;
* Note: assumes namespace is locked, or system init time. * Note: assumes namespace is locked, or system init time.
* *
******************************************************************************/ ******************************************************************************/
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
* *
* FUNCTION: acpi_ev_system_memory_region_setup * FUNCTION: acpi_ev_system_memory_region_setup
* *
* PARAMETERS: region_obj - Region we are interested in * PARAMETERS: Handle - Region we are interested in
* Function - Start or stop * Function - Start or stop
* handler_context - Address space handler context * handler_context - Address space handler context
* region_context - Region specific context * region_context - Region specific context
...@@ -108,7 +108,7 @@ acpi_ev_system_memory_region_setup ( ...@@ -108,7 +108,7 @@ acpi_ev_system_memory_region_setup (
* *
* FUNCTION: acpi_ev_io_space_region_setup * FUNCTION: acpi_ev_io_space_region_setup
* *
* PARAMETERS: region_obj - Region we are interested in * PARAMETERS: Handle - Region we are interested in
* Function - Start or stop * Function - Start or stop
* handler_context - Address space handler context * handler_context - Address space handler context
* region_context - Region specific context * region_context - Region specific context
...@@ -144,7 +144,7 @@ acpi_ev_io_space_region_setup ( ...@@ -144,7 +144,7 @@ acpi_ev_io_space_region_setup (
* *
* FUNCTION: acpi_ev_pci_config_region_setup * FUNCTION: acpi_ev_pci_config_region_setup
* *
* PARAMETERS: region_obj - Region we are interested in * PARAMETERS: Handle - Region we are interested in
* Function - Start or stop * Function - Start or stop
* handler_context - Address space handler context * handler_context - Address space handler context
* region_context - Region specific context * region_context - Region specific context
...@@ -317,7 +317,7 @@ acpi_ev_pci_config_region_setup ( ...@@ -317,7 +317,7 @@ acpi_ev_pci_config_region_setup (
* *
* FUNCTION: acpi_ev_pci_bar_region_setup * FUNCTION: acpi_ev_pci_bar_region_setup
* *
* PARAMETERS: region_obj - Region we are interested in * PARAMETERS: Handle - Region we are interested in
* Function - Start or stop * Function - Start or stop
* handler_context - Address space handler context * handler_context - Address space handler context
* region_context - Region specific context * region_context - Region specific context
...@@ -348,7 +348,7 @@ acpi_ev_pci_bar_region_setup ( ...@@ -348,7 +348,7 @@ acpi_ev_pci_bar_region_setup (
* *
* FUNCTION: acpi_ev_cmos_region_setup * FUNCTION: acpi_ev_cmos_region_setup
* *
* PARAMETERS: region_obj - Region we are interested in * PARAMETERS: Handle - Region we are interested in
* Function - Start or stop * Function - Start or stop
* handler_context - Address space handler context * handler_context - Address space handler context
* region_context - Region specific context * region_context - Region specific context
...@@ -379,7 +379,7 @@ acpi_ev_cmos_region_setup ( ...@@ -379,7 +379,7 @@ acpi_ev_cmos_region_setup (
* *
* FUNCTION: acpi_ev_default_region_setup * FUNCTION: acpi_ev_default_region_setup
* *
* PARAMETERS: region_obj - Region we are interested in * PARAMETERS: Handle - Region we are interested in
* Function - Start or stop * Function - Start or stop
* handler_context - Address space handler context * handler_context - Address space handler context
* region_context - Region specific context * region_context - Region specific context
......
...@@ -359,6 +359,7 @@ acpi_install_notify_handler ( ...@@ -359,6 +359,7 @@ acpi_install_notify_handler (
* ACPI_DEVICE_NOTIFY: driver_handler (80-ff) * ACPI_DEVICE_NOTIFY: driver_handler (80-ff)
* ACPI_ALL_NOTIFY: both system and device * ACPI_ALL_NOTIFY: both system and device
* Handler - Address of the handler * Handler - Address of the handler
*
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: Remove a handler for notifies on an ACPI device * DESCRIPTION: Remove a handler for notifies on an ACPI device
...@@ -401,9 +402,8 @@ acpi_remove_notify_handler ( ...@@ -401,9 +402,8 @@ acpi_remove_notify_handler (
goto unlock_and_exit; goto unlock_and_exit;
} }
/* /* Root Object */
* Root Object
*/
if (device == ACPI_ROOT_OBJECT) { if (device == ACPI_ROOT_OBJECT) {
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Removing notify handler for ROOT object.\n")); ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Removing notify handler for ROOT object.\n"));
...@@ -437,9 +437,8 @@ acpi_remove_notify_handler ( ...@@ -437,9 +437,8 @@ acpi_remove_notify_handler (
} }
} }
/* /* All Other Objects */
* All Other Objects
*/
else { else {
/* Notifies allowed on this object? */ /* Notifies allowed on this object? */
......
...@@ -130,7 +130,7 @@ acpi_ex_setup_region ( ...@@ -130,7 +130,7 @@ acpi_ex_setup_region (
if (rgn_desc->region.length < (obj_desc->common_field.base_byte_offset if (rgn_desc->region.length < (obj_desc->common_field.base_byte_offset
+ field_datum_byte_offset + field_datum_byte_offset
+ obj_desc->common_field.access_byte_width)) { + obj_desc->common_field.access_byte_width)) {
if (acpi_gbl_enable_interpeter_slack) { if (acpi_gbl_enable_interpreter_slack) {
/* /*
* Slack mode only: We will go ahead and allow access to this * Slack mode only: We will go ahead and allow access to this
* field if it is within the region length rounded up to the next * field if it is within the region length rounded up to the next
...@@ -169,40 +169,7 @@ acpi_ex_setup_region ( ...@@ -169,40 +169,7 @@ acpi_ex_setup_region (
field_datum_byte_offset, obj_desc->common_field.access_byte_width, field_datum_byte_offset, obj_desc->common_field.access_byte_width,
acpi_ut_get_node_name (rgn_desc->region.node), rgn_desc->region.length)); acpi_ut_get_node_name (rgn_desc->region.node), rgn_desc->region.length));
if (!acpi_strict) {
/*
* Allow access to the field if it is within the region size
* rounded up to a multiple of the access byte width. This
* overcomes "off-by-one" programming errors in the AML often
* found in Toshiba laptops. These errors were allowed by
* the Microsoft ASL compiler.
*/
u32 rounded_length = ACPI_ROUND_UP(rgn_desc->region.length,
obj_desc->common_field.access_byte_width);
if (rounded_length < (obj_desc->common_field.base_byte_offset
+ field_datum_byte_offset
+ obj_desc->common_field.access_byte_width)) {
return_ACPI_STATUS (AE_AML_REGION_LIMIT); return_ACPI_STATUS (AE_AML_REGION_LIMIT);
} else {
static int warn_once = 1;
if (warn_once) {
// Could also associate a flag with each field, and
// warn once for each field.
ACPI_REPORT_WARNING((
"The ACPI AML in your computer contains errors, "
"please nag the manufacturer to correct it.\n"));
ACPI_REPORT_WARNING((
"Allowing relaxed access to fields; "
"turn on CONFIG_ACPI_DEBUG for details.\n"));
warn_once = 0;
}
return_ACPI_STATUS (AE_OK);
}
}
else {
return_ACPI_STATUS (AE_AML_REGION_LIMIT);
}
} }
return_ACPI_STATUS (AE_OK); return_ACPI_STATUS (AE_OK);
......
...@@ -96,7 +96,7 @@ acpi_hw_write_gpe_enable_reg ( ...@@ -96,7 +96,7 @@ acpi_hw_write_gpe_enable_reg (
* *
* PARAMETERS: gpe_event_info - Info block for the GPE to be cleared * PARAMETERS: gpe_event_info - Info block for the GPE to be cleared
* *
* RETURN: status_status * RETURN: Status
* *
* DESCRIPTION: Clear the status bit for a single GPE. * DESCRIPTION: Clear the status bit for a single GPE.
* *
......
...@@ -249,8 +249,8 @@ acpi_hw_get_bit_register_info ( ...@@ -249,8 +249,8 @@ acpi_hw_get_bit_register_info (
* return_value - Value that was read from the register * return_value - Value that was read from the register
* Flags - Lock the hardware or not * Flags - Lock the hardware or not
* *
* RETURN: Value is read from specified Register. Value returned is * RETURN: Status and the value read from specified Register. Value
* normalized to bit0 (is shifted all the way right) * returned is normalized to bit0 (is shifted all the way right)
* *
* DESCRIPTION: ACPI bit_register read function. * DESCRIPTION: ACPI bit_register read function.
* *
...@@ -284,6 +284,8 @@ acpi_get_register ( ...@@ -284,6 +284,8 @@ acpi_get_register (
} }
} }
/* Read from the register */
status = acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, status = acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK,
bit_reg_info->parent_register, &register_value); bit_reg_info->parent_register, &register_value);
...@@ -313,10 +315,10 @@ acpi_get_register ( ...@@ -313,10 +315,10 @@ acpi_get_register (
* *
* PARAMETERS: register_id - ID of ACPI bit_register to access * PARAMETERS: register_id - ID of ACPI bit_register to access
* Value - (only used on write) value to write to the * Value - (only used on write) value to write to the
* Register, NOT pre-normalized to the bit pos. * Register, NOT pre-normalized to the bit pos
* Flags - Lock the hardware or not * Flags - Lock the hardware or not
* *
* RETURN: None * RETURN: Status
* *
* DESCRIPTION: ACPI Bit Register write function. * DESCRIPTION: ACPI Bit Register write function.
* *
...@@ -461,10 +463,11 @@ acpi_set_register ( ...@@ -461,10 +463,11 @@ acpi_set_register (
* *
* FUNCTION: acpi_hw_register_read * FUNCTION: acpi_hw_register_read
* *
* PARAMETERS: use_lock - Mutex hw access. * PARAMETERS: use_lock - Mutex hw access
* register_id - register_iD + Offset. * register_id - register_iD + Offset
* return_value - Value that was read from the register
* *
* RETURN: Value read or written. * RETURN: Status and the value read.
* *
* DESCRIPTION: Acpi register read function. Registers are read at the * DESCRIPTION: Acpi register read function. Registers are read at the
* given offset. * given offset.
...@@ -572,10 +575,11 @@ acpi_hw_register_read ( ...@@ -572,10 +575,11 @@ acpi_hw_register_read (
* *
* FUNCTION: acpi_hw_register_write * FUNCTION: acpi_hw_register_write
* *
* PARAMETERS: use_lock - Mutex hw access. * PARAMETERS: use_lock - Mutex hw access
* register_id - register_iD + Offset. * register_id - register_iD + Offset
* Value - The value to write
* *
* RETURN: Value read or written. * RETURN: Status
* *
* DESCRIPTION: Acpi register Write function. Registers are written at the * DESCRIPTION: Acpi register Write function. Registers are written at the
* given offset. * given offset.
...@@ -691,11 +695,11 @@ acpi_hw_register_write ( ...@@ -691,11 +695,11 @@ acpi_hw_register_write (
* *
* PARAMETERS: Width - 8, 16, or 32 * PARAMETERS: Width - 8, 16, or 32
* Value - Where the value is returned * Value - Where the value is returned
* Register - GAS register structure * Reg - GAS register structure
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: Read from either memory, IO, or PCI config space. * DESCRIPTION: Read from either memory or IO space.
* *
******************************************************************************/ ******************************************************************************/
...@@ -705,8 +709,6 @@ acpi_hw_low_level_read ( ...@@ -705,8 +709,6 @@ acpi_hw_low_level_read (
u32 *value, u32 *value,
struct acpi_generic_address *reg) struct acpi_generic_address *reg)
{ {
struct acpi_pci_id pci_id;
u16 pci_register;
acpi_status status; acpi_status status;
...@@ -725,8 +727,8 @@ acpi_hw_low_level_read ( ...@@ -725,8 +727,8 @@ acpi_hw_low_level_read (
*value = 0; *value = 0;
/* /*
* Three address spaces supported: * Two address spaces supported: Memory or IO.
* Memory, IO, or PCI_Config. * PCI_Config is not supported here because the GAS struct is insufficient
*/ */
switch (reg->address_space_id) { switch (reg->address_space_id) {
case ACPI_ADR_SPACE_SYSTEM_MEMORY: case ACPI_ADR_SPACE_SYSTEM_MEMORY:
...@@ -744,19 +746,6 @@ acpi_hw_low_level_read ( ...@@ -744,19 +746,6 @@ acpi_hw_low_level_read (
break; break;
case ACPI_ADR_SPACE_PCI_CONFIG:
pci_id.segment = 0;
pci_id.bus = 0;
pci_id.device = ACPI_PCI_DEVICE (reg->address);
pci_id.function = ACPI_PCI_FUNCTION (reg->address);
pci_register = (u16) ACPI_PCI_REGISTER (reg->address);
status = acpi_os_read_pci_configuration (&pci_id, pci_register,
value, width);
break;
default: default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Unsupported address space: %X\n", reg->address_space_id)); "Unsupported address space: %X\n", reg->address_space_id));
...@@ -778,11 +767,11 @@ acpi_hw_low_level_read ( ...@@ -778,11 +767,11 @@ acpi_hw_low_level_read (
* *
* PARAMETERS: Width - 8, 16, or 32 * PARAMETERS: Width - 8, 16, or 32
* Value - To be written * Value - To be written
* Register - GAS register structure * Reg - GAS register structure
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: Write to either memory, IO, or PCI config space. * DESCRIPTION: Write to either memory or IO space.
* *
******************************************************************************/ ******************************************************************************/
...@@ -792,8 +781,6 @@ acpi_hw_low_level_write ( ...@@ -792,8 +781,6 @@ acpi_hw_low_level_write (
u32 value, u32 value,
struct acpi_generic_address *reg) struct acpi_generic_address *reg)
{ {
struct acpi_pci_id pci_id;
u16 pci_register;
acpi_status status; acpi_status status;
...@@ -811,8 +798,8 @@ acpi_hw_low_level_write ( ...@@ -811,8 +798,8 @@ acpi_hw_low_level_write (
} }
/* /*
* Three address spaces supported: * Two address spaces supported: Memory or IO.
* Memory, IO, or PCI_Config. * PCI_Config is not supported here because the GAS struct is insufficient
*/ */
switch (reg->address_space_id) { switch (reg->address_space_id) {
case ACPI_ADR_SPACE_SYSTEM_MEMORY: case ACPI_ADR_SPACE_SYSTEM_MEMORY:
...@@ -830,19 +817,6 @@ acpi_hw_low_level_write ( ...@@ -830,19 +817,6 @@ acpi_hw_low_level_write (
break; break;
case ACPI_ADR_SPACE_PCI_CONFIG:
pci_id.segment = 0;
pci_id.bus = 0;
pci_id.device = ACPI_PCI_DEVICE (reg->address);
pci_id.function = ACPI_PCI_FUNCTION (reg->address);
pci_register = (u16) ACPI_PCI_REGISTER (reg->address);
status = acpi_os_write_pci_configuration (&pci_id, pci_register,
(acpi_integer) value, width);
break;
default: default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Unsupported address space: %X\n", reg->address_space_id)); "Unsupported address space: %X\n", reg->address_space_id));
......
...@@ -52,11 +52,11 @@ ...@@ -52,11 +52,11 @@
* *
* FUNCTION: acpi_get_timer_resolution * FUNCTION: acpi_get_timer_resolution
* *
* PARAMETERS: none * PARAMETERS: Resolution - Where the resolution is returned
* *
* RETURN: Number of bits of resolution in the PM Timer (24 or 32). * RETURN: Status and timer resolution
* *
* DESCRIPTION: Obtains resolution of the ACPI PM Timer. * DESCRIPTION: Obtains resolution of the ACPI PM Timer (24 or 32 bits).
* *
******************************************************************************/ ******************************************************************************/
...@@ -86,11 +86,11 @@ acpi_get_timer_resolution ( ...@@ -86,11 +86,11 @@ acpi_get_timer_resolution (
* *
* FUNCTION: acpi_get_timer * FUNCTION: acpi_get_timer
* *
* PARAMETERS: none * PARAMETERS: Ticks - Where the timer value is returned
* *
* RETURN: Current value of the ACPI PM Timer (in ticks). * RETURN: Status and current ticks
* *
* DESCRIPTION: Obtains current value of ACPI PM Timer. * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks).
* *
******************************************************************************/ ******************************************************************************/
...@@ -118,11 +118,11 @@ acpi_get_timer ( ...@@ -118,11 +118,11 @@ acpi_get_timer (
* *
* FUNCTION: acpi_get_timer_duration * FUNCTION: acpi_get_timer_duration
* *
* PARAMETERS: start_ticks * PARAMETERS: start_ticks - Starting timestamp
* end_ticks * end_ticks - End timestamp
* time_elapsed * time_elapsed - Where the elapsed time is returned
* *
* RETURN: time_elapsed * RETURN: Status and time_elapsed
* *
* DESCRIPTION: Computes the time elapsed (in microseconds) between two * DESCRIPTION: Computes the time elapsed (in microseconds) between two
* PM Timer time stamps, taking into account the possibility of * PM Timer time stamps, taking into account the possibility of
...@@ -136,7 +136,7 @@ acpi_get_timer ( ...@@ -136,7 +136,7 @@ acpi_get_timer (
* Note that this function accommodates only a single timer * Note that this function accommodates only a single timer
* rollover. Thus for 24-bit timers, this function should only * rollover. Thus for 24-bit timers, this function should only
* be used for calculating durations less than ~4.6 seconds * be used for calculating durations less than ~4.6 seconds
* (~20 minutes for 32-bit timers) -- calculations below * (~20 minutes for 32-bit timers) -- calculations below:
* *
* 2**24 Ticks / 3,600,000 Ticks/Sec = 4.66 sec * 2**24 Ticks / 3,600,000 Ticks/Sec = 4.66 sec
* 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes
...@@ -164,7 +164,6 @@ acpi_get_timer_duration ( ...@@ -164,7 +164,6 @@ acpi_get_timer_duration (
/* /*
* Compute Tick Delta: * Compute Tick Delta:
* -------------------
* Handle (max one) timer rollovers on 24- versus 32-bit timers. * Handle (max one) timer rollovers on 24- versus 32-bit timers.
*/ */
if (start_ticks < end_ticks) { if (start_ticks < end_ticks) {
...@@ -188,10 +187,7 @@ acpi_get_timer_duration ( ...@@ -188,10 +187,7 @@ acpi_get_timer_duration (
} }
/* /*
* Compute Duration: * Compute Duration (Requires a 64-bit divide):
* -----------------
*
* Requires a 64-bit divide:
* *
* time_elapsed = (delta_ticks * 1000000) / PM_TIMER_FREQUENCY; * time_elapsed = (delta_ticks * 1000000) / PM_TIMER_FREQUENCY;
*/ */
......
...@@ -51,6 +51,7 @@ acpi_table_print_srat_entry ( ...@@ -51,6 +51,7 @@ acpi_table_print_srat_entry (
switch (header->type) { switch (header->type) {
case ACPI_SRAT_PROCESSOR_AFFINITY: case ACPI_SRAT_PROCESSOR_AFFINITY:
#ifdef ACPI_DEBUG_OUTPUT
{ {
struct acpi_table_processor_affinity *p = struct acpi_table_processor_affinity *p =
(struct acpi_table_processor_affinity*) header; (struct acpi_table_processor_affinity*) header;
...@@ -58,9 +59,11 @@ acpi_table_print_srat_entry ( ...@@ -58,9 +59,11 @@ acpi_table_print_srat_entry (
p->apic_id, p->lsapic_eid, p->proximity_domain, p->apic_id, p->lsapic_eid, p->proximity_domain,
p->flags.enabled?"enabled":"disabled")); p->flags.enabled?"enabled":"disabled"));
} }
#endif /* ACPI_DEBUG_OUTPUT */
break; break;
case ACPI_SRAT_MEMORY_AFFINITY: case ACPI_SRAT_MEMORY_AFFINITY:
#ifdef ACPI_DEBUG_OUTPUT
{ {
struct acpi_table_memory_affinity *p = struct acpi_table_memory_affinity *p =
(struct acpi_table_memory_affinity*) header; (struct acpi_table_memory_affinity*) header;
...@@ -70,6 +73,7 @@ acpi_table_print_srat_entry ( ...@@ -70,6 +73,7 @@ acpi_table_print_srat_entry (
p->flags.enabled ? "enabled" : "disabled", p->flags.enabled ? "enabled" : "disabled",
p->flags.hot_pluggable ? " hot-pluggable" : "")); p->flags.hot_pluggable ? " hot-pluggable" : ""));
} }
#endif /* ACPI_DEBUG_OUTPUT */
break; break;
default: default:
...@@ -94,8 +98,6 @@ acpi_parse_slit (unsigned long phys_addr, unsigned long size) ...@@ -94,8 +98,6 @@ acpi_parse_slit (unsigned long phys_addr, unsigned long size)
/* downcast just for %llu vs %lu for i386/ia64 */ /* downcast just for %llu vs %lu for i386/ia64 */
localities = (u32) slit->localities; localities = (u32) slit->localities;
printk(KERN_INFO PREFIX "SLIT localities %ux%u\n", localities, localities);
acpi_numa_slit_init(slit); acpi_numa_slit_init(slit);
return 0; return 0;
...@@ -103,7 +105,9 @@ acpi_parse_slit (unsigned long phys_addr, unsigned long size) ...@@ -103,7 +105,9 @@ acpi_parse_slit (unsigned long phys_addr, unsigned long size)
static int __init static int __init
acpi_parse_processor_affinity (acpi_table_entry_header *header) acpi_parse_processor_affinity (
acpi_table_entry_header *header,
const unsigned long end)
{ {
struct acpi_table_processor_affinity *processor_affinity; struct acpi_table_processor_affinity *processor_affinity;
...@@ -121,7 +125,9 @@ acpi_parse_processor_affinity (acpi_table_entry_header *header) ...@@ -121,7 +125,9 @@ acpi_parse_processor_affinity (acpi_table_entry_header *header)
static int __init static int __init
acpi_parse_memory_affinity (acpi_table_entry_header *header) acpi_parse_memory_affinity (
acpi_table_entry_header *header,
const unsigned long end)
{ {
struct acpi_table_memory_affinity *memory_affinity; struct acpi_table_memory_affinity *memory_affinity;
...@@ -148,8 +154,6 @@ acpi_parse_srat (unsigned long phys_addr, unsigned long size) ...@@ -148,8 +154,6 @@ acpi_parse_srat (unsigned long phys_addr, unsigned long size)
srat = (struct acpi_table_srat *) __va(phys_addr); srat = (struct acpi_table_srat *) __va(phys_addr);
printk(KERN_INFO PREFIX "SRAT revision %d\n", srat->table_revision);
return 0; return 0;
} }
......
...@@ -55,6 +55,9 @@ struct acpi_os_dpc ...@@ -55,6 +55,9 @@ struct acpi_os_dpc
void *context; void *context;
}; };
#ifdef CONFIG_ACPI_CUSTOM_DSDT
#include CONFIG_ACPI_CUSTOM_DSDT_FILE
#endif
#ifdef ENABLE_DEBUGGER #ifdef ENABLE_DEBUGGER
#include <linux/kdb.h> #include <linux/kdb.h>
...@@ -241,7 +244,14 @@ acpi_os_table_override (struct acpi_table_header *existing_table, ...@@ -241,7 +244,14 @@ acpi_os_table_override (struct acpi_table_header *existing_table,
if (!existing_table || !new_table) if (!existing_table || !new_table)
return AE_BAD_PARAMETER; return AE_BAD_PARAMETER;
#ifdef CONFIG_ACPI_CUSTOM_DSDT
if (strncmp(existing_table->signature, "DSDT", 4) == 0)
*new_table = (struct acpi_table_header*)AmlCode;
else
*new_table = NULL; *new_table = NULL;
#else
*new_table = NULL;
#endif
return AE_OK; return AE_OK;
} }
......
...@@ -448,7 +448,7 @@ acpi_pci_link_set ( ...@@ -448,7 +448,7 @@ acpi_pci_link_set (
#define PIRQ_PENALTY_ISA_USED (16*16*16*16*16) #define PIRQ_PENALTY_ISA_USED (16*16*16*16*16)
#define PIRQ_PENALTY_ISA_ALWAYS (16*16*16*16*16*16) #define PIRQ_PENALTY_ISA_ALWAYS (16*16*16*16*16*16)
static int __initdata acpi_irq_penalty[ACPI_MAX_IRQS] = { static int acpi_irq_penalty[ACPI_MAX_IRQS] = {
PIRQ_PENALTY_ISA_ALWAYS, /* IRQ0 timer */ PIRQ_PENALTY_ISA_ALWAYS, /* IRQ0 timer */
PIRQ_PENALTY_ISA_ALWAYS, /* IRQ1 keyboard */ PIRQ_PENALTY_ISA_ALWAYS, /* IRQ1 keyboard */
PIRQ_PENALTY_ISA_ALWAYS, /* IRQ2 cascade */ PIRQ_PENALTY_ISA_ALWAYS, /* IRQ2 cascade */
...@@ -468,7 +468,7 @@ static int __initdata acpi_irq_penalty[ACPI_MAX_IRQS] = { ...@@ -468,7 +468,7 @@ static int __initdata acpi_irq_penalty[ACPI_MAX_IRQS] = {
/* >IRQ15 */ /* >IRQ15 */
}; };
int int __init
acpi_irq_penalty_init(void) acpi_irq_penalty_init(void)
{ {
struct list_head *node = NULL; struct list_head *node = NULL;
......
...@@ -101,7 +101,7 @@ acpi_table_print ( ...@@ -101,7 +101,7 @@ acpi_table_print (
else else
name = header->signature; name = header->signature;
printk(KERN_INFO PREFIX "%.4s (v%3.3d %6.6s %8.8s 0x%08x %.4s 0x%08x) @ 0x%p\n", printk(KERN_DEBUG PREFIX "%.4s (v%3.3d %6.6s %8.8s 0x%08x %.4s 0x%08x) @ 0x%p\n",
name, header->revision, header->oem_id, name, header->revision, header->oem_id,
header->oem_table_id, header->oem_revision, header->oem_table_id, header->oem_revision,
header->asl_compiler_id, header->asl_compiler_revision, header->asl_compiler_id, header->asl_compiler_revision,
...@@ -587,7 +587,7 @@ acpi_table_init (void) ...@@ -587,7 +587,7 @@ acpi_table_init (void)
return -ENODEV; return -ENODEV;
} }
printk(KERN_INFO PREFIX "RSDP (v%3.3d %6.6s ) @ 0x%p\n", printk(KERN_DEBUG PREFIX "RSDP (v%3.3d %6.6s ) @ 0x%p\n",
rsdp->revision, rsdp->oem_id, (void *) rsdp_phys); rsdp->revision, rsdp->oem_id, (void *) rsdp_phys);
if (rsdp->revision < 2) if (rsdp->revision < 2)
......
...@@ -161,6 +161,7 @@ struct acpi_thermal { ...@@ -161,6 +161,7 @@ struct acpi_thermal {
unsigned long last_temperature; unsigned long last_temperature;
unsigned long polling_frequency; unsigned long polling_frequency;
u8 cooling_mode; u8 cooling_mode;
volatile u8 zombie;
struct acpi_thermal_flags flags; struct acpi_thermal_flags flags;
struct acpi_thermal_state state; struct acpi_thermal_state state;
struct acpi_thermal_trips trips; struct acpi_thermal_trips trips;
...@@ -647,7 +648,10 @@ static void ...@@ -647,7 +648,10 @@ static void
acpi_thermal_run ( acpi_thermal_run (
unsigned long data) unsigned long data)
{ {
acpi_os_queue_for_execution(OSD_PRIORITY_GPE, acpi_thermal_check, (void *) data); struct acpi_thermal *tz = (struct acpi_thermal *)data;
if (!tz->zombie)
acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
acpi_thermal_check, (void *) data);
} }
...@@ -1351,8 +1355,14 @@ acpi_thermal_remove ( ...@@ -1351,8 +1355,14 @@ acpi_thermal_remove (
tz = (struct acpi_thermal *) acpi_driver_data(device); tz = (struct acpi_thermal *) acpi_driver_data(device);
if (timer_pending(&(tz->timer))) /* avoid timer adding new defer task */
del_timer(&(tz->timer)); tz->zombie = 1;
/* wait for running timer (on other CPUs) finish */
del_timer_sync(&(tz->timer));
/* synchronize deferred task */
acpi_os_wait_events_complete(NULL);
/* deferred task may reinsert timer */
del_timer_sync(&(tz->timer));
status = acpi_remove_notify_handler(tz->handle, status = acpi_remove_notify_handler(tz->handle,
ACPI_DEVICE_NOTIFY, acpi_thermal_notify); ACPI_DEVICE_NOTIFY, acpi_thermal_notify);
...@@ -1374,6 +1384,7 @@ acpi_thermal_remove ( ...@@ -1374,6 +1384,7 @@ acpi_thermal_remove (
acpi_thermal_remove_fs(device); acpi_thermal_remove_fs(device);
kfree(tz);
return_VALUE(0); return_VALUE(0);
} }
......
...@@ -142,16 +142,11 @@ acpi_format_exception ( ...@@ -142,16 +142,11 @@ acpi_format_exception (
*/ */
/* Debug switch - level and trace mask */ /* Debug switch - level and trace mask */
u32 acpi_dbg_level = 0;
#ifdef ACPI_DEBUG_OUTPUT
u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
#else
u32 acpi_dbg_level = ACPI_NORMAL_DEFAULT;
#endif
/* Debug switch - layer (component) mask */ /* Debug switch - layer (component) mask */
u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT; u32 acpi_dbg_layer = 0;
u32 acpi_gbl_nesting_level = 0; u32 acpi_gbl_nesting_level = 0;
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
/* Version string */ /* Version string */
#define ACPI_CA_VERSION 0x20040715 #define ACPI_CA_VERSION 0x20040816
/* /*
* OS name, used for the _OS object. The _OS object is essentially obsolete, * OS name, used for the _OS object. The _OS object is essentially obsolete,
......
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
#define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x0020 | AE_CODE_AML) #define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x0020 | AE_CODE_AML)
#define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x0021 | AE_CODE_AML) #define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x0021 | AE_CODE_AML)
#define AE_CODE_AML_MAX 0x0020 #define AE_CODE_AML_MAX 0x0021
/* /*
* Internal exceptions used for control * Internal exceptions used for control
......
...@@ -94,7 +94,7 @@ extern u32 acpi_gbl_nesting_level; ...@@ -94,7 +94,7 @@ extern u32 acpi_gbl_nesting_level;
* interpreter strictly follows the ACPI specification. Setting to TRUE * interpreter strictly follows the ACPI specification. Setting to TRUE
* allows the interpreter to forgive certain bad AML constructs. * allows the interpreter to forgive certain bad AML constructs.
*/ */
ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_enable_interpeter_slack, FALSE); ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_enable_interpreter_slack, FALSE);
/* /*
* Automatically serialize ALL control methods? Default is FALSE, meaning * Automatically serialize ALL control methods? Default is FALSE, meaning
......
...@@ -364,24 +364,6 @@ ...@@ -364,24 +364,6 @@
#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) #define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
/* Macros for GAS addressing */
#if ACPI_MACHINE_WIDTH != 16
#define ACPI_PCI_DEVICE(a) (u16) ((ACPI_HIDWORD ((a))) & 0x0000FFFF)
#define ACPI_PCI_FUNCTION(a) (u16) ((ACPI_LODWORD ((a))) >> 16)
#define ACPI_PCI_REGISTER(a) (u16) ((ACPI_LODWORD ((a))) & 0x0000FFFF)
#else
/* No support for GAS and PCI IDs in 16-bit mode */
#define ACPI_PCI_FUNCTION(a) (u16) ((a) & 0xFFFF0000)
#define ACPI_PCI_DEVICE(a) (u16) ((a) & 0x0000FFFF)
#define ACPI_PCI_REGISTER(a) (u16) ((a) & 0x0000FFFF)
#endif
/* Bitfields within ACPI registers */ /* Bitfields within ACPI registers */
......
...@@ -106,59 +106,4 @@ int acpi_ec_ecdt_probe (void); ...@@ -106,59 +106,4 @@ int acpi_ec_ecdt_probe (void);
int acpi_processor_set_thermal_limit(acpi_handle handle, int type); int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
/* --------------------------------------------------------------------------
Debug Support
-------------------------------------------------------------------------- */
#define ACPI_DEBUG_RESTORE 0
#define ACPI_DEBUG_LOW 1
#define ACPI_DEBUG_MEDIUM 2
#define ACPI_DEBUG_HIGH 3
#define ACPI_DEBUG_DRIVERS 4
extern u32 acpi_dbg_level;
extern u32 acpi_dbg_layer;
static inline void
acpi_set_debug (
u32 flag)
{
static u32 layer_save;
static u32 level_save;
switch (flag) {
case ACPI_DEBUG_RESTORE:
acpi_dbg_layer = layer_save;
acpi_dbg_level = level_save;
break;
case ACPI_DEBUG_LOW:
case ACPI_DEBUG_MEDIUM:
case ACPI_DEBUG_HIGH:
case ACPI_DEBUG_DRIVERS:
layer_save = acpi_dbg_layer;
level_save = acpi_dbg_level;
break;
}
switch (flag) {
case ACPI_DEBUG_LOW:
acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS;
acpi_dbg_level = ACPI_DEBUG_DEFAULT;
break;
case ACPI_DEBUG_MEDIUM:
acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS;
acpi_dbg_level = ACPI_LV_FUNCTIONS | ACPI_LV_ALL_EXCEPTIONS;
break;
case ACPI_DEBUG_HIGH:
acpi_dbg_layer = 0xFFFFFFFF;
acpi_dbg_level = 0xFFFFFFFF;
break;
case ACPI_DEBUG_DRIVERS:
acpi_dbg_layer = ACPI_ALL_DRIVERS;
acpi_dbg_level = 0xFFFFFFFF;
break;
}
}
#endif /*__ACPI_DRIVERS_H__*/ #endif /*__ACPI_DRIVERS_H__*/
...@@ -453,14 +453,15 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); ...@@ -453,14 +453,15 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver);
#ifdef CONFIG_ACPI_EC #ifdef CONFIG_ACPI_EC
int ec_read(u8 addr, u8 *val); extern int ec_read(u8 addr, u8 *val);
int ec_write(u8 addr, u8 val); extern int ec_write(u8 addr, u8 val);
#endif /*CONFIG_ACPI_EC*/ #endif /*CONFIG_ACPI_EC*/
#ifdef CONFIG_ACPI_INTERPRETER #ifdef CONFIG_ACPI_INTERPRETER
int acpi_blacklisted(void); extern int acpi_blacklisted(void);
extern void acpi_bios_year(char *s);
#else /*!CONFIG_ACPI_INTERPRETER*/ #else /*!CONFIG_ACPI_INTERPRETER*/
......
...@@ -286,8 +286,10 @@ __setup("quiet", quiet_kernel); ...@@ -286,8 +286,10 @@ __setup("quiet", quiet_kernel);
static int __init unknown_bootoption(char *param, char *val) static int __init unknown_bootoption(char *param, char *val)
{ {
/* Change NUL term back to "=", to make "param" the whole string. */ /* Change NUL term back to "=", to make "param" the whole string. */
if (val) if (val) {
val[-1] = '='; if (val[-1] == '"') val[-2] = '=';
else val[-1] = '=';
}
/* Handle obsolete-style parameters */ /* Handle obsolete-style parameters */
if (obsolete_checksetup(param)) if (obsolete_checksetup(param))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment