[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070724143147.GE4074@enneenne.com>
Date: Tue, 24 Jul 2007 16:31:47 +0200
From: Rodolfo Giometti <giometti@...eenne.com>
To: David Woodhouse <dwmw2@...radead.org>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] LinuxPPS - definitive version
On Tue, Jul 24, 2007 at 02:49:02PM +0100, David Woodhouse wrote:
>
> I think you still haven't quite got the 32-bit vs. 64-bit compatibility
> right. Remember that on i386, the alignment of a uint64_t is only 4
> bytes, while on most other architectures it's 8 bytes. On i386, there
> will be no padding between the two consecutive 'struct pps_ktime'
> members of struct pps_kinfo and struct pps_kparams. But on most
> platforms there will be padding to ensure correct alignment.
>
> The simple fix is probably to make the 'nsec' member a 64-bit integer
> too. Then it'll be the same for i386 and x86_64 and you won't need a
> compatibility syscall routine.
By doing:
struct pps_ktime {
__u64 sec;
- __u32 nsec;
+ __u64 nsec;
};
I got:
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o: In function `sys_time_pps_fetch':
(.text+0x5f05e): undefined reference to `__udivdi3'
make: *** [.tmp_vmlinux1] Error 1
I suppose the problem is here:
ticks = to.sec * HZ;
ticks += to.nsec / (NSEC_PER_SEC / HZ);
Suggestions? :)
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@...eenne.com
Linux Device Driver giometti@...dd.com
Embedded Systems giometti@...ux.it
UNIX programming phone: +39 349 2432127
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists