| 667 | } |
| 668 | |
| 669 | void |
| 670 | invlcache_handler(void) |
| 671 | { |
| 672 | uint32_t generation; |
| 673 | |
| 674 | #ifdef COUNT_IPIS |
| 675 | (*ipi_invlcache_counts[PCPU_GET(cpuid)])++; |
| 676 | #endif /* COUNT_IPIS */ |
| 677 | |
| 678 | /* |
| 679 | * Reading the generation here allows greater parallelism |
| 680 | * since wbinvd is a serializing instruction. Without the |
| 681 | * temporary, we'd wait for wbinvd to complete, then the read |
| 682 | * would execute, then the dependent write, which must then |
| 683 | * complete before return from interrupt. |
| 684 | */ |
| 685 | generation = smp_tlb_generation; |
| 686 | wbinvd(); |
| 687 | PCPU_SET(smp_tlb_done, generation); |
| 688 | } |
no test coverage detected