1. 24 3月, 2015 1 次提交
    • T
      powerpc/pseries: Introduce api_version to migration sysfs interface · 288a298c
      Tyrel Datwyler 提交于
      The /sys/kernel/mobility/migration interface was added all the way back
      in 2.6.37. However, the drmgr userspace tool was never augmented to use
      this interface to perfrom migrations. Instead it has continued using a
      faux rtas call coupled with performing the device tree update processing
      in userspace and communicating it back to the kernel via the ugly
      /proc/ppc64/ofdt interface.
      
      Up until 3.12 the device tree update code in the kernel was badly broken
      and bit rotting. This code was fixed in 3.12 and is now utilized by the
      kernel suspend code as of 3.15. The kernel is now better suited to
      handle the post-mobility fixup of the device tree and drmgr should be
      transitioned to using the sysfs migration interface.
      
      This patch introduces the api_version sysfs file to /sys/kernel/mobility
      as a means for drmgr to query the current implementation level of the
      kernel migration code. This initial versioning indicates it is capable
      of perfroming all current PAPR requirements for migration including the
      post-mobility firmware activation and device tree update.
      Signed-off-by: NTyrel Datwyler <tyreld@linux.vnet.ibm.com>
      Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
      Cc: Cyril Bur <cyrilbur@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      288a298c
  2. 27 1月, 2015 1 次提交
    • C
      powerpc/pseries: Fix endian problems with LE migration · 3df76a9d
      Cyril Bur 提交于
      RTAS events require arguments be passed in big endian while hypercalls
      have their arguments passed in registers and the values should therefore
      be in CPU endian.
      
      The "ibm,suspend_me" 'RTAS' call makes a sequence of hypercalls to setup
      one true RTAS call. This means that "ibm,suspend_me" is handled
      specially in the ppc_rtas() syscall.
      
      The ppc_rtas() syscall has its arguments in big endian and can therefore
      pass these arguments directly to the RTAS call. "ibm,suspend_me" is
      handled specially from within ppc_rtas() (by calling rtas_ibm_suspend_me())
      which has left an endian bug on little endian systems due to the
      requirement of hypercalls. The return value from rtas_ibm_suspend_me()
      gets returned in cpu endian, and is left unconverted, also a bug on
      little endian systems.
      
      rtas_ibm_suspend_me() does not actually make use of the rtas_args that
      it is passed. This patch removes the convoluted use of the rtas_args
      struct to pass params to rtas_ibm_suspend_me() in favour of passing what
      it needs as actual arguments. This patch also ensures the two callers of
      rtas_ibm_suspend_me() pass function parameters in cpu endian and in the
      case of ppc_rtas(), converts the return value.
      
      migrate_store() (the other caller of rtas_ibm_suspend_me()) is from a
      sysfs file which deals with everything in cpu endian so this function
      only underwent cleanup.
      
      This patch has been tested with KVM both LE and BE and on PowerVM both
      LE and BE. Under QEMU/KVM the migration happens without touching these
      code pathes.
      
      For PowerVM there is no obvious regression on BE and the LE code path
      now provides the correct parameters to the hypervisor.
      Signed-off-by: NCyril Bur <cyrilbur@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      3df76a9d
  3. 09 8月, 2014 1 次提交
  4. 28 7月, 2014 1 次提交
    • M
      powerpc/pseries: Switch pseries drivers to use machine_xxx_initcall() · 8e83e905
      Michael Ellerman 提交于
      A lot of the code in platforms/pseries is using non-machine initcalls.
      That means if a kernel built with pseries support runs on another
      platform, for example powernv, the initcalls will still run.
      
      Most of these cases are OK, though sometimes only due to luck. Some were
      having more effect:
      
       * hcall_inst_init
        - Checking FW_FEATURE_LPAR which is set on ps3 & celleb.
       * mobility_sysfs_init
        - created sysfs files unconditionally
        - but no effect due to ENOSYS from rtas_ibm_suspend_me()
       * apo_pm_init
        - created sysfs, allows write
        - nothing checks the value written to though
       * alloc_dispatch_log_kmem_cache
        - creating kmem_cache on non-pseries machines
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8e83e905
  5. 07 3月, 2014 1 次提交
  6. 27 8月, 2013 6 次提交
  7. 26 4月, 2013 2 次提交
    • N
      powerpc/pseries: Correct buffer parsing in update_dt_node() · 2e9b7b02
      Nathan Fontenot 提交于
      Correct parsing of the buffer returned from ibm,update-properties. The first
      element is a length and the path to the property which is slightly different
      from the list of properties in the buffer so we need to specifically
      handle this.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      2e9b7b02
    • N
      powerpc/pseries: Expose pseries devicetree_update() · 762ec157
      Nathan Fontenot 提交于
      Newer firmware on Power systems can transparently reassign platform resources
      (CPU and Memory) in use. For instance, if a processor or memory unit is
      predicted to fail, the platform may transparently move the processing to an
      equivalent unused processor or the memory state to an equivalent unused
      memory unit. However, reassigning resources across NUMA boundaries may alter
      the performance of the partition. When such reassignment is necessary, the
      Platform Resource Reassignment Notification (PRRN) option provides a
      mechanism to inform the Linux kernel of changes to the NUMA affinity of
      its platform resources.
      
      When rtasd receives a PRRN event, it needs to make a series of RTAS
      calls (ibm,update-nodes and ibm,update-properties) to retrieve the
      updated device tree information. These calls are already handled in the
      pseries_devicetree_update() routine used in partition migration.
      
      This patch exposes pseries_devicetree_update() to make it accessible
      to other pseries routines, this patch also updates pseries_devicetree_update()
      to take a 32-bit scope parameter. The scope value, which was previously hard
      coded to 1 for partition migration, is used for the RTAS calls
      ibm,update-nodes/properties to update the device tree.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      762ec157
  8. 15 11月, 2012 1 次提交
  9. 11 7月, 2012 1 次提交
  10. 01 11月, 2011 1 次提交
  11. 13 10月, 2010 1 次提交
    • N
      powerpc/pseries: Partition migration in the kernel · 410bccf9
      Nathan Fontenot 提交于
      Enable partition migration in the kernel.  To do this a new sysfs file,
      /sys/kernel/mobility/migration, is created.  In order to initiate a migration
      the stream id (generated by the HMC managing the system) is written to this
      file.
      
      After a migration occurs, and what is the majority of this code, the device
      tree needs to be updated for the new system the partition is running on. This
      is done via the ibm,update-nodes and ibm,update-properties rtas calls which
      return information regarding which nodes and properties of the device tree
      are to be added/removed/updated.
      Signed-off-by: NNathan Fontenot <nfont@austin.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      410bccf9