diff options
author | kib <kib@FreeBSD.org> | 2014-04-27 05:37:01 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-04-27 05:37:01 +0000 |
commit | d581b6a9ab2f217a51854f244a87bb1d118c72f3 (patch) | |
tree | dd6effbd62c03feb16d1f43a0367d3874293c31a /sys/amd64/amd64/mp_machdep.c | |
parent | 3ae13c8b20856f1003f3e26ee1e578bfeff024e3 (diff) | |
download | FreeBSD-src-d581b6a9ab2f217a51854f244a87bb1d118c72f3.zip FreeBSD-src-d581b6a9ab2f217a51854f244a87bb1d118c72f3.tar.gz |
Same as it was done in r263878 for invlrng_handler(), fix order of
checks for special pcid values in invlpg_pcid_handler(). Forst check
for special values, and only then do PCID-specific page invalidation.
Minor fix to the style compliance, declare local variable at the
function start.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Diffstat (limited to 'sys/amd64/amd64/mp_machdep.c')
-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 f6981b9..484fc06 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -1566,6 +1566,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 */ @@ -1573,15 +1574,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 |