1. 01 10月, 2006 4 次提交
    • A
      [PATCH] kill wall_jiffies · 8ef38609
      Atsushi Nemoto 提交于
      With 2.6.18-rc4-mm2, now wall_jiffies will always be the same as jiffies.
      So we can kill wall_jiffies completely.
      
      This is just a cleanup and logically should not change any real behavior
      except for one thing: RTC updating code in (old) ppc and xtensa use a
      condition "jiffies - wall_jiffies == 1".  This condition is never met so I
      suppose it is just a bug.  I just remove that condition only instead of
      kill the whole "if" block.
      
      [heiko.carstens@de.ibm.com: s390 build fix and cleanup]
      Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8ef38609
    • R
      [PATCH] ntp: add time_adjust to tick length · 8f807f8d
      Roman Zippel 提交于
      This folds update_ntp_one_tick() into second_overflow() and adds time_adjust
      to the tick length, this makes time_next_adjust unnecessary.  This slightly
      changes the adjtime() behaviour, instead of applying it to the next tick, it's
      applied to the next second.
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Cc: john stultz <johnstul@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8f807f8d
    • R
      [PATCH] ntp: add ntp_update_frequency · b0ee7556
      Roman Zippel 提交于
      This introduces ntp_update_frequency() and deinlines ntp_clear() (as it's not
      performance critical).  ntp_update_frequency() calculates the base tick length
      using tick_usec and adds a base adjustment, in case the frequency doesn't
      divide evenly by HZ.
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Cc: john stultz <johnstul@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b0ee7556
    • J
      [PATCH] NTP: Move all the NTP related code to ntp.c · 4c7ee8de
      john stultz 提交于
      Move all the NTP related code to ntp.c
      
      [akpm@osdl.org: cleanups, build fix]
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4c7ee8de
  2. 30 9月, 2006 4 次提交
  3. 15 8月, 2006 1 次提交
  4. 01 8月, 2006 3 次提交
  5. 15 7月, 2006 2 次提交
  6. 11 7月, 2006 1 次提交
  7. 04 7月, 2006 3 次提交
  8. 28 6月, 2006 2 次提交
  9. 27 6月, 2006 6 次提交
  10. 26 6月, 2006 1 次提交
  11. 23 6月, 2006 2 次提交
    • P
      [PATCH] When CONFIG_BASE_SMALL=1, cascade() may enter an infinite loop · 3439dd86
      Porpoise 提交于
      When CONFIG_BASE_SAMLL=1, cascade() in may enter the infinite loop.
      Because of CONFIG_BASE_SMALL=1(TVR_BITS=6 and TVN_BITS=4), the list
      base->tv5 may cascade into base->tv5.  So, the kernel enters the infinite
      loop in the function cascade().
      
      I created a test module to verify this bug, and a patch to fix it.
      
      #include <linux/kernel.h>
      #include <linux/module.h>
      #include <linux/init.h>
      #include <linux/timer.h>
      #if 0
      #include <linux/kdb.h>
      #else
      #define kdb_printf printk
      #endif
      
      #define TVN_BITS (CONFIG_BASE_SMALL ? 4 : 6)
      #define TVR_BITS (CONFIG_BASE_SMALL ? 6 : 8)
      #define TVN_SIZE (1 << TVN_BITS)
      #define TVR_SIZE (1 << TVR_BITS)
      #define TVN_MASK (TVN_SIZE - 1)
      #define TVR_MASK (TVR_SIZE - 1)
      
      #define TV_SIZE(N)  (N*TVN_BITS  + TVR_BITS)
      
      struct timer_list timer0;
      struct timer_list dummy_timer1;
      struct timer_list dummy_timer2;
      
      void dummy_timer_fun(unsigned long data) {
      }
      unsigned long j=0;
      void check_timer_base(unsigned long data)
      {
              kdb_printf("check_timer_base %08x\n",jiffies);
              mod_timer(&timer0,(jiffies & (~0xFFF)) + 0x1FFF);
      }
      
      int init_module(void)
      {
              init_timer(&timer0);
              timer0.data = (unsigned long)0;
              timer0.function = check_timer_base;
              mod_timer(&timer0,jiffies+1);
      
              init_timer(&dummy_timer1);
              dummy_timer1.data = (unsigned long)0;
              dummy_timer1.function = dummy_timer_fun;
      
              init_timer(&dummy_timer2);
              dummy_timer2.data = (unsigned long)0;
              dummy_timer2.function = dummy_timer_fun;
      
              j=jiffies;
              j&=(~((1<<TV_SIZE(3))-1));
              j+=(1<<TV_SIZE(3));
              j+=(1<<TV_SIZE(4));
      
              kdb_printf("mod_timer %08x\n",j);
      
              mod_timer(&dummy_timer1, j );
              mod_timer(&dummy_timer2, j );
      
              return 0;
      }
      
      void cleanup_module()
      {
              del_timer_sync(&timer0);
              del_timer_sync(&dummy_timer1);
              del_timer_sync(&dummy_timer2);
      }
      
      (Cleanups from Oleg)
      
      [oleg@tv-sign.ru: use list_replace_init()]
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Matt Mackall <mpm@selenic.com>
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3439dd86
    • O
      [PATCH] list: use list_replace_init() instead of list_splice_init() · 626ab0e6
      Oleg Nesterov 提交于
      list_splice_init(list, head) does unneeded job if it is known that
      list_empty(head) == 1.  We can use list_replace_init() instead.
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      626ab0e6
  12. 22 5月, 2006 1 次提交
    • Z
      [PATCH] Fix a NO_IDLE_HZ timer bug · 0662b713
      Zachary Amsden 提交于
      Under certain timing conditions, a race during boot occurs where timer
      ticks are being processed on remote CPUs.  The remote timer ticks can
      increment jiffies, and if this happens during a window when a timeout is
      very close to expiring but a local tick has not yet been delivered, you can
      end up with
      
      1) No softirq pending
      2) A local timer wheel which is not synced to jiffies
      3) No high resolution timer active
      4) A local timer which is supposed to fire before the current jiffies value.
      
      In this circumstance, the comparison in next_timer_interrupt overflows,
      because the base of the comparison for high resolution timers is jiffies,
      but for the softirq timer wheel, it is relative the the current base of the
      wheel (jiffies_base).
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0662b713
  13. 26 4月, 2006 2 次提交
  14. 11 4月, 2006 1 次提交
    • A
      [PATCH] timer initialisation fix · ba6edfcd
      Andrew Morton 提交于
      We need the boot CPU's tvec_bases[] entry to be initialised super-early in
      boot, for early_serial_setup().  That runs within setup_arch(), before even
      per-cpu areas are initialised.
      
      The patch changes tvec_bases to use compile-time initialisation, and adds a
      separate array `tvec_base_done' to keep track of which CPU has had its
      tvec_bases[] entry initialised (because we can no longer use the zeroness of
      that tvec_bases[] entry to determine whether it has been initialised).
      
      Thanks to Eugene Surovegin <ebs@ebshome.net> for diagnosing this.
      
      Cc: Eugene Surovegin <ebs@ebshome.net>
      Cc: Jan Beulich <jbeulich@novell.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ba6edfcd
  15. 10 4月, 2006 1 次提交
    • J
      [PATCH] x86_64: Fix drift with HPET timer enabled · b20367a6
      Jordan Hargrave 提交于
      If the HPET timer is enabled, the clock can drift by ~3 seconds a day.
      This is due to the HPET timer not being initialized with the correct
      setting (still using PIT count).
      
      If HZ changes, this drift can become even more pronounced.
      
      HPET patch initializes tick_nsec with correct tick_nsec settings for
      HPET timer.
      
      Vojtech comments:
      
        "It's not entirely correct (it assumes the HPET ticks totally
         exactly), but it's significantly better than assuming the PIT error
         there."
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b20367a6
  16. 02 4月, 2006 1 次提交
  17. 01 4月, 2006 3 次提交
  18. 26 3月, 2006 2 次提交
    • R
      [PATCH] remove pps support · 5ddcfa87
      Roman Zippel 提交于
      This removes the support for pps.  It's completely unused within the kernel
      and is basically in the way for further cleanups.  It should be easier to
      readd proper support for it after the rest has been converted to NTP4
      (where the pps mechanisms are quite different from NTP3 anyway).
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Cc: Adrian Bunk <bunk@stusta.de>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5ddcfa87
    • T
      [PATCH] sys_alarm() unsigned signed conversion fixup · c08b8a49
      Thomas Gleixner 提交于
      alarm() calls the kernel with an unsigend int timeout in seconds.  The
      value is stored in the tv_sec field of a struct timeval to setup the
      itimer.  The tv_sec field of struct timeval is of type long, which causes
      the tv_sec value to be negative on 32 bit machines if seconds > INT_MAX.
      
      Before the hrtimer merge (pre 2.6.16) such a negative value was converted
      to the maximum jiffies timeout by the timeval_to_jiffies conversion.  It's
      not clear whether this was intended or just happened to be done by the
      timeval_to_jiffies code.
      
      hrtimers expect a timeval in canonical form and treat a negative timeout as
      already expired.  This breaks the legitimate usage of alarm() with a
      timeout value > INT_MAX seconds.
      
      For 32 bit machines it is therefor necessary to limit the internal seconds
      value to avoid API breakage.  Instead of doing this in all implementations
      of sys_alarm the duplicated sys_alarm code is moved into a common function
      in itimer.c
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c08b8a49