1. 12 12月, 2011 3 次提交
    • P
      powerpc: Tell RCU about idle after hcall tracing · a7b152d5
      Paul E. McKenney 提交于
      The PowerPC pSeries platform (CONFIG_PPC_PSERIES=y) enables
      hypervisor-call tracing for CONFIG_TRACEPOINTS=y kernels.  One of the
      hypervisor calls that is traced is the H_CEDE call in the idle loop
      that tells the hypervisor that this OS instance no longer needs the
      current CPU.  However, tracing uses RCU, so this combination of kernel
      configuration variables needs to avoid telling RCU about the current CPU's
      idleness until after the H_CEDE-entry tracing completes on the one hand,
      and must tell RCU that the the current CPU is no longer idle before the
      H_CEDE-exit tracing starts.
      
      In all other cases, it suffices to inform RCU of CPU idleness upon
      idle-loop entry and exit.
      
      This commit makes the required adjustments.
      Signed-off-by: NPaul E. McKenney <paul.mckenney@linaro.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      a7b152d5
    • F
      nohz: Allow rcu extended quiescent state handling seperately from tick stop · 2bbb6817
      Frederic Weisbecker 提交于
      It is assumed that rcu won't be used once we switch to tickless
      mode and until we restart the tick. However this is not always
      true, as in x86-64 where we dereference the idle notifiers after
      the tick is stopped.
      
      To prepare for fixing this, add two new APIs:
      tick_nohz_idle_enter_norcu() and tick_nohz_idle_exit_norcu().
      
      If no use of RCU is made in the idle loop between
      tick_nohz_enter_idle() and tick_nohz_exit_idle() calls, the arch
      must instead call the new *_norcu() version such that the arch doesn't
      need to call rcu_idle_enter() and rcu_idle_exit().
      
      Otherwise the arch must call tick_nohz_enter_idle() and
      tick_nohz_exit_idle() and also call explicitly:
      
      - rcu_idle_enter() after its last use of RCU before the CPU is put
      to sleep.
      - rcu_idle_exit() before the first use of RCU after the CPU is woken
      up.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: David Miller <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      2bbb6817
    • F
      nohz: Separate out irq exit and idle loop dyntick logic · 280f0677
      Frederic Weisbecker 提交于
      The tick_nohz_stop_sched_tick() function, which tries to delay
      the next timer tick as long as possible, can be called from two
      places:
      
      - From the idle loop to start the dytick idle mode
      - From interrupt exit if we have interrupted the dyntick
      idle mode, so that we reprogram the next tick event in
      case the irq changed some internal state that requires this
      action.
      
      There are only few minor differences between both that
      are handled by that function, driven by the ts->inidle
      cpu variable and the inidle parameter. The whole guarantees
      that we only update the dyntick mode on irq exit if we actually
      interrupted the dyntick idle mode, and that we enter in RCU extended
      quiescent state from idle loop entry only.
      
      Split this function into:
      
      - tick_nohz_idle_enter(), which sets ts->inidle to 1, enters
      dynticks idle mode unconditionally if it can, and enters into RCU
      extended quiescent state.
      
      - tick_nohz_irq_exit() which only updates the dynticks idle mode
      when ts->inidle is set (ie: if tick_nohz_idle_enter() has been called).
      
      To maintain symmetry, tick_nohz_restart_sched_tick() has been renamed
      into tick_nohz_idle_exit().
      
      This simplifies the code and micro-optimize the irq exit path (no need
      for local_irq_save there). This also prepares for the split between
      dynticks and rcu extended quiescent state logics. We'll need this split to
      further fix illegal uses of RCU in extended quiescent states in the idle
      loop.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: David Miller <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      280f0677
  2. 25 11月, 2011 2 次提交
  3. 24 11月, 2011 6 次提交
  4. 17 11月, 2011 7 次提交
  5. 16 11月, 2011 9 次提交
    • G
      powerpc/ps3: Fix SMP lockdep boot warning · 7eaf09ee
      Geoff Levand 提交于
      Move the PS3 IPI message setup from ps3_smp_setup_cpu() to ps3_smp_probe().
      
      Fixes startup warnings like these:
      
        ------------[ cut here ]------------
        WARNING: at kernel/lockdep.c:2649
        Modules linked in:
        ...
        ---[ end trace 31fd0ba7d8756001 ]---
      Signed-off-by: NGeoff Levand <geoff@infradead.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7eaf09ee
    • G
      powerpc/ps3: Fix lost SMP IPIs · 72f3bea0
      Geoff Levand 提交于
      Fixes the PS3 bootup hang introduced in 3.0-rc1 by:
      
        commit 317f3941
        sched: Move the second half of ttwu() to the remote cpu
      
      Move the PS3's LV1 EOI call lv1_end_of_interrupt_ext() from ps3_chip_eoi()
      to ps3_get_irq() for IPI messages.
      
      If lv1_send_event_locally() is called between a previous call to
      lv1_send_event_locally() and the coresponding call to
      lv1_end_of_interrupt_ext() the second event will not be delivered to the
      target cpu.
      
      The PS3's SMP IPIs are implemented using lv1_send_event_locally(), so if two
      IPI messages of the same type are sent to the same target in a relatively
      short period of time the second IPI event can become lost when
      lv1_end_of_interrupt_ext() is called from ps3_chip_eoi().
      
      CC: stable@kernel.org
      Signed-off-by: NGeoff Levand <geoff@infradead.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      72f3bea0
    • M
      powerpc: Add hvcall.h include to book3s_hv.c · de1d9248
      Michael Neuling 提交于
      If you build with KVM and UP it fails with the following due to a
      missing include.
      
      /arch/powerpc/kvm/book3s_hv.c: In function 'do_h_register_vpa':
      arch/powerpc/kvm/book3s_hv.c:156:10: error: 'H_PARAMETER' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:156:10: note: each undeclared identifier is reported only once for each function it appears in
      arch/powerpc/kvm/book3s_hv.c:192:12: error: 'H_RESOURCE' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:222:9: error: 'H_SUCCESS' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c: In function 'kvmppc_pseries_do_hcall':
      arch/powerpc/kvm/book3s_hv.c:228:30: error: 'H_SUCCESS' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:232:7: error: 'H_CEDE' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:234:7: error: 'H_PROD' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:238:10: error: 'H_PARAMETER' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:250:7: error: 'H_CONFER' undeclared (first use in this function)
      arch/powerpc/kvm/book3s_hv.c:252:7: error: 'H_REGISTER_VPA' undeclared (first use in this function)
      make[2]: *** [arch/powerpc/kvm/book3s_hv.o] Error 1
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      cc: stable@kernel.org (3.1 only)
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      de1d9248
    • K
      powerpc/trace: Add a dummy stack frame for trace_hardirqs_off · 2cd76629
      Kevin Hao 提交于
      The trace_hardirqs_off will use CALLER_ADDR0 and CALLER_ADDR1.
      If an exception occurs in user mode, there is only one stack frame
      on the stack and accessing the CALLER_ADDR1 will causes the following
      call trace. So we create a dummy stack frame to make
      trace_hardirqs_off happy.
      
      WARNING: at kernel/smp.c:459
      Modules linked in:
      NIP: c0093280 LR: c00930a0 CTR: c0010780
      REGS: edb87ae0 TRAP: 0700   Not tainted  (3.1.0)
      MSR: 00021002 <ME,CE>  CR: 28002888  XER: 00000000
      TASK = edce2ac0[17658] 'mthread-lock-on' THREAD: edb86000 CPU: 5
      GPR00: 00000001 edb87b90 edce2ac0 00000005 c0019594 edb87bd8 00000001 00000fe3
      GPR08: 00041000 c084138c 4e20120d edb87b90 48002888 1001aa7c 00000000 00000000
      GPR16: 48830000 10012a8c 00000000 10000af4 00000001 c0810000 00000000 00000000
      GPR24: ee9aa920 c0816a18 00000000 00000005 c0019594 edb87bd8 ee20178c edb87b90
      NIP [c0093280] smp_call_function_many+0x214/0x2b4
      LR [c00930a0] smp_call_function_many+0x34/0x2b4
      Call Trace:
      [edb87b90] [c00930a0] smp_call_function_many+0x34/0x2b4 (unreliable)
      [edb87bd0] [c00194ec] __flush_tlb_page+0xac/0x100
      [edb87c00] [c001957c] flush_tlb_page+0x3c/0x54
      [edb87c10] [c00180ac] ptep_set_access_flags+0x74/0x12c
      [edb87c40] [c0128068] handle_pte_fault+0x2f0/0x9ac
      [edb87cb0] [c0128c3c] handle_mm_fault+0x104/0x1dc
      [edb87ce0] [c05f40f4] do_page_fault+0x2dc/0x630
      [edb87e50] [c001078c] handle_page_fault+0xc/0x80
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      2cd76629
    • A
      powerpc: Copy down exception vectors after feature fixups · d715e433
      Anton Blanchard 提交于
      kdump fails because we try to execute an HV only instruction. Feature
      fixups are being applied after we copy the exception vectors down to 0
      so they miss out on any updates.
      
      We have always had this issue but it only became critical in v3.0
      when we added CFAR support (breaks POWER5) and v3.1 when we added
      POWERNV (breaks everyone).
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Cc: <stable@kernel.org> [v3.0+]
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d715e433
    • A
      powerpc: panic if we can't instantiate RTAS · 6d1e2c6c
      Anton Blanchard 提交于
      I had to debug a strange situation where all manner of things were
      failing. SMT threads, storage and network were all completely broken.
      
      The root cause was we couldn't find enough memory to instantiate RTAS -
      this was a network install so the initrd was huge.
      
      Instead of limping along and failing in mysterious ways we should just
      panic up front if RTAS exists and we can't allocate space for it.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6d1e2c6c
    • S
      powerpc/4xx: Fix typos in kexec config dependencies · bbc24a25
      Suzuki Poulose 提交于
      Kexec is not supported on 47x. 47x is a variant of 44x with slightly
      different MMU and SMP support. There was a typo in the config dependency
      for kexec. This patch fixes the same.
      Signed-off-by: NSuzuki K. Poulose <suzuki@in.ibm.com>
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Cc:	Kumar Gala <galak@kernel.crashing.org>
      Cc:	Josh Boyer <jwboyer@gmail.com>
      Cc:	linux ppc dev <linuxppc-dev@lists.ozlabs.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      bbc24a25
    • A
    • A
      powerpc: Fix build breakage in jump_label.c · 9c8b3907
      Al Viro 提交于
      Should do what other architectures do and wrap all that code into
      the appropriate ifdef
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9c8b3907
  6. 15 11月, 2011 1 次提交
    • L
      fsl-rio: fix compile error · e0ce42e1
      Liu Gang 提交于
      The "#include <linux/module.h>" was replaced by "#include <linux/export.h>"
      in the patch "powerpc: various straight conversions from module.h --> export.h".
      This will cause the following compile problem:
      arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
      arch/powerpc/sysdev/fsl_rio.c:296: error: implicit declaration of function 'search_exception_tables'.
      
      The file fsl_rio.c needs the declaration of function "search_exception_tables"
      in the header file "linux/module.h".
      Signed-off-by: NLiu Gang <Gang.Liu@freescale.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      e0ce42e1
  7. 08 11月, 2011 8 次提交
  8. 04 11月, 2011 4 次提交