| 641 | } |
| 642 | |
| 643 | void |
| 644 | invlrng_handler(void) |
| 645 | { |
| 646 | vm_offset_t addr, addr2; |
| 647 | uint32_t generation; |
| 648 | |
| 649 | #ifdef COUNT_XINVLTLB_HITS |
| 650 | xhits_rng[PCPU_GET(cpuid)]++; |
| 651 | #endif /* COUNT_XINVLTLB_HITS */ |
| 652 | #ifdef COUNT_IPIS |
| 653 | (*ipi_invlrng_counts[PCPU_GET(cpuid)])++; |
| 654 | #endif /* COUNT_IPIS */ |
| 655 | |
| 656 | addr = smp_tlb_addr1; |
| 657 | addr2 = smp_tlb_addr2; |
| 658 | generation = smp_tlb_generation; /* Overlap with serialization */ |
| 659 | if (smp_tlb_pmap == kernel_pmap) { |
| 660 | do { |
| 661 | invlpg(addr); |
| 662 | addr += PAGE_SIZE; |
| 663 | } while (addr < addr2); |
| 664 | } |
| 665 | |
| 666 | PCPU_SET(smp_tlb_done, generation); |
| 667 | } |
| 668 | |
| 669 | void |
| 670 | invlcache_handler(void) |