Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84136
b: refs/heads/master
c: 70ec75c
h: refs/heads/master
v: v3
  • Loading branch information
Len Brown committed Feb 7, 2008
1 parent 44188c1 commit 93b422a
Show file tree
Hide file tree
Showing 46 changed files with 3,431 additions and 2,391 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 23b168d425ca0ca25257ff8205a39f1c2d1b0f27
refs/heads/master: 70ec75c5b8e0bda7a16fb387f91e08545f379a0e
3 changes: 3 additions & 0 deletions trunk/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 trunk/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".
116 changes: 108 additions & 8 deletions trunk/Documentation/thinkpad-acpi.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ThinkPad ACPI Extras Driver

Version 0.17
October 04th, 2007
Version 0.19
January 06th, 2008

Borislav Deianov <borislav@users.sf.net>
Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Expand Down Expand Up @@ -215,6 +215,11 @@ The following commands can be written to the /proc/acpi/ibm/hotkey file:
... any other 8-hex-digit mask ...
echo reset > /proc/acpi/ibm/hotkey -- restore the original mask

The procfs interface does not support NVRAM polling control. So as to
maintain maximum bug-to-bug compatibility, it does not report any masks,
nor does it allow one to manipulate the hot key mask when the firmware
does not support masks at all, even if NVRAM polling is in use.

sysfs notes:

hotkey_bios_enabled:
Expand All @@ -231,17 +236,26 @@ sysfs notes:
to this value.

hotkey_enable:
Enables/disables the hot keys feature, and reports
current status of the hot keys feature.
Enables/disables the hot keys feature in the ACPI
firmware, and reports current status of the hot keys
feature. Has no effect on the NVRAM hot key polling
functionality.

0: disables the hot keys feature / feature disabled
1: enables the hot keys feature / feature enabled

hotkey_mask:
bit mask to enable driver-handling and ACPI event
generation for each hot key (see above). Returns the
current status of the hot keys mask, and allows one to
modify it.
bit mask to enable driver-handling (and depending on
the firmware, ACPI event generation) for each hot key
(see above). Returns the current status of the hot keys
mask, and allows one to modify it.

Note: when NVRAM polling is active, the firmware mask
will be different from the value returned by
hotkey_mask. The driver will retain enabled bits for
hotkeys that are under NVRAM polling even if the
firmware refuses them, and will not set these bits on
the firmware hot key mask.

hotkey_all_mask:
bit mask that should enable event reporting for all
Expand All @@ -257,12 +271,48 @@ sysfs notes:
handled by the firmware anyway. Echo it to
hotkey_mask above, to use.

hotkey_source_mask:
bit mask that selects which hot keys will the driver
poll the NVRAM for. This is auto-detected by the driver
based on the capabilities reported by the ACPI firmware,
but it can be overridden at runtime.

Hot keys whose bits are set in both hotkey_source_mask
and also on hotkey_mask are polled for in NVRAM. Only a
few hot keys are available through CMOS NVRAM polling.

Warning: when in NVRAM mode, the volume up/down/mute
keys are synthesized according to changes in the mixer,
so you have to use volume up or volume down to unmute,
as per the ThinkPad volume mixer user interface. When
in ACPI event mode, volume up/down/mute are reported as
separate events, but this behaviour may be corrected in
future releases of this driver, in which case the
ThinkPad volume mixer user interface semanthics will be
enforced.

hotkey_poll_freq:
frequency in Hz for hot key polling. It must be between
0 and 25 Hz. Polling is only carried out when strictly
needed.

Setting hotkey_poll_freq to zero disables polling, and
will cause hot key presses that require NVRAM polling
to never be reported.

Setting hotkey_poll_freq too low will cause repeated
pressings of the same hot key to be misreported as a
single key press, or to not even be detected at all.
The recommended polling frequency is 10Hz.

hotkey_radio_sw:
if the ThinkPad has a hardware radio switch, this
attribute will read 0 if the switch is in the "radios
disabled" postition, and 1 if the switch is in the
"radios enabled" position.

This attribute has poll()/select() support.

hotkey_report_mode:
Returns the state of the procfs ACPI event report mode
filter for hot keys. If it is set to 1 (the default),
Expand All @@ -277,6 +327,25 @@ sysfs notes:
May return -EPERM (write access locked out by module
parameter) or -EACCES (read-only).

