Author: luporl
Date: Fri Nov  6 18:50:00 2020
New Revision: 367427
URL: https://svnweb.freebsd.org/changeset/base/367427

Log:
  Fix powerpc and LINT builds
  
  Fix build errors introduced by r367417 and r367390:
  
  - Guard label reached only by powerpc64
  - Guard vm_reserv_level_iffullpop call, that is not defined on powerpc
    variants that don't support superpages
  - Add missing hwpmc file, for when hwpmc is built into kernel

Modified:
  head/sys/conf/files.powerpc
  head/sys/powerpc/aim/mmu_oea64.c
  head/sys/powerpc/aim/moea64_native.c

Modified: head/sys/conf/files.powerpc
==============================================================================
--- head/sys/conf/files.powerpc Fri Nov  6 18:09:52 2020        (r367426)
+++ head/sys/conf/files.powerpc Fri Nov  6 18:50:00 2020        (r367427)
@@ -26,6 +26,7 @@ dev/agp/agp_apple.c           optional        agp powermac
 dev/fb/fb.c                    optional        sc
 dev/hwpmc/hwpmc_e500.c         optional        hwpmc
 dev/hwpmc/hwpmc_mpc7xxx.c      optional        hwpmc
+dev/hwpmc/hwpmc_power8.c       optional        hwpmc
 dev/hwpmc/hwpmc_powerpc.c      optional        hwpmc
 dev/hwpmc/hwpmc_ppc970.c       optional        hwpmc
 dev/iicbus/ad7417.c            optional        ad7417 powermac

Modified: head/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea64.c    Fri Nov  6 18:09:52 2020        
(r367426)
+++ head/sys/powerpc/aim/mmu_oea64.c    Fri Nov  6 18:50:00 2020        
(r367427)
@@ -1760,6 +1760,7 @@ out:
                moea64_syncicache(pmap, va, pa, PAGE_SIZE);
        }
 
+#if VM_NRESERVLEVEL > 0
        /*
         * Try to promote pages.
         *
@@ -1773,6 +1774,7 @@ out:
            (m->flags & PG_FICTITIOUS) == 0 &&
            vm_reserv_level_iffullpop(m) == 0)
                moea64_sp_promote(pmap, va, m);
+#endif
 
        return (KERN_SUCCESS);
 }

Modified: head/sys/powerpc/aim/moea64_native.c
==============================================================================
--- head/sys/powerpc/aim/moea64_native.c        Fri Nov  6 18:09:52 2020        
(r367426)
+++ head/sys/powerpc/aim/moea64_native.c        Fri Nov  6 18:50:00 2020        
(r367427)
@@ -211,6 +211,8 @@ TLBIE(uint64_t vpn, uint64_t oldptehi)
         */
        __asm __volatile("li 0, 0 \n tlbie %0, 0" :: "r"(vpn) : "r0", "memory");
        __asm __volatile("eieio; tlbsync; ptesync" ::: "memory");
+done:
+
 #else
        vpn_hi = (uint32_t)(vpn >> 32);
        vpn_lo = (uint32_t)vpn;
@@ -235,7 +237,6 @@ TLBIE(uint64_t vpn, uint64_t oldptehi)
        intr_restore(intr);
 #endif
 
-done:
        /* No barriers or special ops -- taken care of by ptesync above */
        if (need_lock)
                tlbie_lock = 0;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to