pmap.c (bd50262f705c4fed70ea94d16a0f19b5f5497cf2) pmap.c (c8f9c1f3d96b60b1e298b5a0f3838c033bf72e05)
1/*-
2 * SPDX-License-Identifier: BSD-4-Clause
3 *
4 * Copyright (c) 1991 Regents of the University of California.
5 * All rights reserved.
6 * Copyright (c) 1994 John S. Dyson
7 * All rights reserved.
8 * Copyright (c) 1994 David Greenman

--- 1031 unchanged lines hidden (view full) ---

1040 cpuid = PCPU_GET(cpuid);
1041 other_cpus = all_cpus;
1042 CPU_CLR(cpuid, &other_cpus);
1043 if (CPU_ISSET(cpuid, &pmap->pm_active))
1044 invlpg(va);
1045 CPU_AND(&other_cpus, &pmap->pm_active);
1046 mask = &other_cpus;
1047 }
1/*-
2 * SPDX-License-Identifier: BSD-4-Clause
3 *
4 * Copyright (c) 1991 Regents of the University of California.
5 * All rights reserved.
6 * Copyright (c) 1994 John S. Dyson
7 * All rights reserved.
8 * Copyright (c) 1994 David Greenman

--- 1031 unchanged lines hidden (view full) ---

1040 cpuid = PCPU_GET(cpuid);
1041 other_cpus = all_cpus;
1042 CPU_CLR(cpuid, &other_cpus);
1043 if (CPU_ISSET(cpuid, &pmap->pm_active))
1044 invlpg(va);
1045 CPU_AND(&other_cpus, &pmap->pm_active);
1046 mask = &other_cpus;
1047 }
1048 smp_masked_invlpg(*mask, va);
1048 smp_masked_invlpg(*mask, va, pmap);
1049 sched_unpin();
1050}
1051
1052/* 4k PTEs -- Chosen to exceed the total size of Broadwell L2 TLB */
1053#define PMAP_INVLPG_THRESHOLD (4 * 1024 * PAGE_SIZE)
1054
1055void
1056pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)

--- 17 unchanged lines hidden (view full) ---

1074 other_cpus = all_cpus;
1075 CPU_CLR(cpuid, &other_cpus);
1076 if (CPU_ISSET(cpuid, &pmap->pm_active))
1077 for (addr = sva; addr < eva; addr += PAGE_SIZE)
1078 invlpg(addr);
1079 CPU_AND(&other_cpus, &pmap->pm_active);
1080 mask = &other_cpus;
1081 }
1049 sched_unpin();
1050}
1051
1052/* 4k PTEs -- Chosen to exceed the total size of Broadwell L2 TLB */
1053#define PMAP_INVLPG_THRESHOLD (4 * 1024 * PAGE_SIZE)
1054
1055void
1056pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)

--- 17 unchanged lines hidden (view full) ---

1074 other_cpus = all_cpus;
1075 CPU_CLR(cpuid, &other_cpus);
1076 if (CPU_ISSET(cpuid, &pmap->pm_active))
1077 for (addr = sva; addr < eva; addr += PAGE_SIZE)
1078 invlpg(addr);
1079 CPU_AND(&other_cpus, &pmap->pm_active);
1080 mask = &other_cpus;
1081 }
1082 smp_masked_invlpg_range(*mask, sva, eva);
1082 smp_masked_invlpg_range(*mask, sva, eva, pmap);
1083 sched_unpin();
1084}
1085
1086void
1087pmap_invalidate_all(pmap_t pmap)
1088{
1089 cpuset_t *mask, other_cpus;
1090 u_int cpuid;

--- 4596 unchanged lines hidden ---
1083 sched_unpin();
1084}
1085
1086void
1087pmap_invalidate_all(pmap_t pmap)
1088{
1089 cpuset_t *mask, other_cpus;
1090 u_int cpuid;

--- 4596 unchanged lines hidden ---