1. 25 7月, 2008 1 次提交
  2. 14 7月, 2008 1 次提交
  3. 13 5月, 2008 1 次提交
    • C
      x86: clean up computation of HPET .mult variables · 6fd592da
      Carlos R. Mafra 提交于
      While reading through the HPET code I realized that the
      computation of .mult variables could be done with less
      lines of code, resulting in a 1.6% text size saving
      for hpet.o
      
      So I propose the following patch, which applies against
      today's Linus -git tree.
      
      >From 0c6507e400e9ca5f7f14331e18f8c12baf75a9d3 Mon Sep 17 00:00:00 2001
      From: Carlos R. Mafra <crmafra@ift.unesp.br>
      Date: Mon, 5 May 2008 19:38:53 -0300
      
      The computation of clocksource_hpet.mult
      
             tmp = (u64)hpet_period << HPET_SHIFT;
             do_div(tmp, FSEC_PER_NSEC);
             clocksource_hpet.mult = (u32)tmp;
      
      can be streamlined if we note that it is equal to
      
             clocksource_hpet.mult = div_sc(hpet_period, FSEC_PER_NSEC, HPET_SHIFT);
      
      Furthermore, the computation of hpet_clockevent.mult
      
             uint64_t hpet_freq;
      
             hpet_freq = 1000000000000000ULL;
             do_div(hpet_freq, hpet_period);
             hpet_clockevent.mult = div_sc((unsigned long) hpet_freq,
                                           NSEC_PER_SEC, hpet_clockevent.shift);
      
      can also be streamlined with the observation that hpet_period and hpet_freq are
      inverse to each other (in proper units).
      
      So instead of computing hpet_freq and using (schematically)
      div_sc(hpet_freq, 10^9, shift) we use the trick of calling with the
      arguments in reverse order, div_sc(10^6, hpet_period, shift).
      
      The different power of ten is due to frequency being in Hertz (1/sec)
      and the period being in units of femtosecond. Explicitly,
      
      mult = (hpet_freq * 2^shift)/10^9    (before)
      mult = (10^6 * 2^shift)/hpet_period  (after)
      
      because hpet_freq = 10^15/hpet_period.
      
      The comments in the code are also updated to reflect the changes.
      
      As a result,
      
         text    data     bss     dec     hex filename
         2957     425      92    3474     d92 arch/x86/kernel/hpet.o
         3006     425      92    3523     dc3 arch/x86/kernel/hpet.o.old
      
      a 1.6% reduction in text size.
      Signed-off-by: NCarlos R. Mafra <crmafra@ift.unesp.br>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      6fd592da
  4. 01 5月, 2008 1 次提交
  5. 26 4月, 2008 1 次提交
  6. 05 4月, 2008 1 次提交
  7. 26 2月, 2008 1 次提交
  8. 30 1月, 2008 6 次提交
  9. 15 1月, 2008 1 次提交
    • B
      x86: fix RTC_AIE with CONFIG_HPET_EMULATE_RTC · 8ee291f8
      Bernhard Walle 提交于
      In the current code, RTC_AIE doesn't work if the RTC relies on
      CONFIG_HPET_EMULATE_RTC because the code sets the RTC_AIE flag in
      hpet_set_rtc_irq_bit().  The interrupt handles does accidentally check
      for RTC_PIE and not RTC_AIE when comparing the time which was set in
      hpet_set_alarm_time().
      
      I now verified on a test system here that without the patch applied,
      the attached test program fails on a system that has HPET with
      2.6.24-rc7-default. That's not critical since I guess the problem has
      been there for several kernel releases, but as the fix is quite
      obvious.
      
      Configuration is CONFIG_RTC=y and CONFIG_HPET_EMULATE_RTC=y.
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8ee291f8
  10. 04 12月, 2007 1 次提交
  11. 20 10月, 2007 2 次提交
  12. 13 10月, 2007 7 次提交
  13. 11 10月, 2007 2 次提交
  14. 22 7月, 2007 4 次提交
  15. 30 3月, 2007 1 次提交
  16. 28 3月, 2007 1 次提交
  17. 05 3月, 2007 1 次提交
    • J
      [PATCH] clocksource init adjustments (fix bug #7426) · 6bb74df4
      john stultz 提交于
      This patch resolves the issue found here:
      http://bugme.osdl.org/show_bug.cgi?id=7426
      
      The basic summary is:
      Currently we register most of i386/x86_64 clocksources at module_init
      time. Then we enable clocksource selection at late_initcall time. This
      causes some problems for drivers that use gettimeofday for init
      calibration routines (specifically the es1968 driver in this case),
      where durring module_init, the only clocksource available is the low-res
      jiffies clocksource. This may cause slight calibration errors, due to
      the small sampling time used.
      
      It should be noted that drivers that require fine grained time may not
      function on architectures that do not have better then jiffies
      resolution timekeeping (there are a few). However, this does not
      discount the reasonable need for such fine-grained timekeeping at init
      time.
      
      Thus the solution here is to register clocksources earlier (ideally when
      the hardware is being initialized), and then we enable clocksource
      selection at fs_initcall (before device_initcall).
      
      This patch should probably get some testing time in -mm, since
      clocksource selection is one of the most important issues for correct
      timekeeping, and I've only been able to test this on a few of my own
      boxes.
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6bb74df4
  18. 17 2月, 2007 2 次提交
  19. 10 2月, 2007 1 次提交
  20. 07 12月, 2006 1 次提交
  21. 02 9月, 2006 1 次提交
  22. 27 6月, 2006 2 次提交