Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 238969
Collapse All | Expand All

(-)usr/src/nv/Makefile.kbuild (-2 / +4 lines)
Lines 189-202 Link Here
189
	acquire_console_sem \
189
	acquire_console_sem \
190
	kmem_cache_create \
190
	kmem_cache_create \
191
	on_each_cpu \
191
	on_each_cpu \
192
	smp_call_function
192
	smp_call_function \
193
 	acpi_evaluate_integer
193
else
194
else
194
 COMPILE_TESTS = \
195
 COMPILE_TESTS = \
195
	remap_page_range \
196
	remap_page_range \
196
	vmap \
197
	vmap \
197
	change_page_attr \
198
	change_page_attr \
198
	i2c_adapter \
199
	i2c_adapter \
199
	smp_call_function
200
	smp_call_function \
201
 	acpi_evaluate_integer
200
endif
202
endif
201
203
202
#
204
#
(-)usr/src/nv/Makefile.nvidia (-1 / +2 lines)
Lines 63-69 Link Here
63
	vmap \
63
	vmap \
64
	change_page_attr \
64
	change_page_attr \
65
	i2c_adapter \
65
	i2c_adapter \
66
	smp_call_function
66
	smp_call_function \
67
	acpi_evaluate_integer
67
68
68
DEFINES+=$(EXTRA_DEFINES)
69
DEFINES+=$(EXTRA_DEFINES)
69
70
(-)usr/src/nv/conftest.sh (-2 / +62 lines)
Lines 67-72 Link Here
67
}
67
}
68
68
69
build_cflags() {
69
build_cflags() {
70
    ARCH=`uname -m | sed -e 's/i.86/i386/'`
71
70
    BASE_CFLAGS="-D__KERNEL__ \
72
    BASE_CFLAGS="-D__KERNEL__ \
71
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
73
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
72
-nostdinc -isystem $ISYSTEM"
74
-nostdinc -isystem $ISYSTEM"
Lines 80-95 Link Here
80
    test_xen
82
    test_xen
81
83
82
    if [ "$OUTPUT" != "$SOURCES" ]; then
84
    if [ "$OUTPUT" != "$SOURCES" ]; then
83
        ARCH=`uname -m | sed -e 's/i.86/i386/'`
84
        MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default"
85
        MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default"
85
        if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
86
        if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
86
            MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
87
            MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
88
            MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
87
        fi
89
        fi
88
        if [ "$XEN_PRESENT" != "0" ]; then
90
        if [ "$XEN_PRESENT" != "0" ]; then
89
            MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-xen $MACH_CFLAGS"
91
            MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-xen $MACH_CFLAGS"
90
        fi
92
        fi
91
    else
93
    else
92
        MACH_CFLAGS="-I$HEADERS/asm/mach-default"
94
        MACH_CFLAGS="-I$HEADERS/asm/mach-default"
95
        if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
96
            MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
97
            MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
98
        fi
93
        if [ "$XEN_PRESENT" != "0" ]; then
99
        if [ "$XEN_PRESENT" != "0" ]; then
94
            MACH_CFLAGS="-I$HEADERS/asm/mach-xen $MACH_CFLAGS"
100
            MACH_CFLAGS="-I$HEADERS/asm/mach-xen $MACH_CFLAGS"
95
        fi
101
        fi
Lines 97-102 Link Here
97
103
98
    CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS"
104
    CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS"
99
105
106
    if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
107
        CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
108
    fi
100
    if [ -n "$BUILD_PARAMS" ]; then
109
    if [ -n "$BUILD_PARAMS" ]; then
101
        CFLAGS="$CFLAGS -D$BUILD_PARAMS"
110
        CFLAGS="$CFLAGS -D$BUILD_PARAMS"
102
    fi
111
    fi
Lines 858-864 Link Here
858
867
859
            if [ -f conftest$$.o ]; then
868
            if [ -f conftest$$.o ]; then
860
                rm -f conftest$$.o
869
                rm -f conftest$$.o
861
                echo "#undef NV_ON_EACH_CPU" >> conftest.h
870
                echo "#undef NV_ON_EACH_CPU_PRESENT" >> conftest.h
862
                return
871
                return
863
            fi
872
            fi
864
873
Lines 897-902 Link Here
897
            fi
906
            fi
898
        ;;
907
        ;;
899
908
909
        acpi_evaluate_integer)
910
            #
911
            # Determine if the acpi_evaluate_integer() function is
912
            # present and the type of its 'data' argument.
913
            #
914
915
            echo "$CONFTEST_PREAMBLE
916
            #include <acpi/acpi_bus.h>
917
            acpi_status acpi_evaluate_integer(acpi_handle h, acpi_string s,
918
                struct acpi_object_list *l, unsigned long long *d) {
919
                return AE_OK;
920
            }" > conftest$$.c
921
922
            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
923
            rm -f conftest$$.c
924
925
            if [ -f conftest$$.o ]; then
926
                rm -f conftest$$.o
927
                echo "#define NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h
928
                echo "typedef unsigned long long nv_acpi_integer_t;" >> conftest.h
929
                return
930
            fi
931
932
            echo "$CONFTEST_PREAMBLE
933
            #include <acpi/acpi_bus.h>
934
            acpi_status acpi_evaluate_integer(acpi_handle h, acpi_string s,
935
                struct acpi_object_list *l, unsigned long *d) {
936
                return AE_OK;
937
            }" > conftest$$.c
938
939
            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
940
            rm -f conftest$$.c
941
942
            if [ -f conftest$$.o ]; then
943
                rm -f conftest$$.o
944
                echo "#define NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h
945
                echo "typedef unsigned long nv_acpi_integer_t;" >> conftest.h
946
                return
947
            else
948
                #
949
                # We can't report a compile test failure here because
950
                # this is a catch-all for both kernels that don't
951
                # have acpi_evaluate_integer() and kernels that have
952
                # broken header files that make it impossible to
953
                # tell if the function is present.
954
                #
955
                echo "#undef NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h
956
                echo "typedef unsigned long nv_acpi_integer_t;" >> conftest.h
957
            fi
958
        ;;
959
900
    esac
960
    esac
901
}
961
}
902
962
(-)usr/src/nv/nvacpi.c (-6 / +4 lines)
Lines 136-142 Link Here
136
    struct acpi_object_list control_argument_list = { 0, NULL };
