Re: [PATCH] common implementation of iterative div/mod

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Wednesday, May 14, 2008 - 12:33 am

Andrew Morton wrote:

Uh, OK.  Do your other test machines work with it?  Are there any 
relevant config differences (x86-64 vs 32?).

Hm, it's not that it can't find its disk, I think it's this:

init[1]: segfault at ffffffffff7008d2 ip ffffffffff7008d2 sp 7fff86e67488 error 14
init[1]: segfault at ffffffffff7008d2 ip 311ac07628 sp 7fff86e66cb0 error 4 in libgcc_s-4.1.2-20070925.so.1[311ac00000+d000]


Is it that the vsyscall page is trying to call into the kernel?

    notrace static noinline int do_realtime(struct timespec *ts)
    {
    	unsigned long seq, ns;
    	do {
    		seq = read_seqbegin(&gtod->lock);
    		ts->tv_sec = gtod->wall_time_sec;
    		ts->tv_nsec = gtod->wall_time_nsec;
    		ns = vgetns();
    	} while (unlikely(read_seqretry(&gtod->lock, seq)));
    	timespec_add_ns(ts, ns);
    	return 0;
    }
      

timespec_add_ns() used to be entirely inlined, but now it contains the 
call to iter_div_u64_rem().

arch/x86/vdso/vclock_gettime.c has its own copies of other kernel 
functions which it can't directly call.  We could add 
timespec_add_ns()/iter_div_u64_rem() to that list, though its pretty 
hacky.  Could we link lib/div64.o into the vdso?

    J
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: undefined reference to __udivdi3 (gcc-4.3), Robert Hancock, (Sun May 4, 10:35 am)
Re: undefined reference to __udivdi3 (gcc-4.3), Segher Boessenkool, (Sun May 4, 3:19 pm)
Re: undefined reference to __udivdi3 (gcc-4.3), Jeremy Fitzhardinge, (Wed May 7, 2:29 am)
[PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Thu May 8, 8:16 am)
Re: [PATCH] common implementation of iterative div/mod, Andrew Morton, (Thu May 8, 1:26 pm)
Re: [PATCH] common implementation of iterative div/mod, Segher Boessenkool, (Thu May 8, 1:52 pm)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Thu May 8, 2:57 pm)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Thu May 8, 3:00 pm)
Re: [PATCH] common implementation of iterative div/mod, Christian Kujau, (Fri May 9, 4:45 am)
Re: [PATCH] common implementation of iterative div/mod, Andrew Morton, (Tue May 13, 11:46 pm)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Wed May 14, 12:33 am)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Wed May 14, 2:55 am)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Wed May 14, 3:52 am)
Re: [PATCH] common implementation of iterative div/mod, Jeremy Fitzhardinge, (Wed May 14, 5:58 am)