1. 20 May, 2014 6 commits
    • Paul Gortmaker's avatar
      powerpc: Fix smp_processor_id() in preemptible splat in set_breakpoint · 21f58507
      Paul Gortmaker authored
      Currently, on 8641D, which doesn't set CONFIG_HAVE_HW_BREAKPOINT
      we get the following splat:
      
      BUG: using smp_processor_id() in preemptible [00000000] code: login/1382
      caller is set_breakpoint+0x1c/0xa0
      CPU: 0 PID: 1382 Comm: login Not tainted 3.15.0-rc3-00041-g2aafe1a4 #1
      Call Trace:
      [decd5d80] [c0008dc4] show_stack+0x50/0x158 (unreliable)
      [decd5dc0] [c03c6fa0] dump_stack+0x7c/0xdc
      [decd5de0] [c01f8818] check_preemption_disabled+0xf4/0x104
      [decd5e00] [c00086b8] set_breakpoint+0x1c/0xa0
      [decd5e10] [c00d4530] flush_old_exec+0x2bc/0x588
      [decd5e40] [c011c468] load_elf_binary+0x2ac/0x1164
      [decd5ec0] [c00d35f8] search_binary_handler+0xc4/0x1f8
      [decd5ef0] [c00d4ee8] do_execve+0x3d8/0x4b8
      [decd5f40] [c001185c] ret_from_syscall+0x0/0x38
       --- Exception: c01 at 0xfeee554
          LR = 0xfeee7d4
      
      The call path in this case is:
      
      	flush_thread
      	   --> set_debug_reg_defaults
      	     --> set_breakpoint
      	       --> __get_cpu_var
      
      Since preemption is enabled in the cleanup of flush thread, and
      there is no need to disable it, introduce the distinction between
      set_breakpoint and __set_breakpoint, leaving only the flush_thread
      instance as the current user of set_breakpoint.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      21f58507
    • Paul Gortmaker's avatar
      powerpc: Drop return value from set_breakpoint as it is unused · 04c32a51
      Paul Gortmaker authored
      None of the callers check the return value, so it might as
      well not have one at all.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      04c32a51
    • James Hogan's avatar
      powerpc: Remove non-uapi linkage.h export · dade934a
      James Hogan authored
      The arch/powerpc/include/asm/linkage.h is being unintentionally exported
      in the kernel headers since commit e1b5bb6d (consolidate
      cond_syscall and SYSCALL_ALIAS declarations) when
      arch/powerpc/include/uapi/asm/linkage.h was deleted but the header-y not
      removed from the Kbuild file. This happens because Makefile.headersinst
      still checks the old asm/ directory if the specified header doesn't
      exist in the uapi directory.
      
      The asm/linkage.h shouldn't ever have been exported anyway. No other
      arch does and it doesn't contain anything useful to userland, so remove
      the header-y line from the Kbuild file which triggers the export.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      dade934a
    • Gavin Shan's avatar
      powerpc/eeh: Fix build error for celleb · 1e54b938
      Gavin Shan authored
      Commit 7f52a526 ("powerpc/eeh: Allow to disable EEH") caused
      following build error with "celleb_defconfig" as being catched
      by Mikey on linux-next.
      
      arch/powerpc/kernel/eeh.c: In function 'eeh_init_proc':
      arch/powerpc/kernel/eeh.c:1173:37: error: 'powerpc_debugfs_root' \
      undeclared (first use in this function)
      arch/powerpc/kernel/eeh.c:1173:37: note: each undeclared identifier \
      is reported only once for each function it appears in
      Reported-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      1e54b938
    • Benjamin Herrenschmidt's avatar
      Merge branch 'merge' into next · c534bbe5
      Benjamin Herrenschmidt authored
      Merge "merge" branch to get two fairly important bug fixes:
      
      powerpc/powernv: Reset root port in firmware
      powerpc: irq work racing with timer interrupt can result in timer interrupt
      c534bbe5
    • Benjamin Herrenschmidt's avatar
      Revert "powerpc/powernv: Fundamental reset on PLX ports" · 965b5608
      Benjamin Herrenschmidt authored
      This reverts commit b2b5efcf.
      
      This code was way too board specific, there are quirks as to how
      the PERST line is wired on different boards, we'll have to revisit
      this using/creating appropriate firmware interfaces.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      965b5608
  2. 12 May, 2014 2 commits
    • Anton Blanchard's avatar
      powerpc: irq work racing with timer interrupt can result in timer interrupt hang · 8050936c
      Anton Blanchard authored
      I am seeing an issue where a CPU running perf eventually hangs.
      Traces show timer interrupts happening every 4 seconds even
      when a userspace task is running on the CPU. /proc/timer_list
      also shows pending hrtimers have not run in over an hour,
      including the scheduler.
      
      Looking closer, decrementers_next_tb is getting set to
      0xffffffffffffffff, and at that point we will never take
      a timer interrupt again.
      
      In __timer_interrupt() we set decrementers_next_tb to
      0xffffffffffffffff and rely on ->event_handler to update it:
      
              *next_tb = ~(u64)0;
              if (evt->event_handler)
                      evt->event_handler(evt);
      
      In this case ->event_handler is hrtimer_interrupt. This will eventually
      call back through the clockevents code with the next event to be
      programmed:
      
      static int decrementer_set_next_event(unsigned long evt,
                                            struct clock_event_device *dev)
      {
              /* Don't adjust the decrementer if some irq work is pending */
              if (test_irq_work_pending())
                      return 0;
              __get_cpu_var(decrementers_next_tb) = get_tb_or_rtc() + evt;
      
      If irq work came in between these two points, we will return
      before updating decrementers_next_tb and we never process a timer
      interrupt again.
      
      This looks to have been introduced by 0215f7d8 (powerpc: Fix races
      with irq_work). Fix it by removing the early exit and relying on
      code later on in the function to force an early decrementer:
      
             /* We may have raced with new irq work */
             if (test_irq_work_pending())
                     set_dec(1);
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Cc: stable@vger.kernel.org # 3.14+
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8050936c
    • Gavin Shan's avatar
      powerpc/powernv: Reset root port in firmware · 372cf124
      Gavin Shan authored
      Resetting root port has more stuff to do than that for PCIe switch
      ports and we should have resetting root port done in firmware instead
      of the kernel itself. The problem was introduced by commit 5b2e198e
      ("powerpc/powernv: Rework EEH reset").
      
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      372cf124
  3. 05 May, 2014 1 commit
  4. 30 Apr, 2014 8 commits
  5. 29 Apr, 2014 1 commit
  6. 28 Apr, 2014 22 commits