Messages in this thread | ![/](/images/icornerl.gif) | | Subject | RE: [PATCHSET][2.6-test4][0/6]Support for HPET based timer - Take 2 | Date | Fri, 29 Aug 2003 16:58:56 -0700 | From | "Pallipadi, Venkatesh" <> |
| |
> -----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]
| ![\](/images/icornerr.gif) |