Deleted Added
full compact
mmu_oea64.c (279594) mmu_oea64.c (279940)
1/*-
2 * Copyright (c) 2008-2015 Nathan Whitehorn
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

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

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008-2015 Nathan Whitehorn
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

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

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/powerpc/aim/mmu_oea64.c 279594 2015-03-04 16:45:31Z nwhitehorn $");
28__FBSDID("$FreeBSD: head/sys/powerpc/aim/mmu_oea64.c 279940 2015-03-13 00:08:58Z nwhitehorn $");
29
30/*
31 * Manages physical address maps.
32 *
33 * Since the information managed by this module is also stored by the
34 * logical address mapping module, this module may throw away valid virtual
35 * to physical mappings at almost any time. However, invalidations of
36 * mappings must be done as requested.

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

1893 entropy = (moea64_vsidcontext >> 20);
1894 continue;
1895 }
1896 i = ffs(~moea64_vsid_bitmap[n]) - 1;
1897 mask = 1 << i;
1898 hash &= VSID_HASHMASK & ~(VSID_NBPW - 1);
1899 hash |= i;
1900 }
29
30/*
31 * Manages physical address maps.
32 *
33 * Since the information managed by this module is also stored by the
34 * logical address mapping module, this module may throw away valid virtual
35 * to physical mappings at almost any time. However, invalidations of
36 * mappings must be done as requested.

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

1893 entropy = (moea64_vsidcontext >> 20);
1894 continue;
1895 }
1896 i = ffs(~moea64_vsid_bitmap[n]) - 1;
1897 mask = 1 << i;
1898 hash &= VSID_HASHMASK & ~(VSID_NBPW - 1);
1899 hash |= i;
1900 }
1901 if (hash == VSID_VRMA) /* also special, avoid this too */
1902 continue;
1901 KASSERT(!(moea64_vsid_bitmap[n] & mask),
1902 ("Allocating in-use VSID %#zx\n", hash));
1903 moea64_vsid_bitmap[n] |= mask;
1904 mtx_unlock(&moea64_slb_mutex);
1905 return (hash);
1906 }
1907
1908 mtx_unlock(&moea64_slb_mutex);

--- 746 unchanged lines hidden ---
1903 KASSERT(!(moea64_vsid_bitmap[n] & mask),
1904 ("Allocating in-use VSID %#zx\n", hash));
1905 moea64_vsid_bitmap[n] |= mask;
1906 mtx_unlock(&moea64_slb_mutex);
1907 return (hash);
1908 }
1909
1910 mtx_unlock(&moea64_slb_mutex);

--- 746 unchanged lines hidden ---