[PATCH v2 16/28] coresight: Add callback to determine if context save/restore is needed