1. 07 12月, 2011 4 次提交
  2. 25 11月, 2011 1 次提交
  3. 08 11月, 2011 1 次提交
  4. 04 11月, 2011 1 次提交
  5. 20 9月, 2011 1 次提交
    • T
      powerpc/mpic: Add support for discontiguous cores · 14b92470
      Timur Tabi 提交于
      There is one place in the MPIC driver that assumes that the cores are numbered
      from 0 to n-1.  However, this is not true if the CPUs are not numbered
      sequentially.  This can happen on a eight-core SOC where cores two and three
      are removed in the device tree.  So instead of blindly looping, we iterate
      over the discovered CPUs and use the SMP ID as the index.
      
      This means that we no longer ask the MPIC how many CPUs there are, so
      we also delete mpic->num_cpus.
      
      We also catch if the number of CPUs in the SOC exceeds the number that the
      MPIC supports.  This should never happen, of course, but it's good to be
      sure.
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      14b92470
  6. 29 6月, 2011 1 次提交
  7. 23 6月, 2011 1 次提交
  8. 20 6月, 2011 1 次提交
  9. 19 5月, 2011 6 次提交
  10. 12 5月, 2011 1 次提交
  11. 04 5月, 2011 1 次提交
  12. 29 3月, 2011 2 次提交
  13. 21 3月, 2011 2 次提交
    • M
      powerpc: Factoring mpic cpu id fetching into a function · d6a2639b
      Meador Inge 提交于
      The following code snippet:
      
      	unsigned int cpu = 0;
      	if (mpic->flags & MPIC_PRIMARY)
      		cpu = hard_smp_processor_id();
      
      is seen in several places in the 'mpic.c' code.  This changeset factors
      that pattern out into a helper function called 'mpic_processor_id'.
      Signed-off-by: NMeador Inge <meador_inge@mentor.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d6a2639b
    • M
      powerpc: Make MPIC honor the "pic-no-reset" device tree property · dfec2202
      Meador Inge 提交于
      This property, defined in the Open PIC binding, tells the kernel not to use
      the reset bit in the global configuration register.  Additionally, its
      presence mandates that only sources which are actually used (i.e. appear in
      the device tree) should have their VECPRI bits initialized.
      
      Although, "pic-no-reset" can be used for the same use cases that
      "protected-sources" is covering, the "protected-sources" implementation was
      left completely intact.  This is a more pragmatic approach as there are
      already several existing systems which use protected sources.  If
      "pic-no-reset" *and* "protected-sources" are both used, however, then
      "pic-no-reset" takes precedence in terms of the init behavior and the
      sanity checks done by protected sources will still take place.
      Signed-off-by: NMeador Inge <meador_inge@mentor.com>
      Cc: Hollis Blanchard <hollis_blanchard@mentor.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      dfec2202
  14. 10 3月, 2011 1 次提交
  15. 21 1月, 2011 1 次提交
  16. 09 7月, 2010 1 次提交
  17. 15 6月, 2010 1 次提交
  18. 06 5月, 2010 1 次提交
  19. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  20. 19 2月, 2010 1 次提交
  21. 09 2月, 2010 1 次提交
  22. 18 12月, 2009 1 次提交
  23. 09 12月, 2009 1 次提交
  24. 24 11月, 2009 1 次提交
  25. 30 10月, 2009 1 次提交
  26. 20 8月, 2009 1 次提交
  27. 08 7月, 2009 1 次提交
    • A
      powerpc: Don't use alloc_bootmem() in init_IRQ() path · ea96025a
      Anton Vorontsov 提交于
      This patch fixes various badnesses like this for all interrupt
      controllers:
      
      ------------[ cut here ]------------
      Badness at c04db9dc [verbose debug info unavailable]
      NIP: c04db9dc LR: c04db9ac CTR: 00000000
      REGS: c053de30 TRAP: 0700   Not tainted  (2.6.31-rc1-00432-ge69b2b5-dirty)
      MSR: 00021000 <ME,CE>  CR: 22020084  XER: 00000000
      TASK = c0500480[0] 'swapper' THREAD: c053c000
      GPR00: 00000001 c053dee0 c0500480 00000000 00000050 00000020 3fffffff 00000000
      GPR08: 00000001 c0540000 e0080080 00000000 22000084 64183600 3ff8f800 00000000
      GPR16: 841b0240 449a0303 00000000 00000000 00000000 00000000 00000000 c04f5bf4
      GPR24: 00000000 00000000 00000000 00000050 00000020 00000000 3fffffff 00000050
      NIP [c04db9dc] alloc_arch_preferred_bootmem+0x48/0x74
      LR [c04db9ac] alloc_arch_preferred_bootmem+0x18/0x74
      Call Trace:
      [c053dee0] [c000a5a4] __of_address_to_resource+0x44/0xd0 (unreliable)
      [c053def0] [c04dba58] ___alloc_bootmem_nopanic+0x50/0x108
      [c053df20] [c04dbb28] ___alloc_bootmem+0x18/0x50
      [c053df30] [c04d5de0] qe_ic_init+0x5c/0x1b0
      [c053df70] [c04d77b0] mpc85xx_mds_pic_init+0xb8/0x10c
      [c053dfb0] [c04cf374] init_IRQ+0x28/0x3c
      
      p.s. commit 85355bb2 ("powerpc: Fix
      mpic alloc warning") missed some alloc_bootmem() instances, this is
      now fixed.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Acked-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ea96025a
  28. 26 6月, 2009 2 次提交
    • K
      powerpc: Fix mpic alloc warning · 85355bb2
      Kumar Gala 提交于
      Since we can use kmalloc earlier we are getting the following since the
      mpic_alloc() code calls alloc_bootmem().  Move to using kzalloc() to
      remove the warning.
      
      ------------[ cut here ]------------
      Badness at c0583248 [verbose debug info unavailable]
      NIP: c0583248 LR: c0583210 CTR: 00000004
      REGS: c0741de0 TRAP: 0700   Not tainted  (2.6.30-06736-g12a31df)
      MSR: 00021000 <ME,CE>  CR: 22024024  XER: 00000000
      TASK = c070d3b8[0] 'swapper' THREAD: c0740000 CPU: 0
      <6>GPR00: 00000001 c0741e90 c070d3b8 00000001 00000210 00000020 3fffffff 00000000
      <6>GPR08: 00000000 c0c85700 c04f8c40 0000002d 22044022 1004a388 7ffd9400 00000000
      <6>GPR16: 00000000 7ffcd100 7ffcd100 7ffcd100 c04f8c40 00000000 c059f62c c075a0c0
      <6>GPR24: c059f648 00000000 0000000f 00000210 00000020 00000000 3fffffff 00000210
      NIP [c0583248] alloc_arch_preferred_bootmem+0x50/0x80
      LR [c0583210] alloc_arch_preferred_bootmem+0x18/0x80
      Call Trace:
      [c0741e90] [c07343b0] devtree_lock+0x0/0x24 (unreliable)
      [c0741ea0] [c0583b14] ___alloc_bootmem_nopanic+0x54/0x108
      [c0741ee0] [c0583e18] ___alloc_bootmem+0x18/0x50
      [c0741ef0] [c057b9cc] mpic_alloc+0x48/0x710
      [c0741f40] [c057ecf4] mpc85xx_ds_pic_init+0x190/0x1b8
      [c0741f90] [c057633c] init_IRQ+0x24/0x34
      [c0741fa0] [c05738b8] start_kernel+0x260/0x3dc
      [c0741ff0] [c00003c8] skpinv+0x2e0/0x31c
      Instruction dump:
      409e001c 7c030378 80010014 83e1000c 38210010 7c0803a6 4e800020 3d20c0c8
      39295700 80090004 7c000034 5400d97e <0f000000> 2f800000 409e001c 38800000
      
      BenH: Changed to use GFP_KERNEL, the allocator will do the right thing
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      85355bb2
    • B
      powerpc/mpic: Fix mapping of "DCR" based MPIC variants · 5a2642f6
      Benjamin Herrenschmidt 提交于
      Commit 31207dab
      "Fix incorrect allocation of interrupt rev-map"
      introduced a regression crashing on boot on machines using
      a "DCR" based MPIC, such as the Cell blades.
      
      The reason is that the irq host data structure is initialized
      much later as a result of that patch, causing our calls to
      mpic_map() do be done before we have a host setup.
      
      Unfortunately, this breaks _mpic_map_dcr() which uses the
      mpic->irqhost to get to the device node.
      
      This fixes it by, instead, passing the device node explicitely
      to mpic_map().
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NAkira Tsukamoto <akirat@rd.scei.sony.co.jp>
      5a2642f6
  29. 21 5月, 2009 1 次提交