]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
xen/vmap: remove cache coloring #ifdef
authorStefano Stabellini <sstabellini@kernel.org>
Wed, 11 Dec 2019 01:24:11 +0000 (17:24 -0800)
committerLuca Miccio <206497@studenti.unimore.it>
Mon, 6 Jan 2020 14:54:33 +0000 (15:54 +0100)
Remove the #ifdef code introduce by coloring, let's go back to the
original implementation of __vmap.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
xen/common/vmap.c

index be442ff288c80bb432d5283ad32a80ae7912d973..c40d4135f4afb42f70eb589ea6374cea5dd24f06 100644 (file)
@@ -206,35 +206,6 @@ void *__vmap(const mfn_t *mfn, unsigned int granularity,
 {
     void *va = vm_alloc(nr * granularity, align, type);
     unsigned long cur = (unsigned long)va;
-#ifdef CONFIG_COLORING
-    /*
-     * Since the alternative module re-maps the Xen text, we need to handle
-     * the coloring scenario.
-     * In that case we need to re-map Xen using the same coloring logic used
-     * before during setup_pagetables.
-     */
-    if ((unsigned long)mfn_to_maddr(*mfn) == __pa(_start))
-    {
-        mfn_t mfn_col;
-        paddr_t xen_paddr = mfn_to_maddr(*mfn);
-        int iter = granularity * nr;
-        int i;
-
-        C_DEBUG("VM Alloc: %p\n", va);
-        C_DEBUG("Starting to mapping colored from physical 0x%lx\n", xen_paddr);
-        for ( i = 0; i < iter; i++, cur += PAGE_SIZE )
-        {
-            xen_paddr = next_xen_colored(xen_paddr);
-            mfn_col = maddr_to_mfn(xen_paddr);
-            if ( map_pages_to_xen(cur, mfn_col, 1, flags) )
-            {
-                vunmap(va);
-                va = NULL;
-            }
-            xen_paddr += PAGE_SIZE;
-        }
-    } else
-#endif
     for ( ; va && nr--; ++mfn, cur += PAGE_SIZE * granularity )
     {
         if ( map_pages_to_xen(cur, *mfn, granularity, flags) )