OSDN Git Service

powerpc/pseries: remove obsolete memory hotplug DT notifier code
authorNathan Lynch <nathanl@linux.ibm.com>
Fri, 12 Jun 2020 05:12:38 +0000 (00:12 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 16 Jul 2020 03:12:41 +0000 (13:12 +1000)
commite978a3ccaa714b5ff125857d2cbecbb6fdf6c094
tree469aa3bc1fcedd07771b5d89c31b897b6b262cc3
parent38c392cef19019457ddcfb197ff3d9c5267698e6
powerpc/pseries: remove obsolete memory hotplug DT notifier code

pseries_update_drconf_memory() runs from a DT notifier in response to
an update to the ibm,dynamic-memory property of the
/ibm,dynamic-reconfiguration-memory node. This property is an older
less compact format than the ibm,dynamic-memory-v2 property used in
most currently supported firmwares. There has never been an equivalent
function for the v2 property.

pseries_update_drconf_memory() compares the 'assigned' flag for each
LMB in the old vs new properties and adds or removes the block
accordingly. However it appears to be of no actual utility:

* Partition suspension and PRRNs are specified only to change LMBs'
  NUMA affinity information. This notifier should be a no-op for those
  scenarios since the assigned flags should not change.

* The memory hotplug/DLPAR path has a hack which short-circuits
  execution of the notifier:
     dlpar_memory()
        ...
        rtas_hp_event = true;
        drmem_update_dt()
           of_update_property()
              pseries_memory_notifier()
                 pseries_update_drconf_memory()
                    if (rtas_hp_event) return;

So this code only makes sense as a relic of the time when more of the
DLPAR workflow took place in user space. I don't see a purpose for it
now.

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-19-nathanl@linux.ibm.com
arch/powerpc/platforms/pseries/hotplug-memory.c