1. 26 6月, 2009 1 次提交
    • B
      powerpc/rtas: Turn rtas lock into a raw spinlock · f97bb36f
      Benjamin Herrenschmidt 提交于
      RTAS currently uses a normal spinlock. However it can be called from
      contexts where this is not necessarily a good idea. For example, it
      can be called while syncing timebases, with the core timebase being
      frozen. Unfortunately, that will deadlock in case of lock contention
      when spinlock debugging is enabled as the spin lock debugging code
      will try to use __delay() which ... relies on the timebase being
      enabled.
      
      Also RTAS can be used in some low level IRQ handling code path so it
      may as well be a raw spinlock for -rt sake.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f97bb36f
  2. 23 2月, 2009 1 次提交
    • B
      powerpc/pseries: Fix partition migration hang under load · f52862f4
      Brian King 提交于
      While testing partition migration with heavy CPU load using
      shared processors, it was observed that sometimes the migration
      would never complete and would appear to hang. Currently, the
      migration code assumes that if H_SUCCESS is returned from the H_JOIN
      then the migration is complete and the processor is waking up on
      the target system. If there was an outstanding PROD to the processor
      when the H_JOIN is called, however, it will return H_SUCCESS on the source
      system, causing the migration to hang, or in some scenarios cause
      the kernel to crash on the complete call waking the caller
      of rtas_percpu_suspend_me. Fix this by calling H_JOIN multiple times
      if necessary during the migration.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f52862f4
  3. 16 12月, 2008 1 次提交
  4. 11 8月, 2008 1 次提交
    • N
      powerpc: Zero fill the return values of rtas argument buffer · b79998fc
      Nathan Fontenot 提交于
      The kernel copy of the rtas args struct contains the return
      value(s) for the specified rtas call.  These are copied back
      to user space with the assumption that every value has been
      set by the rtas call, which turns out to be not always true.
      Thus userspace can see random values and think the call failed
      when in fact it succeeded, but for some reason didn't set one
      of the return values.
      
      This fixes the problem by zeroing out the return value fields
      of the rtas args struct before processing the rtas call.
      Signed-off-by: NNathan Fontenot <nfont@austin.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b79998fc
  5. 26 6月, 2008 1 次提交
  6. 14 5月, 2008 1 次提交
    • M
      [POWERPC] Fix sparse warnings in arch/powerpc/kernel · 1c21a293
      Michael Ellerman 提交于
      Make a few things static in lparcfg.c
      Make init and exit routines static in rtas_flash.c
      Make things static in rtas_pci.c
      Make some functions static in rtas.c
      Make fops static in rtas-proc.c
      Remove unneeded extern for do_gtod in smp.c
      Make clocksource_init() static in time.c
      Make last_tick_len and ticklen_to_xs static in time.c
      Move the declaration of the pvr per-cpu into smp.h
      Make kexec_smp_down() and kexec_stack static in machine_kexec_64.c
      Don't return void in arch_teardown_msi_irqs() in msi.c
      Move declaration of GregorianDay()into asm/time.h
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1c21a293
  7. 19 4月, 2008 1 次提交
  8. 01 4月, 2008 1 次提交
  9. 14 2月, 2008 1 次提交
  10. 03 12月, 2007 1 次提交
  11. 20 11月, 2007 1 次提交
    • L
      [POWERPC] Fix RTAS os-term usage on kernel panic · a2b51812
      Linas Vepstas 提交于
      The rtas_os_term() routine was being called at the wrong time.
      The actual rtas call "os-term" will not ever return, and so
      calling it from the panic notifier is too early.  Instead,
      call it from the machine_reset() call.
      
      This splits the rtas_os_term() routine into two: one part to capture
      the kernel panic message, invoked during the panic notifier, and
      another part that is invoked during machine_reset().
      
      Prior to this patch, the os-term call was never being made,
      because panic_timeout was always non-zero.  Calling os-term
      helps keep the hypervisor happy!  We have to keep the hypervisor
      happy to avoid service, dump and error reporting problems.
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a2b51812
  12. 19 11月, 2007 1 次提交
    • N
      [POWERPC] Fix multiple bugs in rtas_ibm_suspend_me code · 8f5c7579
      Nathan Lynch 提交于
      There are several issues with the rtas_ibm_suspend_me code, which
      enables platform-assisted suspension of an LPAR as covered in PAPR
      2.2.
      
      1.) rtas_ibm_suspend_me uses on_each_cpu() to invoke
      rtas_percpu_suspend_me on all cpus via IPI:
      
      if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0))
      ...
      
      'data' is on the calling task's stack, but rtas_ibm_suspend_me takes
      no measures to ensure that all instances of rtas_percpu_suspend_me are
      finished accessing 'data' before returning.  This can result in the
      IPI'd cpus accessing random stack data and getting stuck in H_JOIN.
      
      This is addressed by using an atomic count of workers and a completion
      on the stack.
      
      2.) rtas_percpu_suspend_me is needlessly calling H_JOIN in a loop.
      The only event that can cause a cpu to return from H_JOIN is an H_PROD
      from another cpu or a NMI/system reset.  Each cpu need call H_JOIN
      only once per suspend operation.
      
      Remove the loop and the now unnecessary 'waiting' state variable.
      
      3.) H_JOIN must be called with MSR[EE] off, but lazy interrupt
      disabling may cause the caller of rtas_ibm_suspend_me to call H_JOIN
      with it on; the local_irq_disable() in on_each_cpu() is not
      sufficient.
      
      Fix this by explicitly saving the MSR and clearing the EE bit before
      calling H_JOIN.
      
      4.) H_PROD is being called with the Linux logical cpu number as the
      parameter, not the platform interrupt server value.  (It's also being
      called for all possible cpus, which is harmless, but unnecessary.)
      
      This is fixed by calling H_PROD for each online cpu using
      get_hard_smp_processor_id(cpu) for the argument.
      Signed-off-by: NNathan Lynch <ntl@pobox.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8f5c7579
  13. 24 4月, 2007 1 次提交
  14. 13 4月, 2007 1 次提交
  15. 18 2月, 2007 1 次提交
  16. 08 12月, 2006 2 次提交
  17. 04 12月, 2006 1 次提交
  18. 25 8月, 2006 2 次提交
  19. 08 8月, 2006 1 次提交
    • H
      [POWERPC] Fix might-sleep warning on removing cpus · 81b73dd9
      Haren Myneni 提交于
      Noticing the following might_sleep warning (dump_stack()) during kdump
      testing when CONFIG_DEBUG_SPINLOCK_SLEEP is enabled. All secondary CPUs
      will be calling rtas_set_indicator with interrupts disabled to remove
      them from global interrupt queue.
      
      BUG: sleeping function called from invalid context at
      arch/powerpc/kernel/rtas.c:463
      in_atomic():1, irqs_disabled():1
      Call Trace:
      [C00000000FFFB970] [C000000000010234] .show_stack+0x68/0x1b0 (unreliable)
      [C00000000FFFBA10] [C000000000059354] .__might_sleep+0xd8/0xf4
      [C00000000FFFBA90] [C00000000001D1BC] .rtas_busy_delay+0x20/0x5c
      [C00000000FFFBB20] [C00000000001D8A8] .rtas_set_indicator+0x6c/0xcc
      [C00000000FFFBBC0] [C000000000048BF4] .xics_teardown_cpu+0x118/0x134
      [C00000000FFFBC40] [C00000000004539C]
      .pseries_kexec_cpu_down_xics+0x74/0x8c
      [C00000000FFFBCC0] [C00000000002DF08] .crash_ipi_callback+0x15c/0x188
      [C00000000FFFBD50] [C0000000000296EC] .smp_message_recv+0x84/0xdc
      [C00000000FFFBDC0] [C000000000048E08] .xics_ipi_dispatch+0xf0/0x130
      [C00000000FFFBE50] [C00000000009EF10] .handle_IRQ_event+0x7c/0xf8
      [C00000000FFFBF00] [C0000000000A0A14] .handle_percpu_irq+0x90/0x10c
      [C00000000FFFBF90] [C00000000002659C] .call_handle_irq+0x1c/0x2c
      [C00000000058B9C0] [C00000000000CA10] .do_IRQ+0xf4/0x1a4
      [C00000000058BA50] [C0000000000044EC] hardware_interrupt_entry+0xc/0x10
       --- Exception: 501 at .plpar_hcall_norets+0x14/0x1c
         LR = .pseries_dedicated_idle_sleep+0x190/0x1d4
      [C00000000058BD40] [C00000000058BDE0] 0xc00000000058bde0 (unreliable)
      [C00000000058BDF0] [C00000000001270C] .cpu_idle+0x10c/0x1e0
      [C00000000058BE70] [C000000000009274] .rest_init+0x44/0x5c
      
      To fix this issue, rtas_set_indicator_fast() is added so that will not
      wait for RTAS 'busy' delay and this new function is used for kdump (in
      xics_teardown_cpu()) and for CPU hotplug ( xics_migrate_irqs_away() and
      xics_setup_cpu()).
      
      Note that the platform architecture spec says that set-indicator
      on the indicator we're using here is not permitted to return the
      busy or extended busy status codes.
      Signed-off-by: NHaren Myneni <haren@us.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      81b73dd9
  20. 01 8月, 2006 1 次提交
    • A
      [POWERPC] clean up pseries hcall interfaces · b9377ffc
      Anton Blanchard 提交于
      Our pseries hcall interfaces are out of control:
      
      	plpar_hcall_norets
      	plpar_hcall
      	plpar_hcall_8arg_2ret
      	plpar_hcall_4out
      	plpar_hcall_7arg_7ret
      	plpar_hcall_9arg_9ret
      
      Create 3 interfaces to cover all cases:
      
      	plpar_hcall_norets:	7 arguments no returns
      	plpar_hcall:		6 arguments 4 returns
      	plpar_hcall9:		9 arguments 9 returns
      
      There are only 2 cases in the kernel that need plpar_hcall9, hopefully
      we can keep it that way.
      
      Pass in a buffer to stash return parameters so we avoid the &dummy1,
      &dummy2 madness.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      --
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b9377ffc
  21. 31 7月, 2006 1 次提交
  22. 28 6月, 2006 4 次提交
  23. 21 6月, 2006 1 次提交
  24. 15 6月, 2006 1 次提交
  25. 09 6月, 2006 1 次提交
  26. 01 4月, 2006 1 次提交
  27. 29 3月, 2006 1 次提交
  28. 28 3月, 2006 1 次提交
  29. 27 3月, 2006 1 次提交
  30. 07 2月, 2006 4 次提交
  31. 14 1月, 2006 1 次提交
    • D
      [PATCH] powerpc: special-case ibm,suspend-me RTAS call · 91dc182c
      Dave C Boutcher 提交于
      Handle the ibm,suspend-me RTAS call specially.  It needs
      to be wrapped in a set of synchronization hypervisor calls
      (H_Join).  When the H_Join calls are made on all CPUs, the
      intent is that only one will return with H_Continue, meaning
      that he is the "last man standing".  That CPU then issues the
      ibm,suspend-me call.  What is interesting, of course, is that
      the CPU running when the rtas syscall is made, may NOT be the
      CPU that ultimately executes the ibm,suspend-me rtas call.
      Signed-off-by: NDave Boutcher <sleddog@us.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      91dc182c
  32. 12 1月, 2006 1 次提交