1. 05 2月, 2010 1 次提交
  2. 23 1月, 2010 1 次提交
  3. 28 11月, 2009 1 次提交
  4. 28 8月, 2009 1 次提交
  5. 22 8月, 2009 1 次提交
    • J
      x86, hpet: Simplify the HPET code · 5946fa3d
      Jan Beulich 提交于
      On 64-bits, using unsigned long when unsigned int suffices
      needlessly creates larger code (due to the need for REX
      prefixes), and most of the logic in hpet.c really doesn't need
      64-bit operations.
      
      At once this avoids the need for a couple of type casts.
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Cc: Shaohua Li <shaohua.li@intel.com>
      Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      LKML-Reference: <4A8BC9780200007800010832@vpn.id2.novell.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5946fa3d
  6. 12 8月, 2009 1 次提交
  7. 15 6月, 2009 1 次提交
  8. 22 4月, 2009 2 次提交
  9. 23 2月, 2009 3 次提交
  10. 13 2月, 2009 1 次提交
    • J
      x86, hpet: fix for LS21 + HPET = boot hang · b13e2464
      john stultz 提交于
      Between 2.6.23 and 2.6.24-rc1 a change was made that broke IBM LS21
      systems that had the HPET enabled in the BIOS, resulting in boot hangs
      for x86_64.
      
      Specifically commit b8ce3359, which
      merges the i386 and x86_64 HPET code.
      
      Prior to this commit, when we setup the HPET timers in x86_64, we did
      the following:
      
      	hpet_writel(HPET_TN_ENABLE | HPET_TN_PERIODIC | HPET_TN_SETVAL |
                          HPET_TN_32BIT, HPET_T0_CFG);
      
      However after the i386/x86_64 HPET merge, we do the following:
      
      	cfg = hpet_readl(HPET_Tn_CFG(timer));
      	cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
      			HPET_TN_SETVAL | HPET_TN_32BIT;
      	hpet_writel(cfg, HPET_Tn_CFG(timer));
      
      However on LS21s with HPET enabled in the BIOS, the HPET_T0_CFG register
      boots with Level triggered interrupts (HPET_TN_LEVEL) enabled. This
      causes the periodic interrupt to be not so periodic, and that results in
      the boot time hang I reported earlier in the delay calibration.
      
      My fix: Always disable HPET_TN_LEVEL when setting up periodic mode.
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b13e2464
  11. 06 2月, 2009 1 次提交
  12. 05 2月, 2009 1 次提交
    • P
      x86: fix hpet timer reinit for x86_64 · a6a95406
      Pavel Emelyanov 提交于
      There's a small problem with hpet_rtc_reinit function - it checks
      for the:
      
      	hpet_readl(HPET_COUNTER) - hpet_t1_cmp > 0
      
      to continue increasing both the HPET_T1_CMP (register) and the
      hpet_t1_cmp (variable).
      
      But since the HPET_COUNTER is always 32-bit, if the hpet_t1_cmp
      is 64-bit this condition will always be FALSE once the latter hits
      the 32-bit boundary, and we can have a situation, when we don't
      increase the HPET_T1_CMP register high enough.
      
      The result - timer stops ticking, since HPET_T1_CMP becomes less,
      than the COUNTER and never increased again.
      
      The solution is (based on Linus's suggestion) to not compare 64-bits
      (on 64-bit x86), but to do the comparison on 32-bit signed
      integers.
      Reported-by: NKirill Korotaev <dev@openvz.org>
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a6a95406
  13. 22 1月, 2009 1 次提交
  14. 12 1月, 2009 1 次提交
  15. 17 12月, 2008 2 次提交
  16. 13 12月, 2008 2 次提交
  17. 25 11月, 2008 1 次提交
  18. 24 11月, 2008 1 次提交
  19. 11 11月, 2008 3 次提交
  20. 16 10月, 2008 8 次提交
  21. 06 9月, 2008 2 次提交
    • T
      x86: HPET: read back compare register before reading counter · 72d43d9b
      Thomas Gleixner 提交于
      After fixing the u32 thinko I sill had occasional hickups on ATI chipsets
      with small deltas. There seems to be a delay between writing the compare
      register and the transffer to the internal register which triggers the
      interrupt. Reading back the value makes sure, that it hit the internal
      match register befor we compare against the counter value.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      72d43d9b
    • T
      x86: HPET fix moronic 32/64bit thinko · f7676254
      Thomas Gleixner 提交于
      We use the HPET only in 32bit mode because:
      1) some HPETs are 32bit only
      2) on i386 there is no way to read/write the HPET atomic 64bit wide
      
      The HPET code unification done by the "moron of the year" did
      not take into account that unsigned long is different on 32 and
      64 bit.
      
      This thinko results in a possible endless loop in the clockevents
      code, when the return comparison fails due to the 64bit/332bit
      unawareness. 
      
      unsigned long cnt = (u32) hpet_read() + delta can wrap over 32bit.
      but the final compare will fail and return -ETIME causing endless
      loops.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      f7676254
  22. 05 9月, 2008 1 次提交
  23. 14 8月, 2008 1 次提交
    • T
      x86: hpet: workaround SB700 BIOS · a6825f1c
      Thomas Gleixner 提交于
      AMD SB700 based systems with spread spectrum enabled use a SMM based
      HPET emulation to provide proper frequency setting. The SMM code is
      initialized with the first HPET register access and takes some time to
      complete. During this time the config register reads 0xffffffff. We
      check for max. 1000 loops whether the config register reads a non
      0xffffffff value to make sure that HPET is up and running before we go
      further. A counting loop is safe, as the HPET access takes thousands
      of CPU cycles. On non SB700 based machines this check is only done
      once and has no side effects.
      
      Based on a quirk patch from: crane cai <crane.cai@amd.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      a6825f1c
  24. 01 8月, 2008 1 次提交
    • D
      hpet: /dev/hpet - fixes and cleanup · 64a76f66
      David Brownell 提交于
      Minor /dev/hpet updates and bugfixes:
      
        * Remove dead code, mostly remnants of an incomplete/unusable
          kernel interface ... noted when addressing "sparse" warnings:
            + hpet_unregister() and a routine it calls
            + hpet_task and all references, including hpet_task_lock
            + hpet_data.hd_flags (and HPET_DATA_PLATFORM)
      
        * Correct and improve boot message:
            + displays *counter* (shared between comparators) bit width,
              not *timer* bit widths (which are often mixed)
            + relabel "timers" as "comparators"; this is less confusing,
              they are not independent like normal timers are (sigh)
            + display MHz not Hz; it's never less than 10 MHz.
      
        * Tighten and correct the userspace interface code
            + don't accidentally program comparators in 64-bit mode using
              32-bit values ... always force comparators into 32-bit mode
            + provide the correct bit definition flagging comparators with
              periodic capability ... the ABI is unchanged
      
        * Update Documentation/hpet.txt
            + be more correct and current
            + expand description a bit
            + don't mention that now-gone kernel interface
      
      Plus, add a FIXME comment for something that could cause big trouble
      on systems with more capable HPETs than at least Intel seems to ship.
      
      It seems that few folk use this userspace interface; it's not very
      usable given the general lack of HPET IRQ routing.  I'm told that
      the only real point of it any more is to mmap for fast timestamps;
      IMO that's handled better through the gettimeofday() vsyscall.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      64a76f66
  25. 25 7月, 2008 1 次提交