Myron Stowe | 9 Feb 17:36
Picon
Favicon
Gravatar

[PATCH] ACPI: Fix logic for removing mappings in 'acpi_unmap'

From: Myron Stowe <mstowe <at> redhat.com>

Make sure the removal of mappings uses the same logic that put the
mappings in place.

Signed-off-by: Myron Stowe <myron.stowe <at> redhat.com>
---

 drivers/acpi/osl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 412a1e0..5aef087 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -347,7 +347,7 @@ static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr)
 	unsigned long pfn;

 	pfn = pg_off >> PAGE_SHIFT;
-	if (page_is_ram(pfn))
+	if (should_use_kmap(pfn))
 		kunmap(pfn_to_page(pfn));
 	else
 		iounmap(vaddr);

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Tang Liang | 9 Feb 04:30
Picon
Favicon
Gravatar

[PATCH 0/5] xen: patches for supporting efi

Hi

The following patches introduce and implement efi support in dom0.
The efi memory is owned by Xen and efi run-time service can not be called 
directly in dom0, so a new efi driver is needed by Xen efi. 
These patches are based on v3.3.0-rc2+. 

Descriptions for these patches:

The efi public functions are changed to function pointers in efi_init_funcs 
struct. They act as efi generic functions as default. 
As a benefit from this change, we can register xen efi init func. 

In order to add xen efi video support, it is required to add xen-efi's 
new video type(XEN_VGATYPE_EFI_LFB) case handler in the function xen_init_vga 
and set the video type to VIDEO_TYPE_EFI to enable efi video mode. 

I have tested this patch on Dell Opti 790.

Xen efi boot support is added by Jan Beulich, more detail information can be 
gotten from the url: 
http://wiki.xen.org/xenwiki/XenParavirtOps, search "efi" in the page.

The example of config file for efi boot:
kernel=vmlinuz-3.3.0-rc2+ root=xx ro console=tty0
ramdisk=initramfs-3.3.0-rc2+.img
video=gfx-x.0 

The detailed test which i have done: 
First, Check efifb driver work well or not and check the kernel messesge ro
(Continue reading)

Yinghai Lu | 7 Feb 20:45
Favicon

[PATCH -v2 -for driver-core-next] ACPI: remove duplicated lines of merging problems with acpi_processor_start

When checking driver-core tree, found crazying warnings on my setups.

[  216.025849] calling  acpi_processor_init+0x0/0x81 @ 1
[  216.045332] ACPI: Requesting acpi_cpufreq
[  216.047454] Monitor-Mwait will be used to enter C-1 state
[  216.047912] Monitor-Mwait will be used to enter C-3 state
[  216.065270] ACPI: acpi_idle registered with cpuidle
[  216.068241] kobject (ffff8870364a1940): tried to init an initialized object, something is seriously wrong.
[  216.085287] Pid: 1, comm: swapper/0 Not tainted 3.3.0-rc2-tip-yh-02428-ge663840-dirty #247
[  216.105041] Call Trace:
[  216.105192]  [<ffffffff813a9c06>] kobject_init+0x33/0x83
[  216.124880]  [<ffffffff813aa1f8>] kobject_init_and_add+0x23/0x57
[  216.125158]  [<ffffffff819f3a08>] cpuidle_add_sysfs+0x49/0x62
[  216.144850]  [<ffffffff819f2a28>] __cpuidle_register_device+0xe6/0x10e
[  216.145182]  [<ffffffff819f2ea4>] cpuidle_register_device+0x25/0x4d
[  216.164912]  [<ffffffff81cb5774>] acpi_processor_power_init+0x13e/0x16c
[  216.165205]  [<ffffffff81427620>] ? acpi_processor_get_throttling_info+0x128/0x158
[  216.185012]  [<ffffffff81c68ae5>] acpi_processor_start+0x62/0x11d
[  216.204861]  [<ffffffff81cb55ff>] acpi_processor_add+0x1b0/0x1e7
[  216.205144]  [<ffffffff81402a7e>] acpi_device_probe+0x4e/0x11c
[  216.225063]  [<ffffffff8148f0e7>] really_probe+0x99/0x126
[  216.225328]  [<ffffffff8148f2a3>] driver_probe_device+0x3b/0x56
[  216.244846]  [<ffffffff8148f31d>] __driver_attach+0x5f/0x82
[  216.245101]  [<ffffffff8148f2be>] ? driver_probe_device+0x56/0x56
[  216.264668]  [<ffffffff8148db80>] bus_for_each_dev+0x5c/0x88
[  216.264942]  [<ffffffff8148eea7>] driver_attach+0x1e/0x20
[  216.284639]  [<ffffffff8148eaec>] bus_add_driver+0xca/0x21d
[  216.284903]  [<ffffffff81095827>] ? local_clock+0xf/0x3c
[  216.304580]  [<ffffffff82814177>] ? acpi_fan_init+0x18/0x18
[  216.304849]  [<ffffffff8148f79b>] driver_register+0x91/0xfe
(Continue reading)

