1. 13 1月, 2009 1 次提交
  2. 12 1月, 2009 8 次提交
    • M
      cpumask, irq: non-x86 build failures · 92296c6d
      Mike Travis 提交于
      Ingo Molnar wrote:
      
      > All non-x86 architectures fail to build:
      >
      > In file included from /home/mingo/tip/include/linux/random.h:11,
      >                  from /home/mingo/tip/include/linux/stackprotector.h:6,
      >                  from /home/mingo/tip/init/main.c:17:
      > /home/mingo/tip/include/linux/irqnr.h:26:63: error: asm/irq_vectors.h: No such file or directory
      
      Do not include asm/irq_vectors.h in generic code - it's not available
      on all architectures.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      92296c6d
    • M
      kstat: modify kstat_irqs_legacy to be variable sized · 542d865b
      Mike Travis 提交于
      Impact: reduce memory usage.
      
      Allocate kstat_irqs_legacy based on nr_cpu_ids to deal with this
      memory usage bump when NR_CPUS bumped from 128 to 4096:
      
           8192   +253952    262144 +3100%  kstat_irqs_legacy(.bss)
      
      This is only when CONFIG_SPARSE_IRQS=y.
      Signed-off-by: NMike Travis <travis@sgi.com>
      542d865b
    • M
      irq: initialize nr_irqs based on nr_cpu_ids · 9332fccd
      Mike Travis 提交于
      Impact: Reduce memory usage.
      
      This is the second half of the changes to make the irq_desc_ptrs be
      variable sized based on nr_cpu_ids.  This is done by adding a new
      "max_nr_irqs" macro to irq_vectors.h (and a dummy in irqnr.h) to
      return a max NR_IRQS value based on NR_CPUS or nr_cpu_ids.
      
      This necessitated moving the define of MAX_IO_APICS to a separate
      file (asm/apicnum.h) so it could be included without the baggage
      of the other asm/apicdef.h declarations.
      Signed-off-by: NMike Travis <travis@sgi.com>
      9332fccd
    • M
      irq: allocate irq_desc_ptrs array based on nr_irqs · 0fa0ebbf
      Mike Travis 提交于
      Impact: allocate irq_desc_ptrs in preparation for making it variable-sized.
      
      This addresses this memory usage bump when NR_CPUS bumped from 128 to 4096:
      
          34816   +229376    264192  +658%  irq_desc_ptrs(.data.read_mostly)
      
      The patch is split into two parts, the first simply allocates the
      irq_desc_ptrs array.  Then next will deal with making it variable.
      This is only when CONFIG_SPARSE_IRQS=y.
      Signed-off-by: NMike Travis <travis@sgi.com>
      0fa0ebbf
    • M
      irq: use WARN() instead of WARN_ON(). · e2f4d065
      Mike Travis 提交于
      Impact: cleanup WARN msg.
      
      Ingo requested:
      > While at it, could you please also convert this to a WARN() construct
      > instead? (in a separate commit)
      
      ... and it shall be done.  ;-)
      Signed-off-by: NMike Travis <travis@sgi.com>
      e2f4d065
    • M
      irq: change references from NR_IRQS to nr_irqs · 9594949b
      Mike Travis 提交于
      Impact: preparation, cleanup, add KERN_INFO printk
      
      Modify references from NR_IRQS to nr_irqs as the later will become
      variable-sized based on nr_cpu_ids when CONFIG_SPARSE_IRQS=y.
      Signed-off-by: NMike Travis <travis@sgi.com>
      9594949b
    • 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
  3. 29 12月, 2008 1 次提交
    • I
      sparseirq: work around __weak alias bug · b2e2fe99
      Ingo Molnar 提交于
      Impact: fix boot crash if the kernel is built with certain GCC versions
      
      GCC has a bug with __weak alias functions: if the functions are in
      the same compilation unit as their call site, GCC can decide to
      inline them - and thus rob the linker of the opportunity to override
      the weak alias with the real thing.
      
      This can lead to the boot crash reported by Kamalesh Babulal:
      
       ACPI: Core revision 20080926
       Setting APIC routing to flat
       BUG: unable to handle kernel NULL pointer dereference at
       0000000000000000
       IP: [<ffffffff8021f9a8>] add_pin_to_irq_cpu+0x14/0x74
       PGD 0
       Oops: 0000 [#1] SMP
       [...]
      
      So move the arch_init_chip_data() function from handle.c to manage.c.
      Reported-by: NKamalesh Babulal <kamalesh@linux.vnet.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b2e2fe99
  4. 28 12月, 2008 2 次提交
  5. 27 12月, 2008 2 次提交
  6. 26 12月, 2008 4 次提交
  7. 18 12月, 2008 1 次提交
    • K
      locking, irq: enclose irq_desc_lock_class in CONFIG_LOCKDEP · 74c8a613
      KOSAKI Motohiro 提交于
      Impact: simplify code
      
      commit "08678b08: generic: sparse irqs: use irq_desc() [...]" introduced
      the irq_desc_lock_class variable.
      
      But it is used only if CONFIG_SPARSE_IRQ=Y or CONFIG_TRACE_IRQFLAGS=Y.
      Otherwise, following warnings happen:
      
      	CC      kernel/irq/handle.o
      	kernel/irq/handle.c:26: warning: 'irq_desc_lock_class' defined but not used
      
      Actually, current early_init_irq_lock_class has a bit strange and messy ifdef.
      In addition, it is not valueable.
      
      1. this function is protected by !CONFIG_SPARSE_IRQ, but that is not necessary.
         if CONFIG_SPARSE_IRQ=Y, desc of all irq number are initialized by NULL
         at first - then this function calling is safe.
      
      2. this function protected by CONFIG_TRACE_IRQFLAGS too. but it is not
         necessary either, because lockdep_set_class() doesn't have bad side
         effect even if CONFIG_TRACE_IRQFLAGS=n.
      
      This patch bloat kernel size a bit on CONFIG_TRACE_IRQFLAGS=n and
      CONFIG_SPARSE_IRQ=Y - but that's ok. early_init_irq_lock_class() is not
      a fastpatch at all.
      
      To avoid messy ifdefs is more important than a few bytes diet.
      Signed-off-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      74c8a613
  8. 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
  9. 08 12月, 2008 2 次提交
    • Y
      x86: use NR_IRQS_LEGACY · 99d093d1
      Yinghai Lu 提交于
      Impact: cleanup
      
      Introduce NR_IRQS_LEGACY instead of hard coded number.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      99d093d1
    • 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. 16 10月, 2008 18 次提交