[arch-commits] Commit in nvidia-173xx/trunk (2.6.28.patch)

Tobias Powalowski tpowa at archlinux.org
Sat Dec 27 09:04:42 UTC 2008


    Date: Saturday, December 27, 2008 @ 04:04:42
  Author: tpowa
Revision: 22539

'added missing patch'

Added:
  nvidia-173xx/trunk/2.6.28.patch

--------------+
 2.6.28.patch |  131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 131 insertions(+)

Added: 2.6.28.patch
===================================================================
--- 2.6.28.patch	                        (rev 0)
+++ 2.6.28.patch	2008-12-27 09:04:42 UTC (rev 22539)
@@ -0,0 +1,131 @@
+diff -ru usr/src/nv/conftest.sh usr/src/nv.2990799/conftest.sh
+--- usr/src/nv/conftest.sh	2008-10-01 15:13:04.000000000 -0700
++++ usr/src/nv.2990799/conftest.sh	2008-10-27 10:45:57.710065030 -0700
+@@ -67,6 +67,8 @@
+ }
+ 
+ build_cflags() {
++    ARCH=`uname -m | sed -e 's/i.86/i386/'`
++
+     BASE_CFLAGS="-D__KERNEL__ \
+ -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
+ -nostdinc -isystem $ISYSTEM"
+@@ -80,16 +82,20 @@
+     test_xen
+ 
+     if [ "$OUTPUT" != "$SOURCES" ]; then
+-        ARCH=`uname -m | sed -e 's/i.86/i386/'`
+         MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default"
+         if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
+             MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
++            MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
+         fi
+         if [ "$XEN_PRESENT" != "0" ]; then
+             MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-xen $MACH_CFLAGS"
+         fi
+     else
+         MACH_CFLAGS="-I$HEADERS/asm/mach-default"
++        if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++            MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
++            MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
++        fi
+         if [ "$XEN_PRESENT" != "0" ]; then
+             MACH_CFLAGS="-I$HEADERS/asm/mach-xen $MACH_CFLAGS"
+         fi
+@@ -97,6 +103,9 @@
+ 
+     CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS"
+ 
++    if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++        CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
++    fi
+     if [ -n "$BUILD_PARAMS" ]; then
+         CFLAGS="$CFLAGS -D$BUILD_PARAMS"
+     fi
+@@ -897,6 +906,57 @@
+             fi
+         ;;
+ 
++        acpi_evaluate_integer)
++            #
++            # Determine if the acpi_evaluate_integer() function is
++            # present and the type of its 'data' argument.
++            #
++
++            echo "$CONFTEST_PREAMBLE
++            #include <acpi/acpi_bus.h>
++            acpi_status acpi_evaluate_integer(acpi_handle h, acpi_string s,
++                struct acpi_object_list *l, unsigned long long *d) {
++                return AE_OK;
++            }" > conftest$$.c
++
++            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++            rm -f conftest$$.c
++
++            if [ -f conftest$$.o ]; then
++                rm -f conftest$$.o
++                echo "#define NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h
++                echo "typedef unsigned long long nv_acpi_integer_t;" >> conftest.h
++                return
++            fi
++
++            echo "$CONFTEST_PREAMBLE
++            #include <acpi/acpi_bus.h>
++            acpi_status acpi_evaluate_integer(acpi_handle h, acpi_string s,
++                struct acpi_object_list *l, unsigned long *d) {
++                return AE_OK;
++            }" > conftest$$.c
++
++            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++            rm -f conftest$$.c
++
++            if [ -f conftest$$.o ]; then
++                rm -f conftest$$.o
++                echo "#define NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h
++                echo "typedef unsigned long nv_acpi_integer_t;" >> conftest.h
++                return
++            else
++                #
++                # We can't report a compile test failure here because
++                # this is a catch-all for both kernels that don't
++                # have acpi_evaluate_integer() and kernels that have
++                # broken header files that make it impossible to
++                # tell if the function is present.
++                #
++                echo "#undef NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h
++                echo "typedef unsigned long nv_acpi_integer_t;" >> conftest.h
++            fi
++        ;;
++
+     esac
+ }
+ 
+diff -ru usr/src/nv/nvacpi.c usr/src/nv.2990799/nvacpi.c
+--- usr/src/nv/nvacpi.c	2008-10-01 15:13:04.000000000 -0700
++++ usr/src/nv.2990799/nvacpi.c	2008-10-27 10:46:05.710520948 -0700
+@@ -158,11 +158,9 @@
+ 
+     os_mem_set((void *)pNvAcpiObject, 0, sizeof(nv_acpi_t));
+ 
+-    // assign driver data structure ptr to this device
+-    acpi_driver_data(device) = pNvAcpiObject;
+-
+-    // store a device reference in our object
++    device->driver_data = pNvAcpiObject;
+     pNvAcpiObject->device = device;
++
+     pNvAcpiObject->sp = sp;
+ 
+     // grab handles to all the important nodes representing devices
+--- usr/src/nv/Makefile.nvidia~	2008-12-27 09:37:36.000000000 +0100
++++ usr/src/nv/Makefile.nvidia	2008-12-27 09:37:36.000000000 +0100
+@@ -62,7 +62,8 @@
+ 	remap_page_range \
+ 	vmap \
+ 	change_page_attr \
+-	i2c_adapter
++	i2c_adapter \
++	acpi_evaluate_integer
+ 
+ DEFINES+=$(EXTRA_DEFINES)
+ 




More information about the arch-commits mailing list