This is pure syntax patch to create an interface to enable and later restore write access to the kernel text. It is in line with e.g. vm_fault_disable_pagefaults() by allowing the nesting.
The chunk in amd64/machdep.c:hammer_time() is kept for now to illustrate why I decided to create the KPI, but the issue is currently being handled in different manner. Still I believe that organization of CR0.WP is useful.