diff options
author | adrian <adrian@FreeBSD.org> | 2009-08-31 23:30:39 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2009-08-31 23:30:39 +0000 |
commit | 08a823972b3a0c2d0b05b5af0c3ae5dc32649521 (patch) | |
tree | d1f7c12e10fb771295cc136239c58d7b6f009b9b /sys/i386/xen | |
parent | 163abd382b85a67343f4b21f5e748d95243859ad (diff) | |
download | FreeBSD-src-08a823972b3a0c2d0b05b5af0c3ae5dc32649521.zip FreeBSD-src-08a823972b3a0c2d0b05b5af0c3ae5dc32649521.tar.gz |
Shuffle pagezero() into the same location as in sys/i386/i386/pmap.c.
Diffstat (limited to 'sys/i386/xen')
-rw-r--r-- | sys/i386/xen/locore.s | 2 | ||||
-rw-r--r-- | sys/i386/xen/pmap.c | 32 |
2 files changed, 16 insertions, 18 deletions
diff --git a/sys/i386/xen/locore.s b/sys/i386/xen/locore.s index a2c4a8d..95d2afa 100644 --- a/sys/i386/xen/locore.s +++ b/sys/i386/xen/locore.s @@ -148,9 +148,7 @@ IdlePDPT: .long 0 /* phys addr of kernel PDPT */ .globl KPTphys #endif KPTphys: .long 0 /* phys addr of kernel page tables */ -#ifdef SMP .globl gdtset -#endif gdtset: .long 0 /* GDT is valid */ .globl proc0kstack diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c index 9dc077f..52b41e9 100644 --- a/sys/i386/xen/pmap.c +++ b/sys/i386/xen/pmap.c @@ -328,22 +328,6 @@ CTASSERT(KERNBASE % (1 << 24) == 0); -static __inline void -pagezero(void *page) -{ -#if defined(I686_CPU) - if (cpu_class == CPUCLASS_686) { -#if defined(CPU_ENABLE_SSE) - if (cpu_feature & CPUID_SSE2) - sse2_pagezero(page); - else -#endif - i686_pagezero(page); - } else -#endif - bzero(page, PAGE_SIZE); -} - void pd_set(struct pmap *pmap, int ptepindex, vm_paddr_t val, int type) { @@ -3343,6 +3327,22 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, PMAP_UNLOCK(dst_pmap); } +static __inline void +pagezero(void *page) +{ +#if defined(I686_CPU) + if (cpu_class == CPUCLASS_686) { +#if defined(CPU_ENABLE_SSE) + if (cpu_feature & CPUID_SSE2) + sse2_pagezero(page); + else +#endif + i686_pagezero(page); + } else +#endif + bzero(page, PAGE_SIZE); +} + /* * pmap_zero_page zeros the specified hardware page by mapping * the page into KVM and using bzero to clear its contents. |