1. 29 3月, 2011 2 次提交
  2. 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
  3. 10 3月, 2011 1 次提交
  4. 21 1月, 2011 1 次提交
  5. 09 7月, 2010 1 次提交
  6. 15 6月, 2010 1 次提交
  7. 06 5月, 2010 1 次提交
  8. 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
  9. 19 2月, 2010 1 次提交
  10. 09 2月, 2010 1 次提交
  11. 18 12月, 2009 1 次提交
  12. 09 12月, 2009 1 次提交
  13. 24 11月, 2009 1 次提交
  14. 30 10月, 2009 1 次提交
  15. 20 8月, 2009 1 次提交
  16. 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
  17. 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
  18. 21 5月, 2009 1 次提交
  19. 15 5月, 2009 1 次提交
  20. 28 4月, 2009 1 次提交
    • Y
      irq: change ->set_affinity() to return status · d5dedd45
      Yinghai Lu 提交于
      according to Ingo, change set_affinity() in irq_chip should return int,
      because that way we can handle failure cases in a much cleaner way, in
      the genirq layer.
      
      v2: fix two typos
      
      [ Impact: extend API ]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: linux-arch@vger.kernel.org
      LKML-Reference: <49F654E9.4070809@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d5dedd45
  21. 06 4月, 2009 1 次提交
  22. 13 1月, 2009 2 次提交
  23. 13 12月, 2008 1 次提交
  24. 03 12月, 2008 1 次提交
  25. 01 12月, 2008 1 次提交
    • A
      powerpc/mpic: Don't reset affinity for secondary MPIC on boot · cc353c30
      Arnd Bergmann 提交于
      Kexec/kdump currently fails on the IBM QS2x blades when the kexec happens
      on a CPU other than the initial boot CPU.  It turns out that this is the
      result of mpic_init trying to set affinity of each interrupt vector to the
      current boot CPU.
      
      As far as I can tell,  the same problem is likely to exist on any
      secondary MPIC, because they have to deliver interrupts to the first
      output all the time. There are two potential solutions for this: either
      not set up affinity at all for secondary MPICs, or assume that a single
      CPU output is connected to the upstream interrupt controller and hardcode
      affinity to that per architecture.
      
      This patch implements the second approach, defaulting to the first output.
      Currently, all known secondary MPICs are routed to their upstream port
      using the first destination, so we hardcode that.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      cc353c30
  26. 19 11月, 2008 1 次提交
  27. 31 10月, 2008 1 次提交
  28. 26 6月, 2008 1 次提交
  29. 09 6月, 2008 2 次提交
  30. 23 5月, 2008 2 次提交
  31. 07 4月, 2008 1 次提交
  32. 26 2月, 2008 1 次提交
  33. 25 1月, 2008 1 次提交
  34. 24 1月, 2008 1 次提交