All of lore.kernel.org
 help / color / mirror / Atom feed
* ioctl definition - has it changed recently?
@ 2010-08-14 20:53 Piotr Hosowicz
  2010-08-14 21:00 ` Sam Ravnborg
  2010-08-14 21:02 ` Piotr Hosowicz
  0 siblings, 2 replies; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-14 20:53 UTC (permalink / raw)
  To: LKML

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

Hello,

I build new kernels when they become available. Now I have a problem. 
After I install new kernel I have to run NVidia setup script. Starting 
from git15 it fails, see attached file. The error line is here:

    /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c: At top level:
    /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: error: 
unknown field ‘ioctl’ specified in initializer
    /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: warning: 
initialization from incompatible pointer type

In git14 everything was OK, but now it is not, also with the Git synced 
kernel. Has something changed from git14 times? I hope that it changed 
in Linux because it will be fixed earlier than NVidia source.

My graphic card is 01:00.0 VGA compatible controller: nVidia Corporation 
G96 [GeForce 9400 GT] (rev a1)

Regards,

Piotr Hosowicz

-- 
Muller wiedział, że Rosjanie, zamieszawszy cukier, zostawiają łyżkę w
szklance z herbatą. Chcąc sprawdzić Stirlitza, zaprosił go do siebie
na herbatę. Stirlitz wsypał cukier do szklanki, zamieszał go, wyjął
łyżeczkę, położył ją na spodeczku, po czym pokazał Mullerowi język.
NP: Peter Green Splinter Group - There's A River
NB: 2.6.35-git14

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nvidia-installer.log --]
[-- Type: text/x-log; name="nvidia-installer.log", Size: 8358 bytes --]

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Sat Aug 14 18:57:00 2010
installer version: 256.35

option status:
  license pre-accepted    : false
  update                  : false
  force update            : false
  expert                  : true
  uninstall               : false
  driver info             : false
  precompiled interfaces  : true
  no ncurses color        : false
  query latest version    : false
  OpenGL header files     : true
  no questions            : false
  silent                  : false
  no recursion            : false
  no backup               : false
  kernel module only      : false
  sanity                  : false
  add this kernel         : false
  no runlevel check       : false
  no network              : false
  no ABI note             : false
  no RPMs                 : false
  no kernel module        : false
  force SELinux           : default
  no X server check       : false
  no cc version check     : false
  force tls               : (not specified)
  force compat32 tls      : (not specified)
  X install prefix        : (not specified)
  X library install path  : (not specified)
  X module install path   : (not specified)
  OpenGL install prefix   : (not specified)
  OpenGL install libdir   : (not specified)
  compat32 install chroot : (not specified)
  compat32 install prefix : (not specified)
  compat32 install libdir : (not specified)
  utility install prefix  : (not specified)
  utility install libdir  : (not specified)
  doc install prefix      : (not specified)
  kernel name             : (not specified)
  kernel include path     : (not specified)
  kernel source path      : /usr/src/linux-2.6.35-git15
  kernel output path      : (not specified)
  kernel install path     : (not specified)
  proc mount point        : /proc
  ui                      : (not specified)
  tmpdir                  : /tmp
  ftp mirror              : ftp://download.nvidia.com
  RPM file list           : (not specified)

chdir("./")
Using: nvidia-installer ncurses user interface
-> Searching for system utilities:
-> found `ldconfig` : `/sbin/ldconfig`
-> found `ldd` : `/usr/bin/ldd`
-> found `ld` : `/usr/bin/ld`
-> found `objcopy` : `/usr/bin/objcopy`
-> found `grep` : `/bin/grep`
-> found `dmesg` : `/bin/dmesg`
-> found `tail` : `/usr/bin/tail`
-> found `cut` : `/usr/bin/cut`
-> found `tr` : `/usr/bin/tr`
-> found `sed` : `/bin/sed`
-> found `chcon` : `/usr/bin/chcon`
-> found `pkg-config` : `/usr/bin/pkg-config`
-> found `X` : `/usr/bin/X`
-> Searching for module utilities:
-> found `insmod` : `/sbin/insmod`
-> found `modprobe` : `/sbin/modprobe`
-> found `rmmod` : `/sbin/rmmod`
-> found `lsmod` : `/sbin/lsmod`
-> found `depmod` : `/sbin/depmod`
-> License accepted.
-> Installing NVIDIA driver version 256.35.
-> There appears to already be a driver installed on your system (version: 256.
   35).  As part of installing this driver (version: 256.35), the existing driv
   er will be uninstalled.  Are you sure you want to continue? ('no' will abort
   installation) (Answer: Yes)
