Skip to content

Commit

Permalink
Merge branches 'release', 'bugzilla-6217', 'bugzilla-6629', 'bugzilla…
Browse files Browse the repository at this point in the history
…-6933', 'bugzilla-7186', 'bugzilla-8269', 'bugzilla-8570', 'bugzilla-9139', 'bugzilla-9277', 'bugzilla-9341', 'bugzilla-9444', 'bugzilla-9614', 'bugzilla-9643' and 'bugzilla-9644' into release
  • Loading branch information
Len Brown committed Feb 7, 2008
14 parents 8f85901 + a7f9b1f + b4d2730 + 37748eb + ed9cbcd + 856608e + cfaf374 + 223630f + 38531e6 + b3b233c + 239665a + 0119509 + 975c302 + 0879802 commit c64768a
Show file tree
Hide file tree
Showing 19 changed files with 209 additions and 125 deletions.
3 changes: 3 additions & 0 deletions Documentation/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Following translations are available on the WWW:
- this file.
ABI/
- info on kernel <-> userspace ABI and relative interface stability.

BUG-HUNTING
- brute force method of doing binary search of patches to find bug.
Changes
Expand Down Expand Up @@ -66,6 +67,8 @@ VGA-softcursor.txt
- how to change your VGA cursor from a blinking underscore.
accounting/
- documentation on accounting and taskstats.
acpi/
- info on ACPI-specific hooks in the kernel.
aoe/
- description of AoE (ATA over Ethernet) along with config examples.
applying-patches.txt
Expand Down
26 changes: 26 additions & 0 deletions Documentation/acpi/method-tracing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/sys/module/acpi/parameters/:

trace_method_name
The AML method name that the user wants to trace

trace_debug_layer
The temporary debug_layer used when tracing the method.
Using 0xffffffff by default if it is 0.

trace_debug_level
The temporary debug_level used when tracing the method.
Using 0x00ffffff by default if it is 0.

trace_state
The status of the tracing feature.

"enabled" means this feature is enabled
and the AML method is traced every time it's executed.

"1" means this feature is enabled and the AML method
will only be traced during the next execution.

"disabled" means this feature is disabled.
Users can enable/disable this debug tracing feature by
"echo string > /sys/module/acpi/parameters/trace_state".
"string" should be one of "enable", "disable" and "1".
26 changes: 14 additions & 12 deletions arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ unsigned int acpi_cpei_phys_cpuid;

unsigned long acpi_wakeup_address = 0;

#ifdef CONFIG_IA64_GENERIC
static unsigned long __init acpi_find_rsdp(void)
{
unsigned long rsdp_phys = 0;

if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
rsdp_phys = efi.acpi20;
else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
printk(KERN_WARNING PREFIX
"v1.0/r0.71 tables no longer supported\n");
return rsdp_phys;
}
#endif

const char __init *
acpi_get_sysname(void)
{
Expand Down Expand Up @@ -631,18 +645,6 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
return 0;
}

unsigned long __init acpi_find_rsdp(void)
{
unsigned long rsdp_phys = 0;

if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
rsdp_phys = efi.acpi20;
else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
printk(KERN_WARNING PREFIX
"v1.0/r0.71 tables no longer supported\n");
return rsdp_phys;
}

int __init acpi_boot_init(void)
{

Expand Down
40 changes: 0 additions & 40 deletions arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,25 +587,6 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)

EXPORT_SYMBOL(acpi_unregister_ioapic);

static unsigned long __init
acpi_scan_rsdp(unsigned long start, unsigned long length)
{
unsigned long offset = 0;
unsigned long sig_len = sizeof("RSD PTR ") - 1;

/*
* Scan all 16-byte boundaries of the physical memory region for the
* RSDP signature.
*/
for (offset = 0; offset < length; offset += 16) {
if (strncmp((char *)(phys_to_virt(start) + offset), "RSD PTR ", sig_len))
continue;
return (start + offset);
}

return 0;
}

static int __init acpi_parse_sbf(struct acpi_table_header *table)
{
struct acpi_table_boot *sb;
Expand Down Expand Up @@ -748,27 +729,6 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
return 0;
}

unsigned long __init acpi_find_rsdp(void)
{
unsigned long rsdp_phys = 0;

if (efi_enabled) {
if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
return efi.acpi20;
else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
return efi.acpi;
}
/*
* Scan memory looking for the RSDP signature. First search EBDA (low
* memory) paragraphs and then search upper memory (E0000-FFFFF).
*/
rsdp_phys = acpi_scan_rsdp(0, 0x400);
if (!rsdp_phys)
rsdp_phys = acpi_scan_rsdp(0xE0000, 0x20000);

return rsdp_phys;
}

#ifdef CONFIG_X86_LOCAL_APIC
/*
* Parse LAPIC entries in MADT
Expand Down
5 changes: 1 addition & 4 deletions arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,7 @@ static unsigned int pentium4_get_frequency(void)
printk(KERN_DEBUG "speedstep-lib: couldn't detect FSB speed. Please send an e-mail to <linux@brodo.de>\n");

/* Multiplier. */
if (c->x86_model < 2)
mult = msr_lo >> 27;
else
mult = msr_lo >> 24;
mult = msr_lo >> 24;

dprintk("P4 - FSB %u kHz; Multiplier %u; Speed %u kHz\n", fsb, mult, (fsb * mult));

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/srat_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ int __init get_memcfg_from_srat(void)
int tables = 0;
int i = 0;

