1. 12 1月, 2009 1 次提交
    • 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
  2. 29 12月, 2008 1 次提交
  3. 27 12月, 2008 1 次提交
  4. 26 12月, 2008 1 次提交
  5. 19 12月, 2008 1 次提交
  6. 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
  7. 13 12月, 2008 1 次提交
  8. 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
  9. 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
  10. 23 11月, 2008 2 次提交
  11. 10 11月, 2008 1 次提交
  12. 18 10月, 2008 1 次提交
  13. 16 10月, 2008 20 次提交
  14. 22 7月, 2008 1 次提交
  15. 12 7月, 2008 1 次提交
  16. 05 6月, 2008 1 次提交
    • M
      genirq: Expose default irq affinity mask (take 3) · 18404756
      Max Krasnyansky 提交于
      Current IRQ affinity interface does not provide a way to set affinity
      for the IRQs that will be allocated/activated in the future.
      This patch creates /proc/irq/default_smp_affinity that lets users set
      default affinity mask for the newly allocated IRQs. Changing the default
      does not affect affinity masks for the currently active IRQs, they
      have to be changed explicitly.
      
      Updated based on Paul J's comments and added some more documentation.
      Signed-off-by: NMax Krasnyansky <maxk@qualcomm.com>
      Cc: pj@sgi.com
      Cc: a.p.zijlstra@chello.nl
      Cc: tglx@linutronix.de
      Cc: rdunlap@xenotime.net
      Cc: mingo@elte.hu
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      18404756
  17. 02 5月, 2008 1 次提交
    • T
      genirq: reenable a nobody cared disabled irq when a new driver arrives · 1adb0850
      Thomas Gleixner 提交于
      Uwe Kleine-Koenig has some strange hardware where one of the shared
      interrupts can be asserted during boot before the appropriate driver
      loads. Requesting the shared irq line from another driver result in a
      spurious interrupt storm which finally disables the interrupt line.
      
      I have seen similar behaviour on resume before (the hardware does not
      work anymore so I can not verify).
      
      Change the spurious disable logic to increment the disable depth and
      mark the interrupt with an extra flag which allows us to reenable the
      interrupt when a new driver arrives which requests the same irq
      line. In the worst case this will disable the irq again via the
      spurious trap, but there is a decent chance that the new driver is the
      one which can handle the already asserted interrupt and makes the box
      usable again.
      
      Eric Biederman said further: This case also happens on a regular basis
      in kdump kernels where we deliberately don't shutdown the hardware
      before starting the new kernel.  This patch should reduce the need for
      using irqpoll in that situation by a small amount.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-and-Acked-by: NUwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
      1adb0850
  18. 17 4月, 2008 1 次提交
    • R
      [S390] genirq/clockevents: move irq affinity prototypes/inlines to interrupt.h · d7b90689
      Russell King 提交于
      > Generic code is not supposed to include irq.h. Replace this include
      > by linux/hardirq.h instead and add/replace an include of linux/irq.h
      > in asm header files where necessary.
      > This change should only matter for architectures that make use of
      > GENERIC_CLOCKEVENTS.
      > Architectures in question are mips, x86, arm, sh, powerpc, uml and sparc64.
      >
      > I did some cross compile tests for mips, x86_64, arm, powerpc and sparc64.
      > This patch fixes also build breakages caused by the include replacement in
      > tick-common.h.
      
      I generally dislike adding optional linux/* includes in asm/* includes -
      I'm nervous about this causing include loops.
      
      However, there's a separate point to be discussed here.
      
      That is, what interfaces are expected of every architecture in the kernel.
      If generic code wants to be able to set the affinity of interrupts, then
      that needs to become part of the interfaces listed in linux/interrupt.h
      rather than linux/irq.h.
      
      So what I suggest is this approach instead (against Linus' tree of a
      couple of days ago) - we move irq_set_affinity() and irq_can_set_affinity()
      to linux/interrupt.h, change the linux/irq.h includes to linux/interrupt.h
      and include asm/irq_regs.h where needed (asm/irq_regs.h is supposed to be
      rarely used include since not much touches the stacked parent context
      registers.)
      
      Build tested on ARM PXA family kernels and ARM's Realview platform
      kernels which both use genirq.
      
      [ tglx@linutronix.de: add GENERIC_HARDIRQ dependencies ]
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      d7b90689
  19. 14 2月, 2008 1 次提交
  20. 09 2月, 2008 1 次提交
    • R
      IRQ_NOPROBE helper functions · 46f4f8f6
      Ralf Baechle 提交于
      Probing non-ISA interrupts using the handle_percpu_irq as their handle_irq
      method may crash the system because handle_percpu_irq does not check
      IRQ_WAITING.  This for example hits the MIPS Qemu configuration.
      
      This patch provides two helper functions set_irq_noprobe and set_irq_probe to
      set rsp.  clear the IRQ_NOPROBE flag.  The only current caller is MIPS code
      but this really belongs into generic code.
      
      As an aside, interrupt probing these days has become a mostly obsolete if not
      dangerous art.  I think Linux interrupts should be changed to default to
      non-probing but that's subject of this patch.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-and-tested-by: NRob Landley <rob@landley.net>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      46f4f8f6