The pmap_works variable is always true for amd64. Remove it, the branch in the initialization taken when false, and corresponding sysctl.
Remove pat_table[] local array, work on pat_index[] directly.
Collapse whole initialization to not override already assigned values.
Add comment explaining the choice for PAT4 and PAT7.
MFC note: I might leave the sysctl around.