aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/pseries/papr_scm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c
index 7d6457ab5d34..bba281b1fe1b 100644
--- a/arch/powerpc/platforms/pseries/papr_scm.c
+++ b/arch/powerpc/platforms/pseries/papr_scm.c
@@ -43,6 +43,7 @@ static int drc_pmem_bind(struct papr_scm_priv *p)
43{ 43{
44 unsigned long ret[PLPAR_HCALL_BUFSIZE]; 44 unsigned long ret[PLPAR_HCALL_BUFSIZE];
45 uint64_t rc, token; 45 uint64_t rc, token;
46 uint64_t saved = 0;
46 47
47 /* 48 /*
48 * When the hypervisor cannot map all the requested memory in a single 49 * When the hypervisor cannot map all the requested memory in a single
@@ -56,6 +57,8 @@ static int drc_pmem_bind(struct papr_scm_priv *p)
56 rc = plpar_hcall(H_SCM_BIND_MEM, ret, p->drc_index, 0, 57 rc = plpar_hcall(H_SCM_BIND_MEM, ret, p->drc_index, 0,
57 p->blocks, BIND_ANY_ADDR, token); 58 p->blocks, BIND_ANY_ADDR, token);
58 token = ret[0]; 59 token = ret[0];
60 if (!saved)
61 saved = ret[1];
59 cond_resched(); 62 cond_resched();
60 } while (rc == H_BUSY); 63 } while (rc == H_BUSY);
61 64
@@ -64,7 +67,7 @@ static int drc_pmem_bind(struct papr_scm_priv *p)
64 return -ENXIO; 67 return -ENXIO;
65 } 68 }
66 69
67 p->bound_addr = ret[1]; 70 p->bound_addr = saved;
68 71
69 dev_dbg(&p->pdev->dev, "bound drc %x to %pR\n", p->drc_index, &p->res); 72 dev_dbg(&p->pdev->dev, "bound drc %x to %pR\n", p->drc_index, &p->res);
70 73