Skip to content

Commit

Permalink
powerpc/papr_scm: Fix resource end address
Browse files Browse the repository at this point in the history
Fix an off-by-one error in the memory resource range. This resource is
used to determine the address range of the memory to be hot-plugged as
ZONE_DEVICE memory. The current end address results in the kernel
attempting to map an additional memblock and the hypervisor may reject
the mapping resulting in the entire hot-plug failing.

Fixes: b5beae5 ("powerpc/pseries: Add driver for PAPR SCM regions")
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Oliver O'Halloran authored and Michael Ellerman committed Dec 7, 2018
1 parent 14ebfec commit 5961352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/pseries/papr_scm.c
Original file line number Diff line number Diff line change
@@ -296,7 +296,7 @@ static int papr_scm_probe(struct platform_device *pdev)

/* setup the resource for the newly bound range */
p->res.start = p->bound_addr;
p->res.end = p->bound_addr + p->blocks * p->block_size;
p->res.end = p->bound_addr + p->blocks * p->block_size - 1;
p->res.name = pdev->name;
p->res.flags = IORESOURCE_MEM;

0 comments on commit 5961352

Please sign in to comment.