-> No distribution pre-install script found.
-> Kernel module installation path (Answer:
   '/lib/modules/2.6.35-git15/kernel/drivers/video')
-> Kernel module installation path: /lib/modules/2.6.35-git15/kernel/drivers/vi
   deo
-> No precompiled kernel interface was found to match your kernel; this means
   that the installer will need to compile a new kernel interface.
-> Checking development tools:
-> found `cc` : `/usr/bin/cc`
-> found `make` : `/usr/bin/make`
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> Using the kernel source path '/usr/src/linux-2.6.35-git15' as specified by
   the '--kernel-source-path' commandline option.
-> Kernel source path (Answer: '/usr/src/linux-2.6.35-git15')
-> Kernel source path: '/usr/src/linux-2.6.35-git15'
-> Kernel output path: '/usr/src/linux-2.6.35-git15'
-> Performing rivafb check.
-> Performing nvidiafb check.
-> Performing Xen check.
-> Cleaning kernel module build directory.
   executing: 'cd ./kernel; make clean'...
-> Building kernel module:
   executing: 'cd ./kernel; make module SYSSRC=/usr/src/linux-2.6.35-git15 SYSO
   UT=/usr/src/linux-2.6.35-git15'...
   NVIDIA: calling KBUILD...
   test -e include/generated/autoconf.h -a -e include/config/auto.conf || (		\
   	echo;								\
   	echo "  ERROR: Kernel configuration is invalid.";		\
   	echo "         include/generated/autoconf.h or include/config/auto.conf are
   missing.";\
   	echo "         Run 'make oldconfig && make prepare' on kernel src to fix it
   .";	\
   	echo;								\
   	/bin/false)
   mkdir -p /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/.tmp_versions ; r
   m -f /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/.tmp_versions/*
   make -f scripts/Makefile.build obj=/tmp/selfgz6622/NVIDIA-Linux-x86_64-256.3
   5/kernel
     cc -Wp,-MD,/tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/.nv.o.d  -nos
   tdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.4.5/include -I/usr/src/linux-
   2.6.35-git15/arch/x86/include -Iinclude  -include include/generated/autoconf
   .h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict
   -aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-secu
   rity -fno-delete-null-pointer-checks -O
   s -m64 -march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumul
   ate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL
   _FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronou
   s-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2
   048 -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-aft
   er-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -I/tmp/
   selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel -Wall -MD -Wsign-compare -Wno-c
   ast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"256.3
   5\" -mcmodel=kernel -mno-red-zone -UDEBUG -U_DEBUG -DNDEBUG  -DMODULE  -D"KB
   UILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)"  -D"KBUILD_MODNAME=KBUILD
   _STR(nvidia)" -D"DEBUG_HASH=29" -D"DEBUG_HASH2=36" -c -o /tmp/selfgz6622/NVI
   DIA-Linux-x86_64-256.35/kernel/.tmp_nv.o /tmp/selfgz6622/NVIDIA-Linux-x86_64
   -256.35/kernel/nv.c
   In file included from include/linux/kernel.h:17,
                    from include/linux/sched.h:54,
                    from include/linux/utsname.h:35,
                    from /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv-l
   inux.h:27,
                    from /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c
   :13:
   include/linux/bitops.h: In function ‘hweight_long’:
   include/linux/bitops.h:49: warning: signed and unsigned type in conditional 
   expression
   In file included from /usr/src/linux-2.6.35-git15/arch/x86/include/asm/uacce
   ss.h:573,
                    from include/linux/poll.h:14,
                    from /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv-l
   inux.h:84,
                    from /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c
   :13:
   /usr/src/linux-2.6.35-git15/arch/x86/include/asm/uaccess_64.h: In function â
   €˜copy_from_user’:
   /usr/src/linux-2.6.35-git15/arch/x86/include/asm/uaccess_64.h:54: warning: c
   omparison between signed and unsigned integer expressions
   /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c: At top level:
   /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: error: unknown f
   ield ‘ioctl’ specified in initializer
   /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: warning: initial
   ization from incompatible pointer type
   make[3]: *** [/tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.o] BÅ‚Ä…d
   1
   make[2]: *** [_module_/tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel] BÅ‚
   Ä…d 2
   NVIDIA: left KBUILD.
   nvidia.ko failed to build!
   make[1]: *** [module] BÅ‚Ä…d 1
   make: *** [module] BÅ‚Ä…d 2
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed.  Please see the file
       '/var/log/nvidia-installer.log' for details.  You may find suggestions
       on fixing installation problems in the README available on the Linux
       driver download page at www.nvidia.com.
-> No distribution failed-install script found.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-14 20:53 ioctl definition - has it changed recently? Piotr Hosowicz
@ 2010-08-14 21:00 ` Sam Ravnborg
  2010-08-14 22:10   ` Piotr Hosowicz
  2010-08-14 21:02 ` Piotr Hosowicz
  1 sibling, 1 reply; 16+ messages in thread
From: Sam Ravnborg @ 2010-08-14 21:00 UTC (permalink / raw)
  To: Piotr Hosowicz; +Cc: LKML

On Sat, Aug 14, 2010 at 10:53:17PM +0200, Piotr Hosowicz wrote:
> Hello,
>
> I build new kernels when they become available. Now I have a problem.  
> After I install new kernel I have to run NVidia setup script. Starting  
> from git15 it fails, see attached file. The error line is here:
>
>    /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c: At top level:
>    /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: error:  
> unknown field ‘ioctl’ specified in initializer
>    /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: warning:  
> initialization from incompatible pointer type

The likely culprint is:
b19dd42faf413b4705d4adb38521e82d73fa4249
(bkl: Remove locked .ioctl file operation)

This commit finally killed ioctl from file_operations, as part of the
bkl removal project.


	Sam

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-14 20:53 ioctl definition - has it changed recently? Piotr Hosowicz
  2010-08-14 21:00 ` Sam Ravnborg
@ 2010-08-14 21:02 ` Piotr Hosowicz
       [not found]   ` <20100814212007.GA26128@nuttenaction>
  2010-08-15 14:22   ` Piotr Hosowicz
  1 sibling, 2 replies; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-14 21:02 UTC (permalink / raw)
  To: LKML

On 14.08.2010 22:53, Piotr Hosowicz wrote:
> Hello,
>
> I build new kernels when they become available. Now I have a problem.
> After I install new kernel I have to run NVidia setup script. Starting
> from git15 it fails, see attached file. The error line is here:
>
> /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c: At top level:
> /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: error:
> unknown field ‘ioctl’ specified in initializer
> /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: warning:
> initialization from incompatible pointer type
>
> In git14 everything was OK, but now it is not, also with the Git synced
> kernel. Has something changed from git14 times? I hope that it changed
> in Linux because it will be fixed earlier than NVidia source.
>
> My graphic card is 01:00.0 VGA compatible controller: nVidia Corporation
> G96 [GeForce 9400 GT] (rev a1)


The latest driver is here:

ftp://download.nvidia.com/XFree86/Linux-x86_64/256.44/

To unpack execute it with --extract-only option.

Regards,

Piotr Hosowicz

-- 
Na przyjęciu chłopak pyta blondynkę:
- Czy mogę cię prosić do walca?
- Zgłupiałeś? To już nie miałeś czym przyjechać?
NP: Peter Green Splinter Group - I Can't Help Myself
NB: 2.6.35-git14

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-14 21:00 ` Sam Ravnborg
@ 2010-08-14 22:10   ` Piotr Hosowicz
  2010-08-16  6:58     ` Arnd Bergmann
  0 siblings, 1 reply; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-14 22:10 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: LKML

On 14.08.2010 23:00, Sam Ravnborg wrote:
> On Sat, Aug 14, 2010 at 10:53:17PM +0200, Piotr Hosowicz wrote:
>> Hello,
>>
>> I build new kernels when they become available. Now I have a problem.
>> After I install new kernel I have to run NVidia setup script. Starting
>> from git15 it fails, see attached file. The error line is here:
>>
>>     /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c: At top level:
>>     /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: error:
>> unknown field ‘ioctl’ specified in initializer
>>     /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: warning:
>> initialization from incompatible pointer type
>
> The likely culprint is:
> b19dd42faf413b4705d4adb38521e82d73fa4249
> (bkl: Remove locked .ioctl file operation)
>
> This commit finally killed ioctl from file_operations, as part of the
> bkl removal project.

Yes, this was it. I made git pull and git revert and now I am up and 
kicking. But how will I manage with it not by git but by kernel org 
provioded files? And even if I used git all the time will I have to 
revert it each time and what's the worse I will become more and more out 
of sync because people will write their code as if I did not revert.

Thanks for your help. Regards,

Piotr Hosowicz

-- 
- Jaka jest największa anomalia fizjologiczno-polityczna?
- Członek wysunięty z ramienia na czoło.
NP: Peter Green Splinter Group - Big Change Is Gonna Come
NB: 2.6.35-20100814-2310+

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
       [not found]   ` <20100814212007.GA26128@nuttenaction>
@ 2010-08-15  8:24     ` Piotr Hosowicz
  2010-08-15 11:57     ` Piotr Hosowicz
  1 sibling, 0 replies; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-15  8:24 UTC (permalink / raw)
  To: Hagen Paul Pfeifer; +Cc: LKML

On 14.08.2010 23:20, Hagen Paul Pfeifer wrote:
> * Piotr Hosowicz | 2010-08-14 23:02:48 [+0200]:
>
>> The latest driver is here:
>>
>> ftp://download.nvidia.com/XFree86/Linux-x86_64/256.44/
>>
>> To unpack execute it with --extract-only option.
>
> remove line 426 of kernel/nv.c:
>
>      .ioctl     = nv_kern_ioctl,
>
>
> ... and try again. ;)

Sorry, I was wrong when I wrote yesterday. I tried again and it works. 
Thank you a lot. It will be my standard way to deal with this.

Cheers,

Piotr Hosowicz

-- 
Skarga z 1983 roku: Zamiast 3 kg cukru ekspedientka sprzedała
mi 3 kg mrówek faraona (podpis nieczytelny). Dopisek kierowni-
czki: Klient był w stanie nietrzeźwym.
NP: Peter Green Splinter Group - Big Change Is Gonna Come
NB: 2.6.35-git16

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
       [not found]   ` <20100814212007.GA26128@nuttenaction>
  2010-08-15  8:24     ` Piotr Hosowicz
@ 2010-08-15 11:57     ` Piotr Hosowicz
  1 sibling, 0 replies; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-15 11:57 UTC (permalink / raw)
  To: Hagen Paul Pfeifer; +Cc: LKML

I resend, I dont know why it didn't appear on LKML. Thanks.

Piotr Hosowicz

On 14.08.2010 23:20, Hagen Paul Pfeifer wrote:
> * Piotr Hosowicz | 2010-08-14 23:02:48 [+0200]:
>
>> The latest driver is here:
>>
>> ftp://download.nvidia.com/XFree86/Linux-x86_64/256.44/
>>
>> To unpack execute it with --extract-only option.
>
> remove line 426 of kernel/nv.c:
>
>      .ioctl     = nv_kern_ioctl,
>
>
> ... and try again. ;)

Sorry, I was wrong when I wrote yesterday. I tried again and it works. 
Thank you a lot. It will be my standard way to deal with this.

Cheers,

Piotr Hosowicz

-- 
Skarga z 1983 roku: Zamiast 3 kg cukru ekspedientka sprzedała
mi 3 kg mrówek faraona (podpis nieczytelny). Dopisek kierowni-
czki: Klient był w stanie nietrzeźwym.
NP: Peter Green Splinter Group - Big Change Is Gonna Come
NB: 2.6.35-git16

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-14 21:02 ` Piotr Hosowicz
       [not found]   ` <20100814212007.GA26128@nuttenaction>
@ 2010-08-15 14:22   ` Piotr Hosowicz
  1 sibling, 0 replies; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-15 14:22 UTC (permalink / raw)
  To: LKML

On 14.08.2010 23:02, Piotr Hosowicz wrote:
> On 14.08.2010 22:53, Piotr Hosowicz wrote:
>> Hello,
>>
>> I build new kernels when they become available. Now I have a problem.
>> After I install new kernel I have to run NVidia setup script. Starting
>> from git15 it fails, see attached file. The error line is here:
>>
>> /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c: At top level:
>> /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: error:
>> unknown field ‘ioctl’ specified in initializer
>> /tmp/selfgz6622/NVIDIA-Linux-x86_64-256.35/kernel/nv.c:426: warning:
>> initialization from incompatible pointer type
>>
>> In git14 everything was OK, but now it is not, also with the Git synced
>> kernel. Has something changed from git14 times? I hope that it changed
>> in Linux because it will be fixed earlier than NVidia source.
>>
>> My graphic card is 01:00.0 VGA compatible controller: nVidia Corporation
>> G96 [GeForce 9400 GT] (rev a1)
>
>
> The latest driver is here:
>
> ftp://download.nvidia.com/XFree86/Linux-x86_64/256.44/
>
> To unpack execute it with --extract-only option.

http://phosowicz.jogger.pl/2010/08/15/nvidia-graphics-in-fresh-kernels/

Regards,

Piotr Hosowicz

-- 
TV: "Gruchała jest taka, że cieszy się z każdego pchnięcia."
NP: Van Halen - Cabo Wabo/You Really Got Me
NB: 2.6.35-git16

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-14 22:10   ` Piotr Hosowicz
@ 2010-08-16  6:58     ` Arnd Bergmann
  2010-08-16  7:11       ` Piotr Hosowicz
  0 siblings, 1 reply; 16+ messages in thread
From: Arnd Bergmann @ 2010-08-16  6:58 UTC (permalink / raw)
  To: piotr; +Cc: Sam Ravnborg, LKML

On Sunday 15 August 2010 00:10:29 Piotr Hosowicz wrote:
> Yes, this was it. I made git pull and git revert and now I am up and 
> kicking. But how will I manage with it not by git but by kernel org 
> provioded files? And even if I used git all the time will I have to 
> revert it each time and what's the worse I will become more and more out 
> of sync because people will write their code as if I did not revert.

Just fix your driver code to no longer rely on the big kernel lock
and then make it use the unlocked_ioctl operation.

	Arnd

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-16  6:58     ` Arnd Bergmann
@ 2010-08-16  7:11       ` Piotr Hosowicz
  2010-08-16  7:17         ` Arnd Bergmann
  0 siblings, 1 reply; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-16  7:11 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Sam Ravnborg, LKML

On 16.08.2010 08:58, Arnd Bergmann wrote:
> On Sunday 15 August 2010 00:10:29 Piotr Hosowicz wrote:
>> Yes, this was it. I made git pull and git revert and now I am up and
>> kicking. But how will I manage with it not by git but by kernel org
>> provioded files? And even if I used git all the time will I have to
>> revert it each time and what's the worse I will become more and more out
>> of sync because people will write their code as if I did not revert.
>
> Just fix your driver code to no longer rely on the big kernel lock

Now I know how to do it.

> and then make it use the unlocked_ioctl operation.

This I do not know. Can You help me?

Regards,

Piotr Hosowicz

-- 
"[Oleksy] dotknął naszych domów, naszych żon, naszych dzieci,
naszych psów, naszych ŚWINEK MORSKICH, on po prostu wkroczył
swoim głupim gadaniem w sferę prywatną, która musi być chro-
niona dla dobra każdego z nas" - powiedział Kwaśniewski.
NP: Patrick O'Hearn - Night Becomes Her
NB: 2.6.35-git16

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-16  7:11       ` Piotr Hosowicz
@ 2010-08-16  7:17         ` Arnd Bergmann
  2010-08-16  7:59           ` Piotr Hosowicz
  0 siblings, 1 reply; 16+ messages in thread
From: Arnd Bergmann @ 2010-08-16  7:17 UTC (permalink / raw)
  To: piotr; +Cc: Sam Ravnborg, LKML

On Monday 16 August 2010 09:11:33 Piotr Hosowicz wrote:
> > and then make it use the unlocked_ioctl operation.
> 
> This I do not know. Can You help me?
> 

Just take a look at all the other patches that went into the
kernel to do this for other drivers. You only really
need to change the line with .ioctl=... to .unlocked_ioctl=
and change the prototype of the referenced function to

static long foo_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

	Arnd

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-16  7:17         ` Arnd Bergmann
@ 2010-08-16  7:59           ` Piotr Hosowicz
  2010-08-17 13:11             ` Piotr Hosowicz
  0 siblings, 1 reply; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-16  7:59 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Sam Ravnborg, LKML

On 16.08.2010 09:17, Arnd Bergmann wrote:
> On Monday 16 August 2010 09:11:33 Piotr Hosowicz wrote:
>>> and then make it use the unlocked_ioctl operation.
>>
>> This I do not know. Can You help me?
>>
>
> Just take a look at all the other patches that went into the
> kernel to do this for other drivers. You only really
> need to change the line with .ioctl=... to .unlocked_ioctl=
> and change the prototype of the referenced function to
>
> static long foo_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

int           nv_kern_ioctl(struct inode *, struct file *, unsigned int, 
unsigned long);

It seems different. How to change it? Now it works, I built it without 
your remarks, exactly how I described on my blog:

http://phosowicz.jogger.pl/2010/08/15/nvidia-graphics-in-fresh-kernels/

Regards,

Piotr Hosowicz

-- 
Polsat: oglądasz z rodzinką reklamy, a tu nagle - trach! - film!
NP: Patrick O'Hearn - Chance
NB: 2.6.36-rc1

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-16  7:59           ` Piotr Hosowicz
@ 2010-08-17 13:11             ` Piotr Hosowicz
  2010-08-17 13:18               ` Arnd Bergmann
  0 siblings, 1 reply; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-17 13:11 UTC (permalink / raw)
  To: piotr; +Cc: Arnd Bergmann, Sam Ravnborg, LKML

On 16.08.2010 09:59, Piotr Hosowicz wrote:
> On 16.08.2010 09:17, Arnd Bergmann wrote:
>> On Monday 16 August 2010 09:11:33 Piotr Hosowicz wrote:
>>>> and then make it use the unlocked_ioctl operation.
>>>
>>> This I do not know. Can You help me?
>>>
>>
>> Just take a look at all the other patches that went into the
>> kernel to do this for other drivers.

I do not know how to find them. :-(

 > You only really
>> need to change the line with .ioctl=... to .unlocked_ioctl=

Ok, this is simple.

>> and change the prototype of the referenced function to
>>
>> static long foo_ioctl(struct file *file, unsigned int cmd, unsigned
>> long arg)
>
> int nv_kern_ioctl(struct inode *, struct file *, unsigned int, unsigned
> long);
>
> It seems different. How to change it? Now it works, I built it without
> your remarks, exactly how I described on my blog:
>
> http://phosowicz.jogger.pl/2010/08/15/nvidia-graphics-in-fresh-kernels/

Ok, as I wrote the prototypes differ. What should I do with the inode 
parameter?

Regards,

Piotr Hosowicz

-- 
- Za moich czasów to w sklepach był tylko ocet i denaturat!
- Tato, przestań, że w całym Tesco był tylko ocet i denaturat!
NP:  -
NB: 2.6.36-rc1

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-17 13:11             ` Piotr Hosowicz
@ 2010-08-17 13:18               ` Arnd Bergmann
  2010-08-17 13:51                 ` Piotr Hosowicz
  0 siblings, 1 reply; 16+ messages in thread
From: Arnd Bergmann @ 2010-08-17 13:18 UTC (permalink / raw)
  To: piotr; +Cc: Sam Ravnborg, LKML

On Tuesday 17 August 2010, Piotr Hosowicz wrote:
> >> Just take a look at all the other patches that went into the
> >> kernel to do this for other drivers.
> 
> I do not know how to find them. :-(

git log -p -S"unlocked_ioctl"

> > It seems different. How to change it? Now it works, I built it without
> > your remarks, exactly how I described on my blog:
> >
> > http://phosowicz.jogger.pl/2010/08/15/nvidia-graphics-in-fresh-kernels/
> 
> Ok, as I wrote the prototypes differ. What should I do with the inode 
> parameter?

It's normally not needed.

If you do need it, use file->f_path.dentry->d_inode.

	Arnd

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-17 13:18               ` Arnd Bergmann
@ 2010-08-17 13:51                 ` Piotr Hosowicz
  2010-08-17 13:59                   ` Piotr Hosowicz
  0 siblings, 1 reply; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-17 13:51 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Sam Ravnborg, LKML

On 17.08.2010 15:18, Arnd Bergmann wrote:
> On Tuesday 17 August 2010, Piotr Hosowicz wrote:
>>>> Just take a look at all the other patches that went into the
>>>> kernel to do this for other drivers.
>>
>> I do not know how to find them. :-(
>
> git log -p -S"unlocked_ioctl"

Thanks a lot.

>>> It seems different. How to change it? Now it works, I built it without
>>> your remarks, exactly how I described on my blog:
>>>
>>> http://phosowicz.jogger.pl/2010/08/15/nvidia-graphics-in-fresh-kernels/
>>
>> Ok, as I wrote the prototypes differ. What should I do with the inode
>> parameter?
>
> It's normally not needed.

It seems so because the implementation nowwhere refers to the inode 
parameter. But I guess it won't be OK to just remove this parameter from 
the declaraion and the implemetation because some other NVidia code may 
refer to this parameter, pass it and so on. Potentially scrambling 
(spoiling) the parameter stack.

Regards,

Piotr Hosowicz

> If you do need it, use file->f_path.dentry->d_inode.

Ok, as I said - it is nowhere used. So this is not a problem.

Regards,

Piotr Hosowicz

-- 
Na przyjęciu chłopak pyta blondynkę:
- Czy mogę cię prosić do walca?
- Zgłupiałeś? To już nie miałeś czym przyjechać?
NP:  -
NB: 2.6.36-rc1

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-17 13:51                 ` Piotr Hosowicz
@ 2010-08-17 13:59                   ` Piotr Hosowicz
  2010-08-17 14:33                     ` Piotr Hosowicz
  0 siblings, 1 reply; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-17 13:59 UTC (permalink / raw)
  To: piotr; +Cc: Arnd Bergmann, Sam Ravnborg, LKML

On 17.08.2010 15:51, Piotr Hosowicz wrote:
> On 17.08.2010 15:18, Arnd Bergmann wrote:
>> On Tuesday 17 August 2010, Piotr Hosowicz wrote:
>>>>> Just take a look at all the other patches that went into the
>>>>> kernel to do this for other drivers.
>>>
>>> I do not know how to find them. :-(
>>
>> git log -p -S"unlocked_ioctl"
>
> Thanks a lot.
>
>>>> It seems different. How to change it? Now it works, I built it without
>>>> your remarks, exactly how I described on my blog:
>>>>
>>>> http://phosowicz.jogger.pl/2010/08/15/nvidia-graphics-in-fresh-kernels/
>>>
>>> Ok, as I wrote the prototypes differ. What should I do with the inode
>>> parameter?
>>
>> It's normally not needed.
>
> It seems so because the implementation nowwhere refers to the inode
> parameter. But I guess it won't be OK to just remove this parameter from
> the declaraion and the implemetation because some other NVidia code may
> refer to this parameter, pass it and so on. Potentially scrambling
> (spoiling) the parameter stack.

This is as I said, I just commented inode parameter and it wont build:

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c: At top level: 
 
 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:426: warning: 
initialization from incompatible pointer type 
 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c: In function 
‘nv_kern_unlocked_ioctl’: 
 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3062: warning: 
passing argument 1 of ‘nv_kern_ioctl’ from incompatible pointer type 
 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:2876: note: expected 
‘struct file *’ but argument is of type ‘struct inode *’ 
 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3062: warning: 
passing argument 2 of ‘nv_kern_ioctl’ makes integer from pointer without 
a cast 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:2876: note: expected 
‘unsigned int’ but argument is of type ‘struct file *’ 
 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3062: error: too 
many arguments to function ‘nv_kern_ioctl’ 
 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c: In function 
‘nv_kern_compat_ioctl’: 
 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3071: warning: 
passing argument 1 of ‘nv_kern_ioctl’ from incompatible pointer type 
 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:2876: note: expected 
‘struct file *’ but argument is of type ‘struct inode *’ 
 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3071: warning: 
passing argument 2 of ‘nv_kern_ioctl’ makes integer from pointer without 
a cast 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:2876: note: expected 
‘unsigned int’ but argument is of type ‘struct file *’ 
 

/root/nvidia/NVIDIA-Linux-x86_64-256.44/kernel/nv.c:3071: error: too 
many arguments to function ‘nv_kern_ioctl’

Regards,

Piotr Hosowicz

-- 
Zatrzymuje się samochód na sejmowym parkingu. Podchodzi do niego 
ochroniarz i mówi:
- Pan tu parkuje?! Tu Sejm ... Ministrowie, politycy, posłowiei ...
- Dzięki, włączę alarm.
NP:  -
NB: 2.6.36-rc1

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ioctl definition - has it changed recently?
  2010-08-17 13:59                   ` Piotr Hosowicz
@ 2010-08-17 14:33                     ` Piotr Hosowicz
  0 siblings, 0 replies; 16+ messages in thread
From: Piotr Hosowicz @ 2010-08-17 14:33 UTC (permalink / raw)
  To: piotr; +Cc: Arnd Bergmann, Sam Ravnborg, LKML

On 17.08.2010 15:59, Piotr Hosowicz wrote:
> On 17.08.2010 15:51, Piotr Hosowicz wrote:
>> On 17.08.2010 15:18, Arnd Bergmann wrote:
>>> On Tuesday 17 August 2010, Piotr Hosowicz wrote:
>>>>>> Just take a look at all the other patches that went into the
>>>>>> kernel to do this for other drivers.
>>>>
>>>> I do not know how to find them. :-(
>>>
>>> git log -p -S"unlocked_ioctl"
>>
>> Thanks a lot.
>>
>>>>> It seems different. How to change it? Now it works, I built it without
>>>>> your remarks, exactly how I described on my blog:
>>>>>
>>>>> http://phosowicz.jogger.pl/2010/08/15/nvidia-graphics-in-fresh-kernels/
>>>>>
>>>>
>>>> Ok, as I wrote the prototypes differ. What should I do with the inode
>>>> parameter?
>>>
>>> It's normally not needed.
>>
>> It seems so because the implementation nowwhere refers to the inode
>> parameter. But I guess it won't be OK to just remove this parameter from
>> the declaraion and the implemetation because some other NVidia code may
>> refer to this parameter, pass it and so on. Potentially scrambling
>> (spoiling) the parameter stack.
>
> This is as I said, I just commented inode parameter and it wont build:

I appeared when I examined the code that they prepared for this and :

#define HAVE_UNLOCKED_IOCTL 1

... in nv.c almost suffices. ;-) They defined this like that:

static struct file_operations nv_fops = {
     .owner     = THIS_MODULE,
     .poll      = nv_kern_poll,
     // .ioctl     = nv_kern_ioctl,
#if defined(HAVE_UNLOCKED_IOCTL)
     .unlocked_ioctl = nv_kern_unlocked_ioctl,
#endif
#if defined(NVCPU_X86_64) && defined(HAVE_COMPAT_IOCTL)
     .compat_ioctl = nv_kern_compat_ioctl,
#endif
#ifndef NV_USER_MAP
     .mmap      = nv_kern_mmap,
#endif /* NV_USER_MAP */
     .open      = nv_kern_open,
     .release   = nv_kern_close,
};

