On Wed, 2010-08-25 at 11:32 +0200, Jan Kiszka wrote:
> Philippe Gerum wrote:
> >>>> diff --git a/arch/x86/kernel/vsyscall_64.c 
> >>>> b/arch/x86/kernel/vsyscall_64.c
> >>>> index 8cb4974..f1b90f7 100644
> >>>> --- a/arch/x86/kernel/vsyscall_64.c
> >>>> +++ b/arch/x86/kernel/vsyscall_64.c
> >>>> @@ -32,6 +32,7 @@
> >>>>  #include <linux/cpu.h>
> >>>>  #include <linux/smp.h>
> >>>>  #include <linux/notifier.h>
> >>>> +#include <linux/ipipe_tickdev.h>
> >>>>  
> >>>>  #include <asm/vsyscall.h>
> >>>>  #include <asm/pgtable.h>
> >>>> @@ -89,6 +90,11 @@ void update_vsyscall(struct timespec *wall_time, 
> >>>> struct clocksource *clock)
> >>>>          vsyscall_gtod_data.wall_to_monotonic = wall_to_monotonic;
> >>>>          vsyscall_gtod_data.wall_time_coarse = __current_kernel_time();
> >>>>          write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags);
> >>>> +
> >>>> +#ifdef CONFIG_IPIPE_HOSTRT
> >>>> +        if (clock == &clocksource_tsc)
> >>>> +                update_ipipe_hostrt(wall_time, clock);
> >>>> +#endif
> >>>>  }
> >>> It would be nice to move the test on clock to ipipe_update_hostrt() in
> >>> order to hide all nitty-gritty details from mainline. Making the code
> >>> unconditionally compiled in removes the need to #ifdefery.
> >> This code is arch-specific while update_ipipe_hostrt is generic.
> >>
> > 
> > We don't need #ifdefery with the conditional definition of
> > ipipe_update_hostrt() in ipipe_tickdev.h.
> 
> You mean rely on the compiler optimizing the check away? OK, now I get it.

Yep.

> 
> Jan
> 

-- 
Philippe.



_______________________________________________
Adeos-main mailing list
[email protected]
https://mail.gna.org/listinfo/adeos-main

Reply via email to