mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
powerpc/pseries/memhp: Log more error conditions in add path
When an add operation for multiple LMBs fails, there is currently little indication from the kernel of what went wrong. Be a little more verbose about error conditions in the add paths. Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20231114-pseries-memhp-fixes-v1-3-fb8f2bb7c557@linux.ibm.com
This commit is contained in:
parent
bd68ffce69
commit
27951e1d82
1 changed files with 6 additions and 1 deletions
|
@ -208,8 +208,10 @@ static int dlpar_change_lmb_state(struct drmem_lmb *lmb, bool online)
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
mem_block = lmb_to_memblock(lmb);
|
mem_block = lmb_to_memblock(lmb);
|
||||||
if (!mem_block)
|
if (!mem_block) {
|
||||||
|
pr_err("Failed memory block lookup for LMB 0x%x\n", lmb->drc_index);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (online && mem_block->dev.offline)
|
if (online && mem_block->dev.offline)
|
||||||
rc = device_online(&mem_block->dev);
|
rc = device_online(&mem_block->dev);
|
||||||
|
@ -576,6 +578,7 @@ static int dlpar_add_lmb(struct drmem_lmb *lmb)
|
||||||
rc = update_lmb_associativity_index(lmb);
|
rc = update_lmb_associativity_index(lmb);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
dlpar_release_drc(lmb->drc_index);
|
dlpar_release_drc(lmb->drc_index);
|
||||||
|
pr_err("Failed to configure LMB 0x%x\n", lmb->drc_index);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -589,12 +592,14 @@ static int dlpar_add_lmb(struct drmem_lmb *lmb)
|
||||||
/* Add the memory */
|
/* Add the memory */
|
||||||
rc = __add_memory(nid, lmb->base_addr, block_sz, MHP_MEMMAP_ON_MEMORY);
|
rc = __add_memory(nid, lmb->base_addr, block_sz, MHP_MEMMAP_ON_MEMORY);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
pr_err("Failed to add LMB 0x%x to node %u", lmb->drc_index, nid);
|
||||||
invalidate_lmb_associativity_index(lmb);
|
invalidate_lmb_associativity_index(lmb);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = dlpar_online_lmb(lmb);
|
rc = dlpar_online_lmb(lmb);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
pr_err("Failed to online LMB 0x%x on node %u\n", lmb->drc_index, nid);
|
||||||
__remove_memory(lmb->base_addr, block_sz);
|
__remove_memory(lmb->base_addr, block_sz);
|
||||||
invalidate_lmb_associativity_index(lmb);
|
invalidate_lmb_associativity_index(lmb);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue