Skip to content

Commit 5961352

Browse files
oohalmpe
authored andcommitted
powerpc/papr_scm: Fix resource end address
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>
1 parent 14ebfec commit 5961352

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/platforms/pseries/papr_scm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ static int papr_scm_probe(struct platform_device *pdev)
296296

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

0 commit comments

Comments
 (0)