136
    struct acpi_object_list control_argument_list = { 0, NULL };
137
    nv_stack_t *sp = NULL;
137
    nv_stack_t *sp = NULL;
138
    struct list_head *node, *next;
138
    struct list_head *node, *next;
139
    unsigned long device_id = 0;
139
    nv_acpi_integer_t device_id = 0;
140
140
141
    NV_KMEM_CACHE_ALLOC_STACK(sp);
141
    NV_KMEM_CACHE_ALLOC_STACK(sp);
142
    if (sp == NULL)
142
    if (sp == NULL)
Lines 157-167 Link Here
157
157
158
    os_mem_set((void *)pNvAcpiObject, 0, sizeof(nv_acpi_t));
158
    os_mem_set((void *)pNvAcpiObject, 0, sizeof(nv_acpi_t));
159
159
160
    // assign driver data structure ptr to this device
160
    device->driver_data = pNvAcpiObject;
161
    acpi_driver_data(device) = pNvAcpiObject;
162
163
    // store a device reference in our object
164
    pNvAcpiObject->device = device;
161
    pNvAcpiObject->device = device;
162
165
    pNvAcpiObject->sp = sp;
163
    pNvAcpiObject->sp = sp;
166
164
167
    // grab handles to all the important nodes representing devices
165
    // grab handles to all the important nodes representing devices
Lines 305-311 Link Here
305
     */
303
     */
306
    nv_acpi_t *pNvAcpiObject = data;
304
    nv_acpi_t *pNvAcpiObject = data;
307
    u32 event_val = 0;
305
    u32 event_val = 0;
308
    unsigned long state;
306
    nv_acpi_integer_t state;
309
    int status = 0;
307
    int status = 0;
310
308
311
309

Return to bug 238969