1. 07 3月, 2008 1 次提交
  2. 21 2月, 2008 1 次提交
  3. 07 2月, 2008 1 次提交
  4. 06 2月, 2008 3 次提交
    • J
      [POWERPC] arch/powerpc/sysdev: Add missing of_node_put · b1725c93
      Julia Lawall 提交于
      The functions of_find_compatible_node and of_find_node_by_type both
      call of_node_get on their result.  So any error handling code
      thereafter should call of_node_put(np).  This is taken care of in the
      case where there is a goto out, but not when there is a direct return.
      
      The function irq_alloc_host puts np into the returned structure, which is
      stored in the global variable mpc8xx_pic_host, so the reference count
      should be set for the lifetime of that variable.  The current solution ups
      the reference count again in the argument to irq_alloc_host so that it can
      be decremented on the way out.  This seems a bit unnecessary, and also
      doesn't work in the case where irq_alloc_host fails, because then the
      reference count only goes does by one, whereas it should go down by two.  A
      better solution is to not increment the reference count in the argument to
      irq_alloc_host and only decrement it on the way out in an error case.
      
      The problem was found using the following semantic match.
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @@
      type T,T1,T2;
      identifier E;
      statement S;
      expression x1,x2,x3;
      int ret;
      @@
      
        T E;
        ...
      * E = \(of_get_parent\|of_find_compatible_node\)(...);
        if (E == NULL) S
        ... when != of_node_put(...,(T1)E,...)
            when != if (E != NULL) { ... of_node_put(...,(T1)E,...); ...}
            when != x1 = (T1)E
            when != E = x3;
            when any
        if (...) {
          ... when != of_node_put(...,(T2)E,...)
              when != if (E != NULL) { ... of_node_put(...,(T2)E,...); ...}
              when != x2 = (T2)E
      (
      *   return;
      |
      *   return ret;
      )
        }
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Kumar Gala <galak@gate.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b1725c93
    • A
      [POWERPC] qe_lib: fix few fluffy negligences · d8985fd2
      Anton Vorontsov 提交于
      One is intoduced by me (of_node_put() absence) and another was
      present already (not checking for NULL).
      
      Found by Stephen Rothwell.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      d8985fd2
    • K
      [POWERPC] FSL: fix mpc83xx_spi device registration · dc4e4207
      Kim Phillips 提交于
      calling platform_device_register after platform_device_alloc causes
      this:
      
      kobject (c3841a70): tried to init an initialized object, something is seriously wrong.
      Call Trace:
      [c381fe20] [c0007bb8] show_stack+0x3c/0x194 (unreliable)
      [c381fe50] [c01322a8] kobject_init+0xb8/0xbc
      [c381fe60] [c01591cc] device_initialize+0x30/0x9c
      [c381fe80] [c015ee34] platform_device_register+0x1c/0x34
      [c381fea0] [c02f1fe0] of_fsl_spi_probe+0x21c/0x22c
      [c381ff30] [c02f2044] fsl_spi_init+0x54/0x160
      [c381ff60] [c02f3924] __machine_initcall_mpc832x_rdb_mpc832x_spi_init+0x120/0x138
      [c381ff70] [c02e61b4] kernel_init+0x98/0x284
      [c381fff0] [c000f740] kernel_thread+0x44/0x60
      
      fixed by calling platform_device_add (second half of
      platform_device_register) instead.
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      dc4e4207
  5. 28 1月, 2008 8 次提交
  6. 27 1月, 2008 1 次提交
  7. 26 1月, 2008 1 次提交
  8. 25 1月, 2008 2 次提交
  9. 24 1月, 2008 10 次提交
  10. 17 1月, 2008 1 次提交
  11. 09 1月, 2008 1 次提交
  12. 08 1月, 2008 1 次提交
  13. 28 12月, 2007 2 次提交
    • O
      [POWERPC] pasemi: Distribute interrupts evenly across cpus · d87bf3be
      Olof Johansson 提交于
      By default the OpenPIC on PWRficient will bias to one core (since that
      will improve changes of the other core being able to stay idle/powered
      down). However, this conflicts with most irq load balancing schemes,
      since setting an interrupt to be delivered to either core doesn't really
      result in the load being shared. It also doesn't work well with the
      soft irq disable feature of PPC, since EE will stay on until the first
      interrupt is taken while soft disabled.
      
      Set the gconf0 config bit that enables even distribution of interrupts
      among the two cores.
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      d87bf3be
    • O
      [POWERPC] pasemi: Implement NMI support · f365355e
      Olof Johansson 提交于
      Some PWRficient-based boards have a NMI button that's wired up to a GPIO
      as interrupt source. By configuring the openpic accordingly, these get
      delivered as a machine check with high priority, instead of as an external
      interrupt.
      
      The device tree contains a property "nmi-source" in the openpic node
      for these systems, and it's the (hwirq) source for the input.
      
      Also, for these interrupts, the IACK is read from another register than
      the regular (MCACK instead), but they are EOI'd as usual. So implement
      said function for the mpic driver.
      
      Finally, move a couple of external function defines to include/ instead
      of local under sysdev. Being able to mask/unmask and eoi directly saves
      us from setting up a dummy irq handler that will never be called.
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      f365355e
  14. 24 12月, 2007 7 次提交