Regards and thanks,

Piotr Hosowicz


-- 
- Jaka jest największa anomalia fizjologiczno-polityczna?
- Członek wysunięty z ramienia na czoło.
NP: Dream Theater - Pull Me Under
NB: 2.6.36-rc1

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-08-17 14:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-14 20:53 ioctl definition - has it changed recently? Piotr Hosowicz
2010-08-14 21:00 ` Sam Ravnborg
2010-08-14 22:10   ` Piotr Hosowicz
2010-08-16  6:58     ` Arnd Bergmann
2010-08-16  7:11       ` Piotr Hosowicz
2010-08-16  7:17         ` Arnd Bergmann
2010-08-16  7:59           ` Piotr Hosowicz
2010-08-17 13:11             ` Piotr Hosowicz
2010-08-17 13:18               ` Arnd Bergmann
2010-08-17 13:51                 ` Piotr Hosowicz
2010-08-17 13:59                   ` Piotr Hosowicz
2010-08-17 14:33                     ` Piotr Hosowicz
2010-08-14 21:02 ` Piotr Hosowicz
     [not found]   ` <20100814212007.GA26128@nuttenaction>
2010-08-15  8:24     ` Piotr Hosowicz
2010-08-15 11:57     ` Piotr Hosowicz
2010-08-15 14:22   ` Piotr Hosowicz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.