wakeup_reason:
Set to 1 if the system is waking up because the user
requested a bay ejection. Set to 2 if the system is
waking up because the user requested the system to
undock. Set to zero for normal wake-ups or wake-ups
due to unknown reasons.

This attribute has poll()/select() support.

wakeup_hotunplug_complete:
Set to 1 if the system was waken up because of an
undock or bay ejection request, and that request
was sucessfully completed. At this point, it might
be useful to send the system back to sleep, at the
user's choice. Refer to HKEY events 0x4003 and
0x3003, below.

This attribute has poll()/select() support.

input layer notes:

A Hot key is mapped to a single input layer EV_KEY event, possibly
Expand Down Expand Up @@ -427,6 +496,23 @@ Non hot-key ACPI HKEY event map:
The above events are not propagated by the driver, except for legacy
compatibility purposes when hotkey_report_mode is set to 1.

0x2304 System is waking up from suspend to undock
0x2305 System is waking up from suspend to eject bay
0x2404 System is waking up from hibernation to undock
0x2405 System is waking up from hibernation to eject bay

The above events are never propagated by the driver.

0x3003 Bay ejection (see 0x2x05) complete, can sleep again
0x4003 Undocked (see 0x2x04), can sleep again
0x5009 Tablet swivel: switched to tablet mode
0x500A Tablet swivel: switched to normal mode
0x500B Tablet pen insterted into its storage bay
0x500C Tablet pen removed from its storage bay
0x5010 Brightness level changed (newer Lenovo BIOSes)

The above events are propagated by the driver.

Compatibility notes:

ibm-acpi and thinkpad-acpi 0.15 (mainline kernels before 2.6.23) never
Expand Down Expand Up @@ -1263,3 +1349,17 @@ Sysfs interface changelog:
and the hwmon class for libsensors4 (lm-sensors 3)
compatibility. Moved all hwmon attributes to this
new platform device.

0x020100: Marker for thinkpad-acpi with hot key NVRAM polling
support. If you must, use it to know you should not
start an userspace NVRAM poller (allows to detect when
NVRAM is compiled out by the user because it is
unneeded/undesired in the first place).
0x020101: Marker for thinkpad-acpi with hot key NVRAM polling
and proper hotkey_mask semanthics (version 8 of the
NVRAM polling patch). Some development snapshots of
0.18 had an earlier version that did strange things
to hotkey_mask.

0x020200: Add poll()/select() support to the following attributes:
hotkey_radio_sw, wakeup_hotunplug_complete, wakeup_reason
28 changes: 15 additions & 13 deletions trunk/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 @@ -152,7 +166,7 @@ int acpi_request_vector(u32 int_type)
return vector;
}

char *__acpi_map_table(unsigned long phys_addr, unsigned long size)
char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size)
{
return __va(phys_addr);
}
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
6 changes: 6 additions & 0 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,19 @@ config ARCH_HAS_ILOG2_U32
config ARCH_HAS_ILOG2_U64
def_bool n

config ARCH_HAS_CPU_IDLE_WAIT
def_bool y

config GENERIC_CALIBRATE_DELAY
def_bool y

config GENERIC_TIME_VSYSCALL
bool
default X86_64

config ARCH_HAS_CPU_RELAX
def_bool y

config HAVE_SETUP_PER_CPU_AREA
def_bool X86_64

Expand Down
44 changes: 2 additions & 42 deletions trunk/arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC;
#ifdef CONFIG_X86_64

/* rely on all ACPI tables being in the direct mapping */
char *__acpi_map_table(unsigned long phys_addr, unsigned long size)
char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size)
{
if (!phys_addr || !size)
return NULL;
Expand All @@ -131,7 +131,7 @@ char *__acpi_map_table(unsigned long phys_addr, unsigned long size)
* from the fixed base. That's why we start at FIX_IO_APIC_BASE_END and
* count idx down while incrementing the phys address.
*/
char *__acpi_map_table(unsigned long phys, unsigned long size)
char *__init __acpi_map_table(unsigned long phys, unsigned long size)
{
unsigned long base, offset, mapped_size;
int idx;
Expand Down 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 trunk/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 trunk/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
Loading

0 comments on commit 93b422a

Please sign in to comment.