1. 31 Aug, 2010 9 commits
    • Anton Vorontsov's avatar
      powerpc/85xx: Add P1021 PCI IDs and quirks · a28dec2f
      Anton Vorontsov authored
      This is needed for proper PCI-E support on P1021 SoCs.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@mvista.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      a28dec2f
    • Julia Lawall's avatar
      arch/powerpc/sysdev/qe_lib/qe.c: Add of_node_put to avoid memory leak · 5aac4d73
      Julia Lawall authored
      Add a call to of_node_put in the error handling code following a call to
      of_find_compatible_node.
      
      The semantic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      expression E,E1;
      statement S;
      @@
      
      *x =
      (of_find_node_by_path
      |of_find_node_by_name
      |of_find_node_by_phandle
      |of_get_parent
      |of_get_next_parent
      |of_get_next_child
      |of_find_compatible_node
      |of_match_node
      )(...);
      ...
      if (x == NULL) S
      <... when != x = E
      *if (...) {
        ... when != of_node_put(x)
            when != if (...) { ... of_node_put(x); ... }
      (
        return <+...x...+>;
      |
      *  return ...;
      )
      }
      ...>
      of_node_put(x);
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Acked-by: default avatarTimur Tabi <timur@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      5aac4d73
    • Julia Lawall's avatar
      arch/powerpc/platforms/83xx/mpc837x_mds.c: Add missing iounmap · fa9fc821
      Julia Lawall authored
      The function of_iomap returns the result of calling ioremap, so iounmap
      should be called on the result in the error handling code, as done in the
      normal exit of the function.
      
      The sematic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      expression E,E1;
      identifier l;
      statement S;
      @@
      
      *x = of_iomap(...);
      ...  when != iounmap(x)
           when != if (...) { ... iounmap(x); ... }
           when != E = x
           when any
      (
      if (x == NULL) S
      |
      if (...) {
        ... when != iounmap(x)
            when != if (...) { ... iounmap(x); ... }
      (
        return <+...x...+>;
      |
      *  return ...;
      )
      }
      )
      ... when != x = E1
          when any
      iounmap(x);
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      fa9fc821
    • Li Yang's avatar
      fsl_rio: fix compile errors · ff33f182
      Li Yang authored
      Fixes the following compile problem on E500 platforms:
      arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
      arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared (first use in this function)
      
      Also fixes the compile problem on non-E500 platforms.
      Signed-off-by: default avatarLi Yang <leoli@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      ff33f182
    • Kumar Gala's avatar
      powerpc/85xx: Fix compile issue with p1022_ds due to lmb rename to memblock · dc1c41f4
      Kumar Gala authored
      arch/powerpc/platforms/85xx/p1022_ds.c:22:23: error: linux/lmb.h: No such file or directory
      arch/powerpc/platforms/85xx/p1022_ds.c: In function 'p1022_ds_setup_arch':
      arch/powerpc/platforms/85xx/p1022_ds.c:100: error: implicit declaration of function 'memblock_end_of_DRAM'
      arch/powerpc/platforms/85xx/p1022_ds.c: At top level:
      arch/powerpc/platforms/85xx/p1022_ds.c:147: error: 'udbg_progress' undeclared here (not in a function)
      make[2]: *** [arch/powerpc/platforms/85xx/p1022_ds.o] Error 1
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      dc1c41f4
    • Alexander Graf's avatar
      powerpc/85xx: Fix compilation of mpc85xx_mds.c · 6d4f2fb0
      Alexander Graf authored
      Commit 99d8238f berobbed the for_each loop of its iterator! Let's be
      nice and give it back, so it compiles for us.
      
      CC: Anton Vorontsov <avorontsov@mvista.com>
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      6d4f2fb0
    • Michael Neuling's avatar
      powerpc: Don't use kernel stack with translation off · 54a83404
      Michael Neuling authored
      In f761622e we changed
      early_setup_secondary so it's called using the proper kernel stack
      rather than the emergency one.
      
      Unfortunately, this stack pointer can't be used when translation is off
      on PHYP as this stack pointer might be outside the RMO.  This results in
      the following on all non zero cpus:
        cpu 0x1: Vector: 300 (Data Access) at [c00000001639fd10]
            pc: 000000000001c50c
            lr: 000000000000821c
            sp: c00000001639ff90
           msr: 8000000000001000
           dar: c00000001639ffa0
         dsisr: 42000000
          current = 0xc000000016393540
          paca    = 0xc000000006e00200
            pid   = 0, comm = swapper
      
      The original patch was only tested on bare metal system, so it never
      caught this problem.
      
      This changes __secondary_start so that we calculate the new stack
      pointer but only start using it after we've called early_setup_secondary.
      
      With this patch, the above problem goes away.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      54a83404
    • Paul Mackerras's avatar
      powerpc/perf_event: Reduce latency of calling perf_event_do_pending · b0d278b7
      Paul Mackerras authored
      Commit 0fe1ac48 ("powerpc/perf_event: Fix oops due to
      perf_event_do_pending call") moved the call to perf_event_do_pending
      in timer_interrupt() down so that it was after the irq_enter() call.
      Unfortunately this moved it after the code that checks whether it
      is time for the next decrementer clock event.  The result is that
      the call to perf_event_do_pending() won't happen until the next
      decrementer clock event is due.  This was pointed out by Milton
      Miller.
      
      This fixes it by moving the check for whether it's time for the
      next decrementer clock event down to the point where we're about
      to call the event handler, after we've called perf_event_do_pending.
      
      This has the side effect that on old pre-Core99 Powermacs where we
      use the ppc_n_lost_interrupts mechanism to replay interrupts, a
      replayed interrupt will incur a little more latency since it will
      now do the code from the irq_enter down to the irq_exit, that it
      used to skip.  However, these machines are now old and rare enough
      that this doesn't matter.  To make it clear that ppc_n_lost_interrupts
      is only used on Powermacs, and to speed up the code slightly on
      non-Powermac ppc32 machines, the code that tests ppc_n_lost_interrupts
      is now conditional on CONFIG_PMAC as well as CONFIG_PPC32.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      b0d278b7
    • Matthew McClintock's avatar
      powerpc/kexec: Adds correct calling convention for kexec purgatory · 4562c986
      Matthew McClintock authored
      Call kexec purgatory code correctly. We were getting lucky before.
      If you examine the powerpc 32bit kexec "purgatory" code you will
      see it expects the following:
      
      >From kexec-tools: purgatory/arch/ppc/v2wrap_32.S
      -> calling convention:
      ->   r3 = physical number of this cpu (all cpus)
      ->   r4 = address of this chunk (master only)
      
      As such, we need to set r3 to the current core, r4 happens to be
      unused by purgatory at the moment but we go ahead and set it
      here as well
      Signed-off-by: default avatarMatthew McClintock <msm@freescale.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4562c986
  2. 29 Aug, 2010 3 commits
  3. 28 Aug, 2010 28 commits