Skip to content

Commit 4abe60c

Browse files
nathanlynchmpe
authored andcommitted
powerpc/pseries: remove memory "re-add" implementation
dlpar_memory() no longer has any callers which pass PSERIES_HP_ELOG_ACTION_READD. Remove this case and the corresponding unreachable code. Signed-off-by: Nathan Lynch <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent bb7c3d3 commit 4abe60c

File tree

2 files changed

+0
-43
lines changed

2 files changed

+0
-43
lines changed

arch/powerpc/include/asm/rtas.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ inline uint16_t pseries_errorlog_length(struct pseries_errorlog *sect)
215215

216216
#define PSERIES_HP_ELOG_ACTION_ADD 1
217217
#define PSERIES_HP_ELOG_ACTION_REMOVE 2
218-
#define PSERIES_HP_ELOG_ACTION_READD 3
219218

220219
#define PSERIES_HP_ELOG_ID_DRC_NAME 1
221220
#define PSERIES_HP_ELOG_ID_DRC_INDEX 2

arch/powerpc/platforms/pseries/hotplug-memory.c

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -487,40 +487,6 @@ static int dlpar_memory_remove_by_index(u32 drc_index)
487487
return rc;
488488
}
489489

490-
static int dlpar_memory_readd_by_index(u32 drc_index)
491-
{
492-
struct drmem_lmb *lmb;
493-
int lmb_found;
494-
int rc;
495-
496-
pr_info("Attempting to update LMB, drc index %x\n", drc_index);
497-
498-
lmb_found = 0;
499-
for_each_drmem_lmb(lmb) {
500-
if (lmb->drc_index == drc_index) {
501-
lmb_found = 1;
502-
rc = dlpar_remove_lmb(lmb);
503-
if (!rc) {
504-
rc = dlpar_add_lmb(lmb);
505-
if (rc)
506-
dlpar_release_drc(lmb->drc_index);
507-
}
508-
break;
509-
}
510-
}
511-
512-
if (!lmb_found)
513-
rc = -EINVAL;
514-
515-
if (rc)
516-
pr_info("Failed to update memory at %llx\n",
517-
lmb->base_addr);
518-
else
519-
pr_info("Memory at %llx was updated\n", lmb->base_addr);
520-
521-
return rc;
522-
}
523-
524490
static int dlpar_memory_remove_by_ic(u32 lmbs_to_remove, u32 drc_index)
525491
{
526492
struct drmem_lmb *lmb, *start_lmb, *end_lmb;
@@ -617,10 +583,6 @@ static int dlpar_memory_remove_by_index(u32 drc_index)
617583
{
618584
return -EOPNOTSUPP;
619585
}
620-
static int dlpar_memory_readd_by_index(u32 drc_index)
621-
{
622-
return -EOPNOTSUPP;
623-
}
624586

625587
static int dlpar_memory_remove_by_ic(u32 lmbs_to_remove, u32 drc_index)
626588
{
@@ -902,10 +864,6 @@ int dlpar_memory(struct pseries_hp_errorlog *hp_elog)
902864
break;
903865
}
904866

905-
break;
906-
case PSERIES_HP_ELOG_ACTION_READD:
907-
drc_index = hp_elog->_drc_u.drc_index;
908-
rc = dlpar_memory_readd_by_index(drc_index);
909867
break;
910868
default:
911869
pr_err("Invalid action (%d) specified\n", hp_elog->action);

0 commit comments

Comments
 (0)