lkml.org 
[lkml]   [2003]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [PATCHSET][2.6-test4][0/6]Support for HPET based timer - Take 2
Date
From



> -----Original Message-----
> From: Andrew Morton [mailto:akpm@osdl.org]
>
> We seem to keep on proliferating home-grown x86 64-bit math functions.
>
> Do you really need these? Is it possible to use do_div() and
> the C 64x64
> `*' operator instead?
>


We can change these handcoded 64 bit divs to do_div, with just an
additional data copy
(as do_div changes dividend in place). But, changing mul into 64x64 '*'
may be tricky.
Gcc seem to generate a combination of mul, 2imul and add, where as we
are happy with
using only one mull here.

>
> I'd like the rtc emulation patch to be redone to remove the
> ifdefs please,
> they're a real eyesore.
>
> At the top of rtc.c, do something like this:
>
> #ifndef CONFIG_HPET_EMULATE_RTC
> #define is_hpet_enabled() 0
> #define hpet_set_alarm_time(hrs, min, sec) 0
> #define hpet_set_periodic_freq(arg) 0
> static inline int hpet_mask_rtc_irq_bit(int arg) { return 0; }
> #define hpet_rtc_timer_init() do { } while (0)
> #define hpet_rtc_dropped_irq() 0
> #endif
>
> And then all those eleven ifdefs can be removed from rtc.c.


Yes. That surely makes the patch lot more cleaner. Attached is the
updated rtc
emulation patch.

Thanks,
-Venkatesh
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.820 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site