rsdp_address = acpi_find_rsdp();
rsdp_address = acpi_os_get_root_pointer();
if (!rsdp_address) {
printk("%s: System description tables not found\n",
__FUNCTION__);
Expand Down
2 changes: 0 additions & 2 deletions drivers/acpi/blacklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata = {
/* IBM 600E - _ADR should return 7, but it returns 1 */
{"IBM ", "TP600E ", 0x00000105, ACPI_SIG_DSDT, less_than_or_equal,
"Incorrect _ADR", 1},
{"ASUS\0\0", "P2B-S ", 0, ACPI_SIG_DSDT, all_versions,
"Bogus PCI routing", 1},

{""}
};
Expand Down
57 changes: 57 additions & 0 deletions drivers/acpi/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,63 @@ static int param_get_debug_level(char *buffer, struct kernel_param *kp) {
module_param_call(debug_layer, param_set_uint, param_get_debug_layer, &acpi_dbg_layer, 0644);
module_param_call(debug_level, param_set_uint, param_get_debug_level, &acpi_dbg_level, 0644);

static char trace_method_name[6];
module_param_string(trace_method_name, trace_method_name, 6, 0644);
static unsigned int trace_debug_layer;
module_param(trace_debug_layer, uint, 0644);
static unsigned int trace_debug_level;
module_param(trace_debug_level, uint, 0644);

static int param_set_trace_state(const char *val, struct kernel_param *kp)
{
int result = 0;

if (!strncmp(val, "enable", strlen("enable") - 1)) {
result = acpi_debug_trace(trace_method_name, trace_debug_level,
trace_debug_layer, 0);
if (result)
result = -EBUSY;
goto exit;
}

if (!strncmp(val, "disable", strlen("disable") - 1)) {
int name = 0;
result = acpi_debug_trace((char *)&name, trace_debug_level,
trace_debug_layer, 0);
if (result)
result = -EBUSY;
goto exit;
}

if (!strncmp(val, "1", 1)) {
result = acpi_debug_trace(trace_method_name, trace_debug_level,
trace_debug_layer, 1);
if (result)
result = -EBUSY;
goto exit;
}

result = -EINVAL;
exit:
return result;
}

static int param_get_trace_state(char *buffer, struct kernel_param *kp)
{
if (!acpi_gbl_trace_method_name)
return sprintf(buffer, "disable");
else {
if (acpi_gbl_trace_flags & 1)
return sprintf(buffer, "1");
else
return sprintf(buffer, "enable");
}
return 0;
}

module_param_call(trace_state, param_set_trace_state, param_get_trace_state,
NULL, 0644);

/* --------------------------------------------------------------------------
FS Interface (/proc)
-------------------------------------------------------------------------- */
Expand Down
19 changes: 15 additions & 4 deletions drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
void *handler_context, void *region_context)
{
struct acpi_ec *ec = handler_context;
int result = 0, i = 0;
int result = 0, i;
u8 temp = 0;

if ((address > 0xFF) || !value || !handler_context)
Expand All @@ -585,18 +585,29 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
if (bits != 8 && acpi_strict)
return AE_BAD_PARAMETER;

while (bits - i > 0) {
acpi_ec_burst_enable(ec);

if (function == ACPI_READ) {
result = acpi_ec_read(ec, address, &temp);
*value = temp;
} else {
temp = 0xff & (*value);
result = acpi_ec_write(ec, address, temp);
}

for (i = 8; unlikely(bits - i > 0); i += 8) {
++address;
if (function == ACPI_READ) {
result = acpi_ec_read(ec, address, &temp);
(*value) |= ((acpi_integer)temp) << i;
} else {
temp = 0xff & ((*value) >> i);
result = acpi_ec_write(ec, address, temp);
}
i += 8;
++address;
}

acpi_ec_burst_disable(ec);

switch (result) {
case -EINVAL:
return AE_BAD_PARAMETER;
Expand Down
8 changes: 4 additions & 4 deletions drivers/acpi/events/evgpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,18 +270,18 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info)
case ACPI_GPE_TYPE_WAKE_RUN:
ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_WAKE_ENABLED);

/*lint -fallthrough */
/* fallthrough */

case ACPI_GPE_TYPE_RUNTIME:

/* Disable the requested runtime GPE */

ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED);
status = acpi_hw_write_gpe_enable_reg(gpe_event_info);
break;

/* fallthrough */

default:
return_ACPI_STATUS(AE_BAD_PARAMETER);
acpi_hw_write_gpe_enable_reg(gpe_event_info);
}

return_ACPI_STATUS(AE_OK);
Expand Down
8 changes: 6 additions & 2 deletions drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,12 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)
"System description tables not found\n");
return 0;
}
} else
return acpi_find_rsdp();
} else {
acpi_physical_address pa = 0;

acpi_find_root_pointer(&pa);
return pa;
}
}

void __iomem *acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
Expand Down
17 changes: 12 additions & 5 deletions drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,11 +812,18 @@ static int is_processor_present(acpi_handle handle)


status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT)) {
ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
return 0;
}
return 1;
/*
* if a processor object does not have an _STA object,
* OSPM assumes that the processor is present.
*/
if (status == AE_NOT_FOUND)
return 1;

if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_PRESENT))
return 1;

ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
return 0;
}

static
Expand Down
Loading

0 comments on commit c64768a

Please sign in to comment.