> On 14/10/2021 09:15, Avri Altman wrote: > > > >> Implement the ->restore() PM operation and set the link to off, which > >> will force a full reset and restore. This ensures that Host > >> Performance Booster is reset after suspend-to-disk. > >> > >> The Host Performance Booster feature caches logical-to-physical > >> mapping information in the host memory. After suspend-to-disk, such > >> information is not valid, so a full reset and restore is needed. > >> > >> A full reset and restore is done if the SPM level is 5 or 6, but not > >> for other SPM levels, so this change fixes those cases. > > It is perfectly fine for you to do that on your platform, if you > > choose so - Hence my reviewed-by. > > But the reasoning is a bit odd, because you already set SSU4 for your > > spm-lvl, And on SSU3 the device does not dump its internal tables. > > Hibernation flow is: > > ->freeze() > create memory image > ->thaw() > write image > ->poweroff() > > time passes > someone presses the power button or something else activates the > machine > > kernel boots > detects restore image > read image > ->freeze() > restore memory image > ->restore() > > It is up to ->restore() to ensure the device state matches the memory state as it > was when the hibernation image was made. Oh, ok. I missed the poweroff part before. Thanks, Avri > > > > > Thanks, > > Avri > > > >> A full reset and restore also restores base address registers, so > >> that code is removed. > >> > >> Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx> > > Reviewed-by: Avri Altman <avri.altman@xxxxxxx> > >