1. 12 Mar, 2011 9 commits
  2. 11 Mar, 2011 1 commit
  3. 08 Mar, 2011 1 commit
  4. 02 Mar, 2011 1 commit
  5. 26 Feb, 2011 1 commit
    • Thomas Gleixner's avatar
      genirq: Provide forced interrupt threading · 8d32a307
      Thomas Gleixner authored
      Add a commandline parameter "threadirqs" which forces all interrupts except
      those marked IRQF_NO_THREAD to run threaded. That's mostly a debug option to
      allow retrieving better debug data from crashing interrupt handlers. If
      "threadirqs" is not enabled on the kernel command line, then there is no
      impact in the interrupt hotpath.
      
      Architecture code needs to select CONFIG_IRQ_FORCED_THREADING after
      marking the interrupts which cant be threaded IRQF_NO_THREAD. All
      interrupts which have IRQF_TIMER set are implict marked
      IRQF_NO_THREAD. Also all PER_CPU interrupts are excluded.
      
      Forced threading hard interrupts also forces all soft interrupt
      handling into thread context.
      
      When enabled it might slow down things a bit, but for debugging problems in
      interrupt code it's a reasonable penalty as it does not immediately
      crash and burn the machine when an interrupt handler is buggy.
      
      Some test results on a Core2Duo machine:
      
      Cache cold run of:
       # time git grep irq_desc
      
            non-threaded       threaded
       real 1m18.741s          1m19.061s
       user 0m1.874s           0m1.757s
       sys  0m5.843s           0m5.427s
      
       # iperf -c server
      non-threaded
      [  3]  0.0-10.0 sec  1.09 GBytes   933 Mbits/sec
      [  3]  0.0-10.0 sec  1.09 GBytes   934 Mbits/sec
      [  3]  0.0-10.0 sec  1.09 GBytes   933 Mbits/sec
      threaded
      [  3]  0.0-10.0 sec  1.09 GBytes   939 Mbits/sec
      [  3]  0.0-10.0 sec  1.09 GBytes   934 Mbits/sec
      [  3]  0.0-10.0 sec  1.09 GBytes   937 Mbits/sec
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20110223234956.772668648@linutronix.de>
      8d32a307
  6. 25 Feb, 2011 5 commits
    • Thomas Gleixner's avatar
      sched: Switch wait_task_inactive to schedule_hrtimeout() · 8eb90c30
      Thomas Gleixner authored
      When we force thread hard and soft interrupts the startup of ksoftirqd
      would hang in kthread_bind() when wait_task_inactive() calls
      schedule_timeout_uninterruptible() because there is no softirq yet
      which will wake us up.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20110223234956.677109139@linutronix.de>
      8eb90c30
    • Thomas Gleixner's avatar
      genirq: Add IRQF_NO_THREAD · 0c4602ff
      Thomas Gleixner authored
      Some low level interrupts cannot be threaded even when we force thread
      all interrupt handlers. Add a flag to annotate such interrupts. Add
      all timer interrupts to this category by default.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20110223234956.578893460@linutronix.de>
      0c4602ff
    • Thomas Gleixner's avatar
      genirq: Allow shared oneshot interrupts · 9d591edd
      Thomas Gleixner authored
      Support ONESHOT on shared interrupts, if all drivers agree on it.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20110223234956.483640430@linutronix.de>
      9d591edd
    • Thomas Gleixner's avatar
      genirq: Prepare the handling of shared oneshot interrupts · b5faba21
      Thomas Gleixner authored
      For level type interrupts we need to track how many threads are on
      flight to avoid useless interrupt storms when not all thread handlers
      have finished yet. Keep track of the woken threads and only unmask
      when there are no more threads in flight.
      
      Yes, I'm lazy and using a bitfield. But not only because I'm lazy, the
      main reason is that it's way simpler than using a refcount. A refcount
      based solution would need to keep track of various things like
      crashing the irq thread, spurious interrupts coming in,
      disables/enables, free_irq() and some more. The bitfield keeps the
      tracking simple and makes things just work. It's also nicely confined
      to the thread code pathes and does not require additional checks all
      over the place.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <20110223234956.388095876@linutronix.de>
      b5faba21
    • Thomas Gleixner's avatar
      genirq: Make warning in handle_percpu_event useful · 1204e956
      Thomas Gleixner authored
      The WARN_ON_ONCE in handle_percpu_event() which emits a warning when
      an action handler returns with interrupts enabled is not really
      useful. It does not reveal the interrupt number and handler function
      which caused it. Make it WARN_ONCE() and add the information.
      Reported-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      1204e956
  7. 23 Feb, 2011 16 commits
  8. 22 Feb, 2011 4 commits
  9. 21 Feb, 2011 2 commits
    • Indan Zupancic's avatar
      drm/i915: Do not handle backlight combination mode specially · 951f3512
      Indan Zupancic authored
      The current code does not follow Intel documentation: It misses some things
      and does other, undocumented things. This causes wrong backlight values in
      certain conditions. Instead of adding tricky code handling badly documented
      and rare corner cases, don't handle combination mode specially at all. This
      way PCI_LBPC is never touched and weird things shouldn't happen.
      
      If combination mode is enabled, then the only downside is that changing the
      brightness has a greater granularity (the LBPC value), but LBPC is at most
      254 and the maximum is in the thousands, so this is no real functional loss.
      
      A potential problem with not handling combined mode is that a brightness of
      max * PCI_LBPC is not bright enough. However, this is very unlikely because
      from the documentation LBPC seems to act as a scaling factor and doesn't look
      like it's supposed to be changed after boot. The value at boot should always
      result in a bright enough screen.
      
      IMPORTANT: However, although usually the above is true, it may not be when
      people ran an older (2.6.37) kernel which messed up the LBPC register, and
      they are unlucky enough to have a BIOS that saves and restores the LBPC value.
      Then a good kernel may seem to not work: Max brightness isn't bright enough.
      If this happens people should boot back into the old kernel, set brightness
      to the maximum, and then reboot. After that everything should be fine.
      
      For more information see the below links. This fixes bugs:
      
        http://bugzilla.kernel.org/show_bug.cgi?id=23472
        http://bugzilla.kernel.org/show_bug.cgi?id=25072Signed-off-by: default avatarIndan Zupancic <indan@nul.nu>
      Tested-by: default avatarAlex Riesen <raa.lkml@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      951f3512
    • Dmitry Torokhov's avatar
      module: explicitly align module_version_attribute structure · 98562ad8
      Dmitry Torokhov authored
      We force particular alignment when we generate attribute structures
      when generation MODULE_VERSION() data and we need to make sure that
      this alignment is followed when we iterate over these structures,
      otherwise we may crash on platforms whose natural alignment is not
      sizeof(void *), such as m68k.
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarDmitry Torokhov <dtor@vmware.com>
      [ There are more issues here, but the fixes are incredibly ugly - Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      98562ad8