1. 31 3月, 2009 1 次提交
    • R
      PM: Introduce functions for suspending and resuming device interrupts · 0a0c5168
      Rafael J. Wysocki 提交于
      Introduce helper functions allowing us to prevent device drivers from
      getting any interrupts (without disabling interrupts on the CPU)
      during suspend (or hibernation) and to make them start to receive
      interrupts again during the subsequent resume.  These functions make it
      possible to keep timer interrupts enabled while the "late" suspend and
      "early" resume callbacks provided by device drivers are being
      executed.  In turn, this allows device drivers' "late" suspend and
      "early" resume callbacks to sleep, execute ACPI callbacks etc.
      
      The functions introduced here will be used to rework the handling of
      interrupts during suspend (hibernation) and resume.  Namely,
      interrupts will only be disabled on the CPU right before suspending
      sysdevs, while device drivers will be prevented from receiving
      interrupts, with the help of the new helper function, before their
      "late" suspend callbacks run (and analogously during resume).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      0a0c5168
  2. 29 3月, 2009 1 次提交
    • R
      Fix build error in <linux/irq.h> · 503e5763
      Ralf Baechle 提交于
      <linux/irq.h> relies on <linux/gfp.h> and <linux/topology.h> having been
      included previous.  If not, the errors like below will result.
      
          CC      arch/mips/mti-malta/malta-int.o
        In file included from arch/mips/mti-malta/malta-int.c:25:
        include/linux/irq.h: In function ‘init_alloc_desc_masks’:
        include/linux/irq.h:444: error: implicit declaration of function ‘cpu_to_node’
        include/linux/irq.h:446: error: ‘GFP_ATOMIC’ undeclared (first use in this function)
        include/linux/irq.h:446: error: (Each undeclared identifier is reported only once
        include/linux/irq.h:446: error: for each function it appears in.)
        make[3]: *** [arch/mips/mti-malta/malta-int.o] Error 1
        make[2]: *** [arch/mips/mti-malta] Error 2
        make[1]: *** [sub-make] Error 2
      
      Fixed by including the two missing headers.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      503e5763
  3. 24 3月, 2009 1 次提交
    • T
      genirq: add threaded interrupt handler support · 3aa551c9
      Thomas Gleixner 提交于
      Add support for threaded interrupt handlers:
      
      A device driver can request that its main interrupt handler runs in a
      thread. To achive this the device driver requests the interrupt with
      request_threaded_irq() and provides additionally to the handler a
      thread function. The handler function is called in hard interrupt
      context and needs to check whether the interrupt originated from the
      device. If the interrupt originated from the device then the handler
      can either return IRQ_HANDLED or IRQ_WAKE_THREAD. IRQ_HANDLED is
      returned when no further action is required. IRQ_WAKE_THREAD causes
      the genirq code to invoke the threaded (main) handler. When
      IRQ_WAKE_THREAD is returned handler must have disabled the interrupt
      on the device level. This is mandatory for shared interrupt handlers,
      but we need to do it as well for obscure x86 hardware where disabling
      an interrupt on the IO_APIC level redirects the interrupt to the
      legacy PIC interrupt lines.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      3aa551c9
  4. 13 3月, 2009 2 次提交
  5. 12 3月, 2009 2 次提交
  6. 22 1月, 2009 1 次提交
    • Y
      irq: clean up irq stat methods · d52a61c0
      Yinghai Lu 提交于
      David Miller suggested, related to a kstat_irqs related build breakage:
      
      > Either linux/kernel_stat.h provides the kstat_incr_irqs_this_cpu
      > interface or linux/irq.h does, not both.
      
      So move them to kernel_stat.h.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d52a61c0
  7. 12 1月, 2009 2 次提交
    • M
      cpumask: fix bug in use cpumask_var_t in irq_desc · 802bf931
      Mike Travis 提交于
      Impact: fix bug where new irq_desc uses old cpumask pointers which are freed.
      
      As Yinghai pointed out, init_copy_one_irq_desc() copies the old desc to
      the new desc overwriting the cpumask pointers.  Since the old_desc and
      the cpumask pointers are freed, then memory corruption will occur if
      these old pointers are used.
      
      Move the allocation of these pointers to after the copy.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      802bf931
    • M
      cpumask: update irq_desc to use cpumask_var_t · 7f7ace0c
      Mike Travis 提交于
      Impact: reduce memory usage, use new cpumask API.
      
      Replace the affinity and pending_masks with cpumask_var_t's.  This adds
      to the significant size reduction done with the SPARSE_IRQS changes.
      
      The added functions (init_alloc_desc_masks & init_copy_desc_masks) are
      in the include file so they can be inlined (and optimized out for the
      !CONFIG_CPUMASKS_OFFSTACK case.)  [Naming chosen to be consistent with
      the other init*irq functions, as well as the backwards arg declaration
      of "from, to" instead of the more common "to, from" standard.]
      
      Includes a slight change to the declaration of struct irq_desc to embed
      the pending_mask within ifdef(CONFIG_SMP) to be consistent with other
      references, and some small changes to Xen.
      
      Tested: sparse/non-sparse/cpumask_offstack/non-cpumask_offstack/nonuma/nosmp on x86_64
      Signed-off-by: NMike Travis <travis@sgi.com>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Cc: virtualization@lists.osdl.org
      Cc: xen-devel@lists.xensource.com
      Cc: Yinghai Lu <yhlu.kernel@gmail.com>
      7f7ace0c
  8. 11 1月, 2009 1 次提交
  9. 29 12月, 2008 1 次提交
  10. 27 12月, 2008 1 次提交
  11. 26 12月, 2008 1 次提交
  12. 19 12月, 2008 1 次提交
  13. 17 12月, 2008 1 次提交
    • Y
      x86, sparseirq: move irq_desc according to smp_affinity, v7 · 48a1b10a
      Yinghai Lu 提交于
      Impact: improve NUMA handling by migrating irq_desc on smp_affinity changes
      
      if CONFIG_NUMA_MIGRATE_IRQ_DESC is set:
      
      -  make irq_desc to go with affinity aka irq_desc moving etc
      -  call move_irq_desc in irq_complete_move()
      -  legacy irq_desc is not moved, because they are allocated via static array
      
      for logical apic mode, need to add move_desc_in_progress_in_same_domain,
      otherwise it will not be moved ==> also could need two phases to get
      irq_desc moved.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      48a1b10a
  14. 13 12月, 2008 1 次提交
  15. 09 12月, 2008 1 次提交
    • Y
      sparseirq: fix Alpha build failure · 240d367b
      Yinghai Lu 提交于
      Impact: build fix on Alpha
      
      -tip testing found this build failure on the Alpha defconfig:
      
      /home/mingo/tip/fs/proc/stat.c: In function 'show_stat':
      /home/mingo/tip/fs/proc/stat.c:48: error: implicit declaration of function 'for_each_irq_desc'
      /home/mingo/tip/fs/proc/stat.c:48: error: expected ';' before '{' token
      
      can not use irq_desc() in stat.c on older architectures.
      Signed-off-by: NYinghai Lu <yinghai@kernel.orgg>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      240d367b
  16. 08 12月, 2008 1 次提交
    • Y
      sparse irq_desc[] array: core kernel and x86 changes · 0b8f1efa
      Yinghai Lu 提交于
      Impact: new feature
      
      Problem on distro kernels: irq_desc[NR_IRQS] takes megabytes of RAM with
      NR_CPUS set to large values. The goal is to be able to scale up to much
      larger NR_IRQS value without impacting the (important) common case.
      
      To solve this, we generalize irq_desc[NR_IRQS] to an (optional) array of
      irq_desc pointers.
      
      When CONFIG_SPARSE_IRQ=y is used, we use kzalloc_node to get irq_desc,
      this also makes the IRQ descriptors NUMA-local (to the site that calls
      request_irq()).
      
      This gets rid of the irq_cfg[] static array on x86 as well: irq_cfg now
      uses desc->chip_data for x86 to store irq_cfg.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0b8f1efa
  17. 23 11月, 2008 2 次提交
  18. 10 11月, 2008 1 次提交
  19. 18 10月, 2008 1 次提交
  20. 16 10月, 2008 17 次提交