Yinghai Lu | 7 Feb 17:20
Favicon

[PATCH -for driver-core-next] ACPI: remove duplicated lines of merging problems with acpi_processor_start

When checking driver-core tree, found crazying warnings on my setups.

[  216.025849] calling  acpi_processor_init+0x0/0x81 @ 1
[  216.045332] ACPI: Requesting acpi_cpufreq
[  216.047454] Monitor-Mwait will be used to enter C-1 state
[  216.047912] Monitor-Mwait will be used to enter C-3 state
[  216.065270] ACPI: acpi_idle registered with cpuidle
[  216.068241] kobject (ffff8870364a1940): tried to init an initialized object, something is seriously wrong.
[  216.085287] Pid: 1, comm: swapper/0 Not tainted 3.3.0-rc2-tip-yh-02428-ge663840-dirty #247
[  216.105041] Call Trace:
[  216.105192]  [<ffffffff813a9c06>] kobject_init+0x33/0x83
[  216.124880]  [<ffffffff813aa1f8>] kobject_init_and_add+0x23/0x57
[  216.125158]  [<ffffffff819f3a08>] cpuidle_add_sysfs+0x49/0x62
[  216.144850]  [<ffffffff819f2a28>] __cpuidle_register_device+0xe6/0x10e
[  216.145182]  [<ffffffff819f2ea4>] cpuidle_register_device+0x25/0x4d
[  216.164912]  [<ffffffff81cb5774>] acpi_processor_power_init+0x13e/0x16c
[  216.165205]  [<ffffffff81427620>] ? acpi_processor_get_throttling_info+0x128/0x158
[  216.185012]  [<ffffffff81c68ae5>] acpi_processor_start+0x62/0x11d
[  216.204861]  [<ffffffff81cb55ff>] acpi_processor_add+0x1b0/0x1e7
[  216.205144]  [<ffffffff81402a7e>] acpi_device_probe+0x4e/0x11c
[  216.225063]  [<ffffffff8148f0e7>] really_probe+0x99/0x126
[  216.225328]  [<ffffffff8148f2a3>] driver_probe_device+0x3b/0x56
[  216.244846]  [<ffffffff8148f31d>] __driver_attach+0x5f/0x82
[  216.245101]  [<ffffffff8148f2be>] ? driver_probe_device+0x56/0x56
[  216.264668]  [<ffffffff8148db80>] bus_for_each_dev+0x5c/0x88
[  216.264942]  [<ffffffff8148eea7>] driver_attach+0x1e/0x20
[  216.284639]  [<ffffffff8148eaec>] bus_add_driver+0xca/0x21d
[  216.284903]  [<ffffffff81095827>] ? local_clock+0xf/0x3c
[  216.304580]  [<ffffffff82814177>] ? acpi_fan_init+0x18/0x18
[  216.304849]  [<ffffffff8148f79b>] driver_register+0x91/0xfe
(Continue reading)

Matthew Garrett | 6 Feb 17:27
Favicon

Re: [PATCH 3/5] ACPI: EC: Add a limited number of repeats after false EC interrupts

On Mon, Feb 06, 2012 at 08:17:10AM -0800, Andi Kleen wrote:
> My Acer laptop has a large number of false EC interrupts
> (interrupts when the EC indexed data register protocol is in the wrong
> state, expecting input when we should send output or vice versa)
> It seems the hardware triggers the interrupt before it actually
> sets the right status in the register.

Our EC code is, at this point, a layer of hacks piled on top of other 
hacks. We have various patches that fix some machines and break others 
and a lack of a detailed description of what the driver actually does 
and where it deviates from the specification (and why).

I mention this not because I object to adding more hacks to the pile, 
but because at some point we're really going to need to bite the bullet 
and figure out how Windows deals with this hardware and what we're doing 
differently. That probably means adding ec emulation to qemu.

--

-- 
Matthew Garrett | mjg59 <at> srcf.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Andi Kleen | 6 Feb 17:17

Updated throttling fix patchkit

Here's an updated patchkit to fix ACPI thermal zone throttling and some
related problems. See the individual patches for more details.

