More preparation for SPD systems.

Recover all kernels in `SPD' branch.