svn commit: r341821 - head/sys/x86/x86
Mark Johnston
markj at FreeBSD.org
Tue Dec 11 16:49:02 UTC 2018
Author: markj
Date: Tue Dec 11 16:49:01 2018
New Revision: 341821
URL: https://svnweb.freebsd.org/changeset/base/341821
Log:
Fix the PAE kernel gcc build.
The error was caused by map_ucode() casting a vm_paddr_t to a void *.
Use a uintptr_t instead to match the caller. Fix some style bugs while
here.
Reported by: bde
Reviewed by: bde
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/x86/x86/ucode.c
Modified: head/sys/x86/x86/ucode.c
==============================================================================
--- head/sys/x86/x86/ucode.c Tue Dec 11 16:35:59 2018 (r341820)
+++ head/sys/x86/x86/ucode.c Tue Dec 11 16:49:01 2018 (r341821)
@@ -278,12 +278,13 @@ ucode_load_ap(int cpu)
}
static void *
-map_ucode(vm_paddr_t free, size_t len)
+map_ucode(uintptr_t free, size_t len)
{
-
#ifdef __i386__
- for (vm_paddr_t pa = free; pa < free + len; pa += PAGE_SIZE)
- pmap_kenter(pa, pa);
+ uintptr_t va;
+
+ for (va = free; va < free + len; va += PAGE_SIZE)
+ pmap_kenter(va, (vm_paddr_t)va);
#else
(void)len;
#endif
@@ -291,12 +292,13 @@ map_ucode(vm_paddr_t free, size_t len)
}
static void
-unmap_ucode(vm_paddr_t free, size_t len)
+unmap_ucode(uintptr_t free, size_t len)
{
-
#ifdef __i386__
- for (vm_paddr_t pa = free; pa < free + len; pa += PAGE_SIZE)
- pmap_kremove((vm_offset_t)pa);
+ uintptr_t va;
+
+ for (va = free; va < free + len; va += PAGE_SIZE)
+ pmap_kremove(va);
#else
(void)free;
(void)len;
More information about the svn-src-all
mailing list