nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   [PATCH] Fix parameter ordering in acpi_walk_namespace (http://www.nvnews.net/vbulletin/showthread.php?t=152065)

Anssi 06-15-10 07:19 PM

[PATCH] Fix parameter ordering in acpi_walk_namespace
 
1 Attachment(s)
Hi!

The NV_ACPI_WALK_NAMESPACE is expanded wrongly on 2.6.33+, as originally noted by Yuval Hager in Gentoo #301318.

This is still the case with latest stable & beta releases, 195.36.31 and 256.29.

Attached is the patch from our tree.

ShiningArcanine 06-15-10 08:59 PM

Re: [PATCH] Fix parameter ordering in acpi_walk_namespace
 
I believe you found the cause of an issue I was having trouble nailing down:

http://www.nvnews.net/vbulletin/showthread.php?t=151685

The irony here is that I am the person who filed the original bug report at the Gentoo Linux bug tracker where Yuval Hager noted this issue, and I did not realize that nvidia's developers had introduced this issue to newer versions of nvidia's drivers. To make matters worse, the Gentoo package maintainer for Nvidia's drivers appears to have been completely unaware of this issue and not only did this go unpatched in the newer versions of the nvidia drivers, but the bad patch which was circulated on nvnews.net a few months ago was introduced to Gentoo, despite an open bug report saying to do otherwise.

Thankyou for posting about this here. I filed a bug with the Gentoo bug tracker that I hope will result in having this fixed:

http://bugs.gentoo.org/show_bug.cgi?id=324197

zander 06-16-10 10:15 AM

Re: [PATCH] Fix parameter ordering in acpi_walk_namespace
 
Thanks for reporting this problem. I'll fix the seven-argument version of NV_ACPI_WALK_NAMESPACE() for future driver releases.

zander 06-16-10 10:38 AM

Re: [PATCH] Fix parameter ordering in acpi_walk_namespace
 
I should note that the current version should not really have functional fallout: in 195.36.xx release builds (i.e. without DEBUG #defined), NV_ACPI_WALK_NAMESPACE() is only invoked as follows:
NV_ACPI_WALK_NAMESPACE(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, nv_acpi_find_methods, NULL, NULL);
Given the current implementation of NV_ACPI_WALK_NAMESPACE() for Linux 2.6.33+, this translates to the following acpi_walk_namespace() call:
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, nv_acpi_find_methods, NULL, NULL, NULL);
Since both the context and return_value arguments are NULL, the current and the fixed versions of NV_ACPI_WALK_NAMESPACE() expand to the same call.


All times are GMT -5. The time now is 02:36 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.