]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
powerpc/papr_scm: Update drc_pmem_unbind() to use H_SCM_UNBIND_ALL
authorVaibhav Jain <vaibhav@linux.ibm.com>
Sat, 29 Jun 2019 16:06:09 +0000 (21:36 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 22 Jul 2019 13:31:00 +0000 (23:31 +1000)
commit0d7fc080ba139a2a639d3732616403ccddfa2d36
tree2218e44cebf2aa0bce87245355c5baade14e6d96
parent6d140e7569db89a1b596c1c2d1c2293d5c594432
powerpc/papr_scm: Update drc_pmem_unbind() to use H_SCM_UNBIND_ALL

The new hcall named H_SCM_UNBIND_ALL has been introduce that can
unbind all or specific scm memory assigned to an lpar. This is
more efficient than using H_SCM_UNBIND_MEM as currently we don't
support partial unbind of scm memory.

Hence this patch proposes following changes to drc_pmem_unbind():

    * Update drc_pmem_unbind() to replace hcall H_SCM_UNBIND_MEM to
      H_SCM_UNBIND_ALL.

    * Update drc_pmem_unbind() to handles cases when PHYP asks the guest
      kernel to wait for specific amount of time before retrying the
      hcall via the 'LONG_BUSY' return value.

    * Ensure appropriate error code is returned back from the function
      in case of an error.

Reviewed-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190629160610.23402-3-vaibhav@linux.ibm.com
arch/powerpc/platforms/pseries/papr_scm.c