Author: marcel
Date: Sun Apr  3 05:09:25 2011
New Revision: 220290
URL: http://svn.freebsd.org/changeset/base/220290

Log:
  Revert rev 165325. The arch_maphint interface hasn't been in use for
  more than 4 years.

Modified:
  head/sys/boot/common/bootstrap.h
  head/sys/boot/sparc64/loader/main.c

Modified: head/sys/boot/common/bootstrap.h
==============================================================================
--- head/sys/boot/common/bootstrap.h    Sun Apr  3 03:45:45 2011        
(r220289)
+++ head/sys/boot/common/bootstrap.h    Sun Apr  3 05:09:25 2011        
(r220290)
@@ -296,8 +296,6 @@ struct arch_switch
     /* Perform ISA byte port I/O (only for systems with ISA) */
     int                (*arch_isainb)(int port);
     void       (*arch_isaoutb)(int port, int value);
-    /* Pass in initial kernel memory size */
-    void        (*arch_maphint)(vm_offset_t va, size_t len);   
 };
 extern struct arch_switch archsw;
 

Modified: head/sys/boot/sparc64/loader/main.c
==============================================================================
--- head/sys/boot/sparc64/loader/main.c Sun Apr  3 03:45:45 2011        
(r220289)
+++ head/sys/boot/sparc64/loader/main.c Sun Apr  3 05:09:25 2011        
(r220290)
@@ -107,7 +107,6 @@ extern vm_offset_t md_load(char *, vm_of
 static int sparc64_autoload(void);
 static ssize_t sparc64_readin(const int, vm_offset_t, const size_t);
 static ssize_t sparc64_copyin(const void *, vm_offset_t, size_t);
-static void sparc64_maphint(vm_offset_t, size_t);
 static vm_offset_t claim_virt(vm_offset_t, size_t, int);
 static vm_offset_t alloc_phys(size_t, int);
 static int map_phys(int, size_t, vm_offset_t, vm_offset_t);
@@ -296,50 +295,6 @@ sparc64_copyin(const void *src, vm_offse
        return (len);
 }
 
-static void
-sparc64_maphint(vm_offset_t va, size_t len)
-{
-       vm_paddr_t pa;
-       vm_offset_t mva;
-       size_t size;
-       int i, free_excess = 0;
-
-       if (!is_sun4v)
-               return;
-
-       if (tlb_store[va >> 22].te_pa != -1)
-               return;
-
-       /* round up to nearest 4MB page */
-       size = (len + PAGE_MASK_4M) & ~PAGE_MASK_4M;
-#if 0
-       pa = alloc_phys(PAGE_SIZE_256M, PAGE_SIZE_256M);
-
-       if (pa != -1)
-               free_excess = 1;
-       else
-#endif
-               pa = alloc_phys(size, PAGE_SIZE_256M);
-       if (pa == -1)
-               pa = alloc_phys(size, PAGE_SIZE_4M);
-       if (pa == -1)
-               panic("%s: out of memory", __func__);
-
-       for (i = 0; i < size; i += PAGE_SIZE_4M) {
-               mva = claim_virt(va + i, PAGE_SIZE_4M, 0);
-               if (mva != (va + i))
-                       panic("%s: can't claim virtual page "
-                           "(wanted %#lx, got %#lx)",
-                           __func__, va, mva);
-
-               tlb_store[mva >> 22].te_pa = pa + i;
-               if (map_phys(-1, PAGE_SIZE_4M, mva, pa + i) != 0)
-                       printf("%s: can't map physical page\n", __func__);
-       }
-       if (free_excess)
-               release_phys(pa, PAGE_SIZE_256M);
-}
-
 /*
  * other MD functions
  */
@@ -809,7 +764,6 @@ main(int (*openfirm)(void *))
        archsw.arch_copyout = ofw_copyout;
        archsw.arch_readin = sparc64_readin;
        archsw.arch_autoload = sparc64_autoload;
-       archsw.arch_maphint = sparc64_maphint;
 
        if (init_heap() == (vm_offset_t)-1)
                OF_exit();
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to