/*1* arch/score/mm/pgtable-32.c2*3* Score Processor version.4*5* Copyright (C) 2009 Sunplus Core Technology Co., Ltd.6* Lennox Wu <[email protected]>7* Chen Liqin <[email protected]>8*9* This program is free software; you can redistribute it and/or modify10* it under the terms of the GNU General Public License as published by11* the Free Software Foundation; either version 2 of the License, or12* (at your option) any later version.13*14* This program is distributed in the hope that it will be useful,15* but WITHOUT ANY WARRANTY; without even the implied warranty of16* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the17* GNU General Public License for more details.18*19* You should have received a copy of the GNU General Public License20* along with this program; if not, see the file COPYING, or write21* to the Free Software Foundation, Inc.,22* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA23*/2425#include <linux/bootmem.h>26#include <linux/init.h>27#include <linux/pfn.h>28#include <linux/mm.h>2930void pgd_init(unsigned long page)31{32unsigned long *p = (unsigned long *) page;33int i;3435for (i = 0; i < USER_PTRS_PER_PGD; i += 8) {36p[i + 0] = (unsigned long) invalid_pte_table;37p[i + 1] = (unsigned long) invalid_pte_table;38p[i + 2] = (unsigned long) invalid_pte_table;39p[i + 3] = (unsigned long) invalid_pte_table;40p[i + 4] = (unsigned long) invalid_pte_table;41p[i + 5] = (unsigned long) invalid_pte_table;42p[i + 6] = (unsigned long) invalid_pte_table;43p[i + 7] = (unsigned long) invalid_pte_table;44}45}4647void __init pagetable_init(void)48{49/* Initialize the entire pgd. */50pgd_init((unsigned long)swapper_pg_dir);51}525354