1. 26 Jul, 2008 1 commit
  2. 24 Jul, 2008 2 commits
  3. 10 Jul, 2008 1 commit
  4. 02 Jul, 2008 1 commit
  5. 29 Apr, 2008 1 commit
  6. 28 Apr, 2008 1 commit
    • Julia Lawall's avatar
      drivers/char/rtc.c: use time_before, time_before_eq, etc · dca03a51
      Julia Lawall authored
      The functions time_before, time_before_eq, time_after, and time_after_eq
      are more robust for comparing jiffies against other values.
      
      A simplified version of the semantic patch making this change is as follows:
      (http://www.emn.fr/x-info/coccinelle/
      
      )
      
      // <smpl>
      @ change_compare_np @
      expression E;
      @@
      
      (
      - jiffies <= E
      + time_before_eq(jiffies,E)
      |
      - jiffies >= E
      + time_after_eq(jiffies,E)
      |
      - jiffies < E
      + time_before(jiffies,E)
      |
      - jiffies > E
      + time_after(jiffies,E)
      )
      
      @ include depends on change_compare_np @
      @@
      
      #include <linux/jiffies.h>
      
      @ no_include depends on !include && change_compare_np @
      @@
      
        #include <linux/...>
      + #include <linux/jiffies.h>
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dca03a51
  7. 29 Feb, 2008 1 commit
  8. 30 Jan, 2008 2 commits
  9. 14 Nov, 2007 2 commits
  10. 21 Jul, 2007 1 commit
  11. 20 Jul, 2007 1 commit
  12. 16 Jul, 2007 1 commit
  13. 08 May, 2007 1 commit
  14. 14 Feb, 2007 2 commits
  15. 12 Feb, 2007 1 commit
    • Jiri Slaby's avatar
      [PATCH] Char: timers cleanup · 40565f19
      Jiri Slaby authored
      
      - Use timer macros to set function and data members and to modify
        expiration time.
      - Use DEFINE_TIMER for global timers and do not init them at run-time in
        these cases.
      - del_timer_sync is common in most cases -- we want to wait for timer
        function if it's still running.
      Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
      Cc: Dave Airlie <airlied@linux.ie>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Paul Fulghum <paulkf@microgate.com>
      Cc: Kylene Jo Hall <kjhall@us.ibm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Acked-by: Dmitry Torokhov <dtor@mail.ru>	(Input bits)
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      40565f19
  16. 22 Dec, 2006 1 commit
  17. 13 Dec, 2006 2 commits
  18. 09 Oct, 2006 1 commit
  19. 05 Oct, 2006 1 commit
    • David Howells's avatar
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells authored
      
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  20. 29 Sep, 2006 1 commit
  21. 25 Sep, 2006 1 commit
    • Peter Zijlstra's avatar
      [PATCH] rtc: lockdep fix/workaround · 0b16f21f
      Peter Zijlstra authored
      
      BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)
       [<c04051ee>] show_trace_log_lvl+0x58/0x171
       [<c0405802>] show_trace+0xd/0x10
       [<c040591b>] dump_stack+0x19/0x1b
       [<c043abee>] trace_hardirqs_on+0xa2/0x11e
       [<c06143c3>] _spin_unlock_irq+0x22/0x26
       [<c0541540>] rtc_get_rtc_time+0x32/0x176
       [<c0419ba4>] hpet_rtc_interrupt+0x92/0x14d
       [<c0450f94>] handle_IRQ_event+0x20/0x4d
       [<c0451055>] __do_IRQ+0x94/0xef
       [<c040678d>] do_IRQ+0x9e/0xbd
       [<c0404a49>] common_interrupt+0x25/0x2c
      DWARF2 unwinder stuck at common_interrupt+0x25/0x2c
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0b16f21f
  22. 12 Jul, 2006 1 commit
    • Ingo Molnar's avatar
      [PATCH] lockdep: HPET/RTC fix · 0f749646
      Ingo Molnar authored
      
      Joseph Fannin reported that hpet_rtc_interrupt() enables hardirqs
      in irq context:
      
      [   25.628000]  [<c014af4e>] trace_hardirqs_on+0xce/0x200
      [   25.628000]  [<c036cf21>] _spin_unlock_irq+0x31/0x70
      [   25.628000]  [<c0296584>] rtc_get_rtc_time+0x44/0x1a0
      [   25.628000]  [<c01198bb>] hpet_rtc_interrupt+0x21b/0x280
      [   25.628000]  [<c0161141>] handle_IRQ_event+0x31/0x70
      [   25.628000]  [<c0162d37>] handle_edge_irq+0xe7/0x210
      [   25.628000]  [<c0106192>] do_IRQ+0x92/0x120
      [   25.628000]  [<c0104121>] common_interrupt+0x25/0x2c
      
      the call of rtc_get_rtc_time() is highly suspect. At a minimum we
      need the patch below to save/restore hardirq state.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Joseph Fannin <jfannin@gmail.com>
      Cc: John Stultz <johnstul@us.ibm.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0f749646
  23. 10 Jul, 2006 1 commit
  24. 03 Jul, 2006 1 commit
  25. 02 Jul, 2006 1 commit
  26. 30 Jun, 2006 1 commit
  27. 24 Jun, 2006 1 commit
  28. 20 Jun, 2006 1 commit
    • David S. Miller's avatar
      [SPARC]: Kill __irq_itoa(). · c6387a48
      David S. Miller authored
      
      This ugly hack was long overdue to die.
      
      It was a way to print out Sparc interrupts in a more freindly format,
      since IRQ numbers were arbitrary opaque 32-bit integers which vectored
      into PIL levels.  These 32-bit integers were not necessarily in the
      0-->NR_IRQS range, but the PILs they vectored to were.
      
      The idea now is that we will increase NR_IRQS a little bit and use a
      virtual<-->real IRQ number mapping scheme similar to PowerPC.
      
      That makes this IRQ printing hack irrelevant, and furthermore only a
      handful of drivers actually used __irq_itoa() making it even less
      useful.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6387a48
  29. 11 Jan, 2006 1 commit
  30. 07 Nov, 2005 1 commit
  31. 06 Sep, 2005 1 commit
  32. 05 Aug, 2005 1 commit
    • Petr Vandrovec's avatar
      [PATCH] rtc: msleep() cannot be used from interrupt · 403fe5ae
      Petr Vandrovec authored
      Since the beginning of July my Opteron box was randomly crashing and
      being rebooted by hardware watchdog.  Today it finally did it in front
      of me, and this patch will hopefully fix it.
      
      The problem is that at the end of June (the 28th, to be exact: commit
      47f176fd
      
      , "[PATCH] Using msleep()
      instead of HZ") rtc_get_rtc_time was converted to use msleep() instead
      of busy waiting.  But rtc_get_rtc_time is used by hpet_rtc_interrupt,
      and scheduling is not allowed during interrupt.  So I'm reverting this
      part of original change, replacing msleep() back with busy loop.
      
      The original code was busy waiting for up to 20ms, but on my hardware in
      the worst case update-in-progress bit was asserted for at most 363
      passes through loop (on 2GHz dual Opteron), much less than even one
      jiffie, not even talking about 20ms.  So I changed code to just wait
      only as long as necessary.  Otherwise when RTC was set to generate
      8192Hz timer, it stopped doing anything for 20ms (160 pulses were
      skipped!) from time to time, and this is rather suboptimal as far as I
      can tell.
      Signed-off-by: default avatarPetr Vandrovec <vandrove@vc.cvut.cz>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      403fe5ae
  33. 29 Jun, 2005 1 commit
  34. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4