RE: [PATCHSET][2.6-test4][0/6]Support for HPET based timer - Take 2

From: Pallipadi, Venkatesh (venkatesh.pallipadi_at_intel.com)
Date: 08/30/03

  • Next message: Martin J. Bligh: "[Bug 1169] New: Consistently getting oops when trying standby or mem"
    Date:	Fri, 29 Aug 2003 16:58:56 -0700
    To: "Andrew Morton" <akpm@osdl.org>
    
    
    

    > -----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

    
    

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/



  • Next message: Martin J. Bligh: "[Bug 1169] New: Consistently getting oops when trying standby or mem"