diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2007-04-13 18:57:50 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2007-04-13 18:57:50 +0000 |
commit | 8dcbe71580f80a022d075e6454486bc9d964c765 (patch) | |
tree | a758a75bd2f6e39d8ea45545b501abbee0430ef1 /sys/arch/hppa64 | |
parent | 977eb8538189c8e232f80c85b5a0416ec6cd3670 (diff) |
While splitting flags and pqflags might have been a good idea in theory
to separate locking, on most modern machines this is not enough
since operations on short types touch other short types that share the
same word in memory.
Merge pg_flags and pqflags again and now use atomic operations to change
the flags. Also bump wire_count to an int and pg_version might go
int as well, just for alignment.
tested by many, many. ok miod@
Diffstat (limited to 'sys/arch/hppa64')
-rw-r--r-- | sys/arch/hppa64/hppa64/pmap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/hppa64/hppa64/pmap.c b/sys/arch/hppa64/hppa64/pmap.c index cba255bbb89..0ae1920f6a3 100644 --- a/sys/arch/hppa64/hppa64/pmap.c +++ b/sys/arch/hppa64/hppa64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.4 2007/04/04 17:44:45 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.5 2007/04/13 18:57:49 art Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -166,7 +166,7 @@ pmap_pde_alloc(struct pmap *pm, vaddr_t va, struct vm_page **pdep) DPRINTF(PDB_FOLLOW|PDB_VP, ("pmap_pde_alloc: pde %lx\n", pa)); - pg->pg_flags &= ~PG_BUSY; /* never busy */ + atomic_clearbits_int(&pg->pg_flags, PG_BUSY); pg->wire_count = 1; /* no mappings yet */ pmap_pde_set(pm, va, pa); pm->pm_stats.resident_count++; /* count PTP as resident */ @@ -626,13 +626,13 @@ pmap_create() panic("pmap_create: no pages"); pg = TAILQ_FIRST(&pmap->pm_pglist); - pg->pg_flags &= ~(PG_BUSY|PG_CLEAN); + atomic_clearbits_int(&pg->pg_flags, PG_BUSY|PG_CLEAN); pmap->pm_pdir = (u_int32_t *)(pa = VM_PAGE_TO_PHYS(pg)); bzero((void *)pa, PAGE_SIZE); /* set the first PIE that's covering low 2g of the address space */ pg = TAILQ_LAST(&pmap->pm_pglist, pglist); - pg->pg_flags &= ~(PG_BUSY|PG_CLEAN); + atomic_clearbits_int(&pg->pg_flags, PG_BUSY|PG_CLEAN); *pmap->pm_pdir = (pa = VM_PAGE_TO_PHYS(pg)) >> PAGE_SHIFT; bzero((void *)pa, PAGE_SIZE); |