Changes to the earlier version:

- Address earlier review comments
- Fix package index computation
- Shut up Intel IPS driver

This is ready for merging now.

-Andi

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Daniel Toussaint | 6 Feb 04:25
Gravatar

Driver for handling SCI interrupt.

Dear list,

I am working on an Intel (ICH8) based system. A custom device on the system
emits interrupts to a GPI on the ICH8 chip. Currently, as a test, I have
from userspace configured the GPI we use to send a SCI. This seems to work,
because I get a "IRQ9 , nobody cared" message from the kernel.
My questions now are :
How do I go about and create an ACPI based driver to catch this event ? Or am
I searching in the wrong direction.
If I am right, and the driver has to go through ACPI, are changes to the
ACPI tables in BIOS required ?

Greetings,

Daniel

--
Gtalk: daniel.toussaint <at> gmail.com
Skype: supertoussi
Cell: +886-915-680-291
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jesper Juhl | 5 Feb 02:12
Favicon

[PATCH] ACPI, psargs: Fix small mem leaks on error paths

As far as I can see, there are two small mem leaks in error paths of
'acpi_ps_get_next_field()' where we neglect to free the memory
previously allocated to 'field'.

I believe this patch should fix the leaks.

Signed-off-by: Jesper Juhl <jj <at> chaosbits.net>
---
 drivers/acpi/acpica/psargs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

 Note: Compile tested only.

diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c
index 5ac36ab..a683d66 100644
--- a/drivers/acpi/acpica/psargs.c
+++ b/drivers/acpi/acpica/psargs.c
@@ -618,6 +618,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state

 				arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP);
 				if (!arg) {
+					acpi_ps_free_op(field);
 					return_PTR(NULL);
 				}

@@ -662,6 +663,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
 		} else {
 			arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP);
 			if (!arg) {
+				acpi_ps_free_op(field);
(Continue reading)

Kamil Iskra | 4 Feb 06:59
Gravatar

Patch to correct battery capacity values on Thinkpads

[ Note: this is a follow-up on
https://bugzilla.kernel.org/show_bug.cgi?id=41062 ]

Please find below a patch to drivers/acpi/battery.c that adds a quirk to
correctly report battery capacity on recent Lenovo Thinkpad models.  The
2010 and 2011 Thinkpad models that I tested (x201, t410, t410s, and x220)
exhibit a problem where, when battery capacity reporting unit is mAh, the
values being reported are wrong.

For some reason, these Thinkpads switch the reporting unit between mAh and
mWh; generally, mAh is used when a laptop is plugged in and mWh when it's
unplugged, although a suspend/resume or rmmod/modprobe is needed for the
switch to take an effect.

Anyway, the values reported in mAh are *always* wrong.  I tested back to
kernel 2.6.34, with multiple machines and BIOS versions.  Simply plugging a
laptop into mains before turning it on is enough to reproduce the problem.
Here's a sample /proc/acpi/battery/BAT0/info from Thinkpad x220 with a
4-cell battery:

present:                 yes
design capacity:         2886 mAh
last full capacity:      2909 mAh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 145 mAh
design capacity low:     13 mAh
cycle count:              0
capacity granularity 1:  1 mAh
capacity granularity 2:  1 mAh
(Continue reading)

David Barker | 2 Feb 17:20
Picon
Favicon
Gravatar

Ref: Information about Your late Relation/Family member-Final Notice.


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Matthew Garrett | 1 Feb 16:26
Picon
Favicon

[PATCH 1/2] ACPI: Evaluate thermal trip points before reading temperature

An HP laptop (Pavilion G4-1016tx) has the following code in _TMP:

       Store (\_SB.PCI0.LPCB.EC0.RTMP, Local0)
       If (LGreaterEqual (Local0, S4TP))
       {
           Store (One, HTS4)
       }

S4TP is initialised at 0 and not programmed further until either _HOT or
_CRT is called. If we evaluate _TMP before the trip points then HTS4 will
always be set, causing the firmware to generate a message on boot
complaining that the system shut down because of overheating. The simplest
solution is just to reverse the checking of trip points and _TMP in thermal
init.

Signed-off-by: Matthew Garrett <mjg <at> redhat.com>
---
 drivers/acpi/thermal.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 48fbc64..7dbebea 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -941,13 +941,13 @@ static int acpi_thermal_get_info(struct acpi_thermal *tz)
 	if (!tz)
 		return -EINVAL;

-	/* Get temperature [_TMP] (required) */
-	result = acpi_thermal_get_temperature(tz);
(Continue reading)


Gmane