Date: Tue, 11 Dec 2018 16:49:01 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341821 - head/sys/x86/x86 Message-ID: <201812111649.wBBGn1rB079694@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812111649.wBBGn1rB079694>