mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
Replace loadandclear() with atomic_readandclear_int().
This commit is contained in:
parent
b4645202b5
commit
12e8a79ce1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=66696
@ -1603,7 +1603,7 @@ pmap_remove_pte(pmap, ptq, va)
|
||||
unsigned oldpte;
|
||||
vm_page_t m;
|
||||
|
||||
oldpte = loadandclear(ptq);
|
||||
oldpte = atomic_readandclear_int(ptq);
|
||||
if (oldpte & PG_W)
|
||||
pmap->pm_stats.wired_count -= 1;
|
||||
/*
|
||||
@ -1799,7 +1799,7 @@ pmap_remove_all(m)
|
||||
|
||||
pte = pmap_pte_quick(pv->pv_pmap, pv->pv_va);
|
||||
|
||||
tpte = loadandclear(pte);
|
||||
tpte = atomic_readandclear_int(pte);
|
||||
if (tpte & PG_W)
|
||||
pv->pv_pmap->pm_stats.wired_count--;
|
||||
|
||||
|
@ -305,16 +305,6 @@ inw(u_int port)
|
||||
return (data);
|
||||
}
|
||||
|
||||
static __inline u_int
|
||||
loadandclear(volatile u_int *addr)
|
||||
{
|
||||
u_int result;
|
||||
|
||||
__asm __volatile("xorl %0,%0; xchgl %1,%0"
|
||||
: "=&r" (result) : "m" (*addr));
|
||||
return (result);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outbv(u_int port, u_char data)
|
||||
{
|
||||
@ -525,7 +515,6 @@ void invd __P((void));
|
||||
void invlpg __P((u_int addr));
|
||||
void invltlb __P((void));
|
||||
u_short inw __P((u_int port));
|
||||
u_int loadandclear __P((u_int *addr));
|
||||
void outb __P((u_int port, u_char data));
|
||||
void outl __P((u_int port, u_int data));
|
||||
void outsb __P((u_int port, void *addr, size_t cnt));
|
||||
|
@ -1603,7 +1603,7 @@ pmap_remove_pte(pmap, ptq, va)
|
||||
unsigned oldpte;
|
||||
vm_page_t m;
|
||||
|
||||
oldpte = loadandclear(ptq);
|
||||
oldpte = atomic_readandclear_int(ptq);
|
||||
if (oldpte & PG_W)
|
||||
pmap->pm_stats.wired_count -= 1;
|
||||
/*
|
||||
@ -1799,7 +1799,7 @@ pmap_remove_all(m)
|
||||
|
||||
pte = pmap_pte_quick(pv->pv_pmap, pv->pv_va);
|
||||
|
||||
tpte = loadandclear(pte);
|
||||
tpte = atomic_readandclear_int(pte);
|
||||
if (tpte & PG_W)
|
||||
pv->pv_pmap->pm_stats.wired_count--;
|
||||
|
||||
|
@ -305,16 +305,6 @@ inw(u_int port)
|
||||
return (data);
|
||||
}
|
||||
|
||||
static __inline u_int
|
||||
loadandclear(volatile u_int *addr)
|
||||
{
|
||||
u_int result;
|
||||
|
||||
__asm __volatile("xorl %0,%0; xchgl %1,%0"
|
||||
: "=&r" (result) : "m" (*addr));
|
||||
return (result);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
outbv(u_int port, u_char data)
|
||||
{
|
||||
@ -525,7 +515,6 @@ void invd __P((void));
|
||||
void invlpg __P((u_int addr));
|
||||
void invltlb __P((void));
|
||||
u_short inw __P((u_int port));
|
||||
u_int loadandclear __P((u_int *addr));
|
||||
void outb __P((u_int port, u_char data));
|
||||
void outl __P((u_int port, u_int data));
|
||||
void outsb __P((u_int port, void *addr, size_t cnt));
|
||||
|
Loading…
Reference in New Issue
Block a user