aboutsummaryrefslogtreecommitdiff
path: root/include/helpers.h
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-02-10 14:16:09 +0100
committerAlexey Kardashevskiy <aik@ozlabs.ru>2020-02-21 14:03:07 +1100
commitefa56b851fabe3372d55613be5195ee339441fa0 (patch)
treec68885e89ea866011d2a9b0126aeea72ea8a5bf9 /include/helpers.h
parentb7e579c856937d4120fdf53a29cce0d38131483e (diff)
downloadSLOF-efa56b851fabe3372d55613be5195ee339441fa0.zip
SLOF-efa56b851fabe3372d55613be5195ee339441fa0.tar.gz
SLOF-efa56b851fabe3372d55613be5195ee339441fa0.tar.bz2
fdt: Delete nodes of devices removed between boot and CAS
We recently fixed node creation at CAS in order to support early hotplug of devices between boot and CAS. Let's handle node removal now to support early hot *un*plug of devices. This is achieved by associating a generation number to each FDT received from QEMU and tagging all nodes with this number in a "slof,from-fdt" property. The generation number is kept in the fdt-generation# variable. It starts at 0 for the initial boot time FDT, and it is incremented at each subsequent CAS. All boot time nodes hence get "slof,from-fdt" == 0, all nodes present at CAS get "slof,from-fdt" == 1 and so on in case the guest calls CAS again. If a device gets hot unplugged before quiesce, we hence can detect it doesn't have the right generation number and thus delete the node from the DT. Note that this only affects nodes coming from the FDT. Nodes created by SLOF don't have the "slof,from-fdt" property, and therefore cannot be candidates to deletion. Signed-off-by: Greg Kurz <groug@kaod.org> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'include/helpers.h')
0 files changed, 0 insertions, 0 deletions