diff options
author | kib <kib@FreeBSD.org> | 2014-05-04 07:22:51 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-05-04 07:22:51 +0000 |
commit | 2dee5cfb7666ad9a0a43fe70857ecaab4c6c1a36 (patch) | |
tree | 1e66f2267664941c055f7fd3463d1e9f04905689 | |
parent | 839393d336d015a7d4463a0a3f1beb19892c8966 (diff) | |
download | FreeBSD-src-2dee5cfb7666ad9a0a43fe70857ecaab4c6c1a36.zip FreeBSD-src-2dee5cfb7666ad9a0a43fe70857ecaab4c6c1a36.tar.gz |
MFC r265004:
Same as it was done in r263878 for invlrng_handler(), fix order of
checks for special pcid values in invlpg_pcid_handler().
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 3bc86c6..862b5ca 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -1567,6 +1567,7 @@ invlpg_handler(void) void invlpg_pcid_handler(void) { + uint64_t cr3; #ifdef COUNT_XINVLTLB_HITS xhits_pg[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1574,15 +1575,13 @@ invlpg_pcid_handler(void) (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - if (invpcid_works) { - invpcid(&smp_tlb_invpcid, INVPCID_ADDR); + if (smp_tlb_invpcid.pcid == (uint64_t)-1) { + invltlb_globpcid(); } else if (smp_tlb_invpcid.pcid == 0) { invlpg(smp_tlb_invpcid.addr); - } else if (smp_tlb_invpcid.pcid == (uint64_t)-1) { - invltlb_globpcid(); + } else if (invpcid_works) { + invpcid(&smp_tlb_invpcid, INVPCID_ADDR); } else { - uint64_t cr3; - /* * PCID supported, but INVPCID is not. * Temporarily switch to the target address |