* [parisc-linux] Pb with ioctl and 64bits
@ 2002-06-10 14:52 Bruno Vidal
2002-06-10 15:24 ` Randolph Chung
0 siblings, 1 reply; 5+ messages in thread
From: Bruno Vidal @ 2002-06-10 14:52 UTC (permalink / raw)
To: parisc-linux@lists.parisc-linux.org
[-- Attachment #1: Type: text/plain, Size: 998 bytes --]
Hi
I'm loosing my nerves. I'm stuck with it since two days, and I don't understand :-(
My ioctls are running fine with 32bits kernel. I thought I've done everything fine,
but when compiling it with 64 bits kernel it fail with:
sys32_ioctl: Unknown cmd fd(3) cmd(80047001) arg(00000803)
So my question is: what is the difference between 32bits and 64bits kernel about
the ioctls ?
I think that arch/parisc/kernel/ioctl32.c is used with 64bits and not with 32bits, right ?
If yes, what I need to do more than:
#if defined(CONFIG_DUMP) || defined(CONFIG_DUMP_MODULE)
COMPATIBLE_IOCTL(DIOSDUMPDEV);
COMPATIBLE_IOCTL(DIOGDUMPDEV);
COMPATIBLE_IOCTL(DIOSDUMPLEVEL);
COMPATIBLE_IOCTL(DIOGDUMPLEVEL);
COMPATIBLE_IOCTL(DIOSDUMPFLAGS);
COMPATIBLE_IOCTL(DIOGDUMPFLAGS);
COMPATIBLE_IOCTL(DIOSDUMPCOMPRESS);
COMPATIBLE_IOCTL(DIOGDUMPCOMPRESS);
COMPATIBLE_IOCTL(DIOGDINDEX);
#endif /* DUMP */
thanks.
--
Vidal Bruno, (770-4271)
SSD-HA Team, HP-UX & LINUX Support
bruno_vidal@admin.france.hp.com
[-- Attachment #2: Card for Bruno Vidal --]
[-- Type: text/x-vcard, Size: 386 bytes --]
begin:vcard
n:Bruno;VIDAL
tel;fax:01-69-82-60-14
tel;work:01-69-29-42-71
x-mozilla-html:TRUE
url:www.france.hp.com
org:Solution Center
version:2.1
email;internet:bruno_vidal@hp.com
title:Expert Logiciel Environnement Haute Disponibilité
adr;quoted-printable:;;HP France=0D=0A;Z.A de Courtaboeuf;1 Av. du Canada;91947 Les Ulis cedex;France
x-mozilla-cpt:;26208
fn:VIDAL Bruno
end:vcard
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [parisc-linux] Pb with ioctl and 64bits 2002-06-10 14:52 [parisc-linux] Pb with ioctl and 64bits Bruno Vidal @ 2002-06-10 15:24 ` Randolph Chung 2002-06-11 5:52 ` Bruno Vidal 0 siblings, 1 reply; 5+ messages in thread From: Randolph Chung @ 2002-06-10 15:24 UTC (permalink / raw) To: Bruno Vidal; +Cc: parisc-linux@lists.parisc-linux.org > I'm loosing my nerves. I'm stuck with it since two days, and I don't understand :-( > My ioctls are running fine with 32bits kernel. I thought I've done everything fine, > but when compiling it with 64 bits kernel it fail with: > sys32_ioctl: Unknown cmd fd(3) cmd(80047001) arg(00000803) > So my question is: what is the difference between 32bits and 64bits kernel about > the ioctls ? as you discovered, there's some translation that is needed for 64-bit kernels because userspace is always 32-bits. So when running a 64-bit kernel, some ioctls need to be translated via the logic in ioctl32.c. The situation is similar to sparc32/sparc64. > I think that arch/parisc/kernel/ioctl32.c is used with 64bits and not with 32bits, right ? yes. > If yes, what I need to do more than: > #if defined(CONFIG_DUMP) || defined(CONFIG_DUMP_MODULE) > COMPATIBLE_IOCTL(DIOSDUMPDEV); > COMPATIBLE_IOCTL(DIOGDUMPDEV); > COMPATIBLE_IOCTL(DIOSDUMPLEVEL); > COMPATIBLE_IOCTL(DIOGDUMPLEVEL); > COMPATIBLE_IOCTL(DIOSDUMPFLAGS); > COMPATIBLE_IOCTL(DIOGDUMPFLAGS); > COMPATIBLE_IOCTL(DIOSDUMPCOMPRESS); > COMPATIBLE_IOCTL(DIOGDUMPCOMPRESS); > COMPATIBLE_IOCTL(DIOGDINDEX); > #endif /* DUMP */ what are the ioctl definitions used by the dump driver? (the _IO{,R,W,RW} values). From the output you pasted: > sys32_ioctl: Unknown cmd fd(3) cmd(80047001) arg(00000803) that ioctl seems to be _IOW('p', 1, int) (or unsigned int or so)? randolph ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] Pb with ioctl and 64bits 2002-06-10 15:24 ` Randolph Chung @ 2002-06-11 5:52 ` Bruno Vidal 2002-06-11 11:40 ` Bruno Vidal 0 siblings, 1 reply; 5+ messages in thread From: Bruno Vidal @ 2002-06-11 5:52 UTC (permalink / raw) To: Randolph Chung; +Cc: parisc-linux@lists.parisc-linux.org [-- Attachment #1: Type: text/plain, Size: 2766 bytes --] Hi Yes, I've follow nearly the same than "PA_PERF_ON", "PA_PERF_OFF". I've used: #define DIOSDUMPDEV _IOW('p',1,unsigned long) /* set the dump device */ #define DIOGDUMPDEV _IOR('p',2,unsigned long) /* get the dump device */ #define DIOSDUMPLEVEL _IOW('p',3,unsigned long) /* set the dump level */ #define DIOGDUMPLEVEL _IOR('p',4,unsigned long) /* get the dump level */ #define DIOSDUMPFLAGS _IOW('p',5,unsigned long) /* set the dump flag parameters */ #define DIOGDUMPFLAGS _IOR('p',6,unsigned long) /* get the dump flag parameters */ #define DIOSDUMPCOMPRESS _IOW('p',7,unsigned long) /* set the dump compress level */ #define DIOGDUMPCOMPRESS _IOR('p',8,unsigned long) /* get the dump compress level */ #define DIOGDINDEX _IOR('p',9,unsigned long) /* get the number of configured device */ But I don't understand what's wrong, does I need to declare something else somewhere else ???? Randolph Chung wrote: > > > I'm loosing my nerves. I'm stuck with it since two days, and I don't understand :-( > > My ioctls are running fine with 32bits kernel. I thought I've done everything fine, > > but when compiling it with 64 bits kernel it fail with: > > sys32_ioctl: Unknown cmd fd(3) cmd(80047001) arg(00000803) > > So my question is: what is the difference between 32bits and 64bits kernel about > > the ioctls ? > > as you discovered, there's some translation that is needed for 64-bit > kernels because userspace is always 32-bits. So when running a 64-bit > kernel, some ioctls need to be translated via the logic in ioctl32.c. > The situation is similar to sparc32/sparc64. > > > I think that arch/parisc/kernel/ioctl32.c is used with 64bits and not with 32bits, right ? > > yes. > > > If yes, what I need to do more than: > > #if defined(CONFIG_DUMP) || defined(CONFIG_DUMP_MODULE) > > COMPATIBLE_IOCTL(DIOSDUMPDEV); > > COMPATIBLE_IOCTL(DIOGDUMPDEV); > > COMPATIBLE_IOCTL(DIOSDUMPLEVEL); > > COMPATIBLE_IOCTL(DIOGDUMPLEVEL); > > COMPATIBLE_IOCTL(DIOSDUMPFLAGS); > > COMPATIBLE_IOCTL(DIOGDUMPFLAGS); > > COMPATIBLE_IOCTL(DIOSDUMPCOMPRESS); > > COMPATIBLE_IOCTL(DIOGDUMPCOMPRESS); > > COMPATIBLE_IOCTL(DIOGDINDEX); > > #endif /* DUMP */ > > what are the ioctl definitions used by the dump driver? (the _IO{,R,W,RW} > values). From the output you pasted: > > > sys32_ioctl: Unknown cmd fd(3) cmd(80047001) arg(00000803) > > that ioctl seems to be _IOW('p', 1, int) (or unsigned int or so)? > > randolph -- Vidal Bruno, (770-4271) SSD-HA Team, HP-UX & LINUX Support bruno_vidal@admin.france.hp.com [-- Attachment #2: Card for Bruno Vidal --] [-- Type: text/x-vcard, Size: 386 bytes --] begin:vcard n:Bruno;VIDAL tel;fax:01-69-82-60-14 tel;work:01-69-29-42-71 x-mozilla-html:TRUE url:www.france.hp.com org:Solution Center version:2.1 email;internet:bruno_vidal@hp.com title:Expert Logiciel Environnement Haute Disponibilité adr;quoted-printable:;;HP France=0D=0A;Z.A de Courtaboeuf;1 Av. du Canada;91947 Les Ulis cedex;France x-mozilla-cpt:;26208 fn:VIDAL Bruno end:vcard ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] Pb with ioctl and 64bits 2002-06-11 5:52 ` Bruno Vidal @ 2002-06-11 11:40 ` Bruno Vidal 2002-06-11 21:47 ` Grant Grundler 0 siblings, 1 reply; 5+ messages in thread From: Bruno Vidal @ 2002-06-11 11:40 UTC (permalink / raw) To: Bruno Vidal; +Cc: Randolph Chung, parisc-linux@lists.parisc-linux.org [-- Attachment #1: Type: text/plain, Size: 458 bytes --] Haaaaa, I've succeded at the end. Now ioctls are working fine. Sorry, I beg your pardon, the probleme was coming from the manner I declare my ioctls cmds. With 64bits kernel it is: #define DIOSDUMPDEV32 _IOW('p',0xa0,unsigned int) And in user space it is (32 bits): #define DIOSDUMPDEV32 _IOW('p',0xa0,unsigned long) Thanks. -- Vidal Bruno, (770-4271) SSD-HA Team, HP-UX & LINUX Support bruno_vidal@admin.france.hp.com [-- Attachment #2: Card for Bruno Vidal --] [-- Type: text/x-vcard, Size: 386 bytes --] begin:vcard n:Bruno;VIDAL tel;fax:01-69-82-60-14 tel;work:01-69-29-42-71 x-mozilla-html:TRUE url:www.france.hp.com org:Solution Center version:2.1 email;internet:bruno_vidal@hp.com title:Expert Logiciel Environnement Haute Disponibilité adr;quoted-printable:;;HP France=0D=0A;Z.A de Courtaboeuf;1 Av. du Canada;91947 Les Ulis cedex;France x-mozilla-cpt:;26208 fn:VIDAL Bruno end:vcard ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] Pb with ioctl and 64bits 2002-06-11 11:40 ` Bruno Vidal @ 2002-06-11 21:47 ` Grant Grundler 0 siblings, 0 replies; 5+ messages in thread From: Grant Grundler @ 2002-06-11 21:47 UTC (permalink / raw) To: Bruno Vidal; +Cc: parisc-linux@lists.parisc-linux.org Bruno Vidal wrote: > Haaaaa, I've succeded at the end. Now ioctls are working fine. Excellent! > Sorry, I beg your pardon, the probleme was coming from the manner I > declare my ioctls cmds. With 64bits kernel it is: > #define DIOSDUMPDEV32 _IOW('p',0xa0,unsigned int) > And in user space it is (32 bits): > #define DIOSDUMPDEV32 _IOW('p',0xa0,unsigned long) shouldn't both kernel and user space use the same definition? (ie unsigned int) If they don't, I expect the ioctl wrapper to do some work. grant ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-06-11 21:47 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-06-10 14:52 [parisc-linux] Pb with ioctl and 64bits Bruno Vidal 2002-06-10 15:24 ` Randolph Chung 2002-06-11 5:52 ` Bruno Vidal 2002-06-11 11:40 ` Bruno Vidal 2002-06-11 21:47 ` Grant Grundler
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox