32-bit ach library on 64-bit kernel system

20 views
Skip to first unread message

mat...@gmail.com

unread,
Apr 13, 2015, 8:57:18 AM4/13/15
to ach-...@googlegroups.com
Hi!

The ach kernel module is not designed to work on a multiarch system.
I have a 64-bit linux system (classic Ubuntu 14.04) and I want to build ach as a 32 bit library.
Building works perfectly but you can't execute for example achbench -k.
This is due to the lack of "compat_ioctl" in the ach kernel module.
I made a quick patch, adding this, and I got achbench -k to work with it. However, I think it might need some further verification.
The patch is built upon the 2.0.0 version of ach.

Regards,
Mattias

32bitOn64bitKernel.patch

Neil Dantam

unread,
Apr 17, 2015, 12:27:21 AM4/17/15
to ach-...@googlegroups.com
Hi Mattias,

Thanks very much for the patch! I did a quick read though and it looks
good. Only (minor) issue is the assumption that int and clockid_t are
the same size on 32/64 bit. (True of int in x86/amd64, I'm not sure of
clockid_t). Also, could you please add/say what the copyright line for
the changes should be?

Cheers,
-ntd
> --
> You received this message because you are subscribed to the Google
> Groups "ach-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ach-devel+...@googlegroups.com
> <mailto:ach-devel+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

mat...@gmail.com

unread,
Apr 17, 2015, 3:30:58 AM4/17/15
to ach-...@googlegroups.com
Hi!
I made this changes for Atlas Copco Rock Drills AB, so they will have the copyright.
Regards,
Mattias

Neil T. Dantam

unread,
Apr 24, 2015, 1:19:03 PM4/24/15
to ach-...@googlegroups.com
Hi Mattias,

I merged your patch to master.

Looks like clockid_t is typedefed from int, so it should be fine to
assume this is the same size on 32 and 64 bit.

Thanks very much!

Cheers,
-ntd

On 04/17/2015 02:30 AM, mat...@gmail.com wrote:
> Hi!
> I made this changes for Atlas Copco Rock Drills AB, so they will have
> the copyright.
> Regards,
> Mattias
>
> Den fredag 17 april 2015 kl. 06:27:21 UTC+2 skrev Neil Dantam:
>
> Hi Mattias,
>
> Thanks very much for the patch! I did a quick read though and it looks
> good. Only (minor) issue is the assumption that int and clockid_t are
> the same size on 32/64 bit. (True of int in x86/amd64, I'm not sure of
> clockid_t). Also, could you please add/say what the copyright line for
> the changes should be?
>
> Cheers,
> -ntd
>
> On 04/13/2015 07:57 AM, mat...@gmail.com <javascript:> wrote:
> > Hi!
> >
> > The ach kernel module is not designed to work on a multiarch system.
> > I have a 64-bit linux system (classic Ubuntu 14.04) and I want to
> build
> > ach as a 32 bit library.
> > Building works perfectly but you can't execute for example
> achbench -k.
> > This is due to the lack of "compat_ioctl" in the ach kernel module.
> > I made a quick patch, adding this, and I got achbench -k to work
> with
> > it. However, I think it might need some further verification.
> > The patch is built upon the 2.0.0 version of ach.
> >
> > Regards,
> > Mattias
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "ach-devel" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to ach-devel+...@googlegroups.com <javascript:>
> > <mailto:ach-devel+...@googlegroups.com <javascript:>>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
Reply all
Reply to author
Forward
0 new messages