1. 05 6月, 2016 1 次提交
  2. 04 6月, 2016 1 次提交
  3. 23 5月, 2016 1 次提交
    • H
      parisc: Add native high-resolution sched_clock() implementation · 54b66800
      Helge Deller 提交于
      Add a native implementation for the sched_clock() function which utilizes the
      processor-internal cycle counter (Control Register 16) as high-resolution time
      source.
      
      With this patch we now get much more fine-grained resolutions in various
      in-kernel time measurements (e.g. when viewing the function tracing logs), and
      probably a more accurate scheduling on SMP systems.
      
      There are a few specific implementation details in this patch:
      
      1. On a 32bit kernel we emulate the higher 32bits of the required 64-bit
      resolution of sched_clock() by increasing a per-cpu counter at every
      wrap-around of the 32bit cycle counter.
      
      2. In a SMP system, the cycle counters of the various CPUs are not syncronized
      (similiar to the TSC in a x86_64 system). To cope with this we define
      HAVE_UNSTABLE_SCHED_CLOCK and let the upper layers do the adjustment work.
      
      3. Since we need HAVE_UNSTABLE_SCHED_CLOCK, we need to provide a cmpxchg64()
      function even on a 32-bit kernel.
      
      4. A 64-bit SMP kernel which is started on a UP system will mark the
      sched_clock() implementation as "stable", which means that we don't expect any
      jumps in the returned counter. This is true because we then run only on one
      CPU.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      54b66800
  4. 08 9月, 2015 2 次提交
  5. 11 5月, 2012 1 次提交
    • R
      parisc: move definition of PAGE0 to asm/page.h · 4a8a0788
      Rolf Eike Beer 提交于
      This was defined in asm/pdc.h which needs to include asm/page.h for
      __PAGE_OFFSET. This leads to an include loop so that page.h eventually will
      include pdc.h again. While this is no problem because of header guards, it is
      a problem because some symbols may be undefined. Such an error is this:
      
      In file included from include/linux/bitops.h:35:0,
                       from include/asm-generic/getorder.h:7,
                       from arch/parisc/include/asm/page.h:162,
                       from arch/parisc/include/asm/pdc.h:346,
                       from arch/parisc/include/asm/processor.h:16,
                       from arch/parisc/include/asm/spinlock.h:6,
                       from arch/parisc/include/asm/atomic.h:20,
                       from include/linux/atomic.h:4,
                       from include/linux/sysfs.h:20,
                       from include/linux/kobject.h:21,
                       from include/linux/device.h:17,
                       from include/linux/eisa.h:5,
                       from arch/parisc/kernel/pci.c:11:
      arch/parisc/include/asm/bitops.h: In function ‘set_bit’:
      arch/parisc/include/asm/bitops.h:82:2: error: implicit declaration of function ‘_atomic_spin_lock_irqsave’ [-Werror=implicit-function-declaration]
      arch/parisc/include/asm/bitops.h:84:2: error: implicit declaration of function ‘_atomic_spin_unlock_irqrestore’ [-Werror=implicit-function-declaration]
      Signed-off-by: NRolf Eike Beer <eike-kernel@sf-tec.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4a8a0788
  6. 22 11月, 2011 1 次提交
  7. 31 1月, 2011 1 次提交
  8. 07 3月, 2010 1 次提交
  9. 03 7月, 2009 2 次提交
    • G
      parisc: fix "delay!" timer handling · 84be31be
      Grant Grundler 提交于
      Rewrote timer_interrupt() to properly handle the "delayed!" case.
      
      If we used floating point math to compute the number of ticks that had
      elapsed since the last timer interrupt, it could take up to 12K cycles
      (emperical!) to handle the interrupt. Existing code assumed it would
      never take more than 8k cycles. We end up programming Interval Timer
      to a value less than "current" cycle counter.  Thus have to wait until
      Interval Timer "wrapped" and would then get the "delayed!" printk that
      I moved below.
      
      Since we don't really know what the upper limit is, I prefer to read
      CR16 again after we've programmed it to make sure we won't have to
      wait for CR16 to wrap.
      
      Further, the printk was between reading CR16 (cycle couner) and writing CR16
      (the interval timer). This would cause us to continue to set the interval
      timer to a value that was "behind" the cycle counter. Rinse and repeat.
      So no printk's between reading CR16 and setting next interval timer.
      
      Tested on A500 (550 Mhz PA8600).
      Signed-off-by: NGrant Grundler <grundler@parisc-linux.org>
      Tested-by: NKyle McMartin <kyle@mcmartin.ca>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      
      ----
      Kyle, Helge, and other parisc's,
      Please test on 32-bit before committing.
      I think I have it right but recognize I might not.
      
      TODO: I wanted to use "do_div()" in order to get both remainder
      and value back with one division op. That should help with the
      latency alot but can be applied seperately from this patch.
      
      thanks,
      grant
      84be31be
    • C
      parisc: add parameter to read_cr16() · ebc30a0f
      Coly Li 提交于
      This patch modifies parameter of au1x_counter1_read() from 'void' to 'struct
      clocksource *cs', which fixes compile warning for incompatible parameter type.
      Signed-off-by: NColy Li <coly.li@suse.de>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      ebc30a0f
  10. 02 4月, 2009 1 次提交
  11. 01 4月, 2009 2 次提交
  12. 31 3月, 2009 1 次提交
  13. 06 1月, 2009 1 次提交
  14. 11 10月, 2008 1 次提交
  15. 18 10月, 2007 1 次提交
  16. 23 5月, 2007 1 次提交
  17. 27 2月, 2007 4 次提交
  18. 17 2月, 2007 3 次提交
  19. 12 2月, 2007 1 次提交
  20. 07 10月, 2006 3 次提交
  21. 05 10月, 2006 1 次提交
  22. 04 10月, 2006 5 次提交
  23. 01 10月, 2006 1 次提交
    • 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
  24. 30 9月, 2006 1 次提交
    • A
      [PATCH] simplify update_times (avoid jiffies/jiffies_64 aliasing problem) · 3171a030
      Atsushi Nemoto 提交于
      Pass ticks to do_timer() and update_times(), and adjust x86_64 and s390
      timer interrupt handler with this change.
      
      Currently update_times() calculates ticks by "jiffies - wall_jiffies", but
      callers of do_timer() should know how many ticks to update.  Passing ticks
      get rid of this redundant calculation.  Also there are another redundancy
      pointed out by Martin Schwidefsky.
      
      This cleanup make a barrier added by
      5aee405c needless.  So this patch removes
      it.
      
      As a bonus, this cleanup make wall_jiffies can be removed easily, since now
      wall_jiffies is always synced with jiffies.  (This patch does not really
      remove wall_jiffies.  It would be another cleanup patch)
      Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: john stultz <johnstul@us.ibm.com>
      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>
      Acked-by: NRussell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
      Acked-by: NRalf 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>
      Acked-by: N"Luck, Tony" <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3171a030
  25. 01 7月, 2006 1 次提交
  26. 28 6月, 2006 1 次提交
    • J
      [PARISC] Fix do_gettimeofday() hang · 61c34016
      James Bottomley 提交于
      Apparently gettimeoffset can return small negative values (usually in
      the 100us range).  If xtime.tv_nsec is accidentally less than this,
      though (a fortunately unlikely event) it triggers the loop forever.
      
      I've added a test and correct adjustment for this case.  It has a
      warning printk in there which I'd like to leave for the time being
      just in case this problem implicates some other part of the kernel.
      Signed-off-by: NJames Bottomley <jejb@parisc-linux.org>
      Signed-off-by: NKyle McMartin <kyle@parisc-linux.org>
      61c34016