powerpc/pseries: remove memory "re-add" implementation
authorNathan Lynch <nathanl@linux.ibm.com>
Fri, 12 Jun 2020 05:12:36 +0000 (00:12 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 16 Jul 2020 03:12:40 +0000 (13:12 +1000)
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 <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200612051238.1007764-17-nathanl@linux.ibm.com
arch/powerpc/include/asm/rtas.h
arch/powerpc/platforms/pseries/hotplug-memory.c

index 0107d72..55f9a15 100644 (file)
@@ -215,7 +215,6 @@ inline uint16_t pseries_errorlog_length(struct pseries_errorlog *sect)
 
 #define PSERIES_HP_ELOG_ACTION_ADD     1
 #define PSERIES_HP_ELOG_ACTION_REMOVE  2
-#define PSERIES_HP_ELOG_ACTION_READD   3
 
 #define PSERIES_HP_ELOG_ID_DRC_NAME    1
 #define PSERIES_HP_ELOG_ID_DRC_INDEX   2
index 5ace2f9..67ece3a 100644 (file)
@@ -487,40 +487,6 @@ static int dlpar_memory_remove_by_index(u32 drc_index)
        return rc;
 }
 
-static int dlpar_memory_readd_by_index(u32 drc_index)
-{
-       struct drmem_lmb *lmb;
-       int lmb_found;
-       int rc;
-
-       pr_info("Attempting to update LMB, drc index %x\n", drc_index);
-
-       lmb_found = 0;
-       for_each_drmem_lmb(lmb) {
-               if (lmb->drc_index == drc_index) {
-                       lmb_found = 1;
-                       rc = dlpar_remove_lmb(lmb);
-                       if (!rc) {
-                               rc = dlpar_add_lmb(lmb);
-                               if (rc)
-                                       dlpar_release_drc(lmb->drc_index);
-                       }
-                       break;
-               }
-       }
-
-       if (!lmb_found)
-               rc = -EINVAL;
-
-       if (rc)
-               pr_info("Failed to update memory at %llx\n",
-                       lmb->base_addr);
-       else
-               pr_info("Memory at %llx was updated\n", lmb->base_addr);
-
-       return rc;
-}
-
 static int dlpar_memory_remove_by_ic(u32 lmbs_to_remove, u32 drc_index)
 {
        struct drmem_lmb *lmb, *start_lmb, *end_lmb;
@@ -617,10 +583,6 @@ static int dlpar_memory_remove_by_index(u32 drc_index)
 {
        return -EOPNOTSUPP;
 }
-static int dlpar_memory_readd_by_index(u32 drc_index)
-{
-       return -EOPNOTSUPP;
-}
 
 static int dlpar_memory_remove_by_ic(u32 lmbs_to_remove, u32 drc_index)
 {
@@ -903,10 +865,6 @@ int dlpar_memory(struct pseries_hp_errorlog *hp_elog)
                }
 
                break;
-       case PSERIES_HP_ELOG_ACTION_READD:
-               drc_index = hp_elog->_drc_u.drc_index;
-               rc = dlpar_memory_readd_by_index(drc_index);
-               break;
        default:
                pr_err("Invalid action (%d) specified\n", hp_elog->action);
                rc = -EINVAL;