pc,pc-dimm: Factor out reusable parts in pc_dimm_plug to a separate routine
commit43bbb49ef7032a8bfdafbd02d0286512af161089
authorBharata B Rao <bharata@linux.vnet.ibm.com>
Mon, 29 Jun 2015 08:20:23 +0000 (29 13:50 +0530)
committerEduardo Habkost <ehabkost@redhat.com>
Fri, 3 Jul 2015 20:47:58 +0000 (3 17:47 -0300)
tree3919d86efe9423e54625c184c305f70c06505fa8
parenta7d69ff10b085ba6f8236600829532984cdea714
pc,pc-dimm: Factor out reusable parts in pc_dimm_plug to a separate routine

pc_dimm_plug() has code that will be needed for memory plug handlers
in other archs too. Extract code from pc_dimm_plug() into a generic
routine pc_dimm_memory_plug() that resides in pc-dimm.c. Also
correspondingly refactor re-usable unplug code into pc_dimm_memory_unplug().

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/i386/pc.c
hw/mem/pc-dimm.c
include/hw/mem/pc-dimm.h