Skip to content
Snippets Groups Projects
Select Git revision
  • d52e5a7e7ca49457dd31fc8b42fb7c0d58a31221
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

ip.h

Blame
  • pgtable-64.c 2.54 KiB
    /*
     * This file is subject to the terms and conditions of the GNU General Public
     * License.  See the file "COPYING" in the main directory of this archive
     * for more details.
     *
     * Copyright (C) 1999, 2000 by Silicon Graphics
     * Copyright (C) 2003 by Ralf Baechle
     */
    #include <linux/export.h>
    #include <linux/init.h>
    #include <linux/mm.h>
    #include <asm/fixmap.h>
    #include <asm/pgtable.h>
    #include <asm/pgalloc.h>
    #include <asm/tlbflush.h>
    
    void pgd_init(unsigned long page)
    {
    	unsigned long *p, *end;
    	unsigned long entry;
    
    #if !defined(__PAGETABLE_PUD_FOLDED)
    	entry = (unsigned long)invalid_pud_table;
    #elif !defined(__PAGETABLE_PMD_FOLDED)
    	entry = (unsigned long)invalid_pmd_table;
    #else
    	entry = (unsigned long)invalid_pte_table;
    #endif
    
    	p = (unsigned long *) page;
    	end = p + PTRS_PER_PGD;
    
    	do {
    		p[0] = entry;
    		p[1] = entry;
    		p[2] = entry;
    		p[3] = entry;
    		p[4] = entry;
    		p += 8;
    		p[-3] = entry;
    		p[-2] = entry;
    		p[-1] = entry;
    	} while (p != end);
    }
    
    #ifndef __PAGETABLE_PMD_FOLDED
    void pmd_init(unsigned long addr, unsigned long pagetable)
    {
    	unsigned long *p, *end;
    
    	p = (unsigned long *) addr;
    	end = p + PTRS_PER_PMD;
    
    	do {
    		p[0] = pagetable;
    		p[1] = pagetable;
    		p[2] = pagetable;
    		p[3] = pagetable;
    		p[4] = pagetable;
    		p += 8;
    		p[-3] = pagetable;
    		p[-2] = pagetable;
    		p[-1] = pagetable;
    	} while (p != end);
    }
    EXPORT_SYMBOL_GPL(pmd_init);
    #endif
    
    #ifndef __PAGETABLE_PUD_FOLDED
    void pud_init(unsigned long addr, unsigned long pagetable)