mmu.c (245f0db0de926601353776085e6f6a4c974c5615) | mmu.c (3ed3a4f0ddffece942bb2661924d87be4ce63cb7) |
---|---|
1/* 2 * linux/arch/arm/mm/mmu.c 3 * 4 * Copyright (C) 1995-2005 Russell King 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 718 unchanged lines hidden (view full) --- 727static void *__init late_alloc(unsigned long sz) 728{ 729 void *ptr = (void *)__get_free_pages(PGALLOC_GFP, get_order(sz)); 730 731 BUG_ON(!ptr); 732 return ptr; 733} 734 | 1/* 2 * linux/arch/arm/mm/mmu.c 3 * 4 * Copyright (C) 1995-2005 Russell King 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 718 unchanged lines hidden (view full) --- 727static void *__init late_alloc(unsigned long sz) 728{ 729 void *ptr = (void *)__get_free_pages(PGALLOC_GFP, get_order(sz)); 730 731 BUG_ON(!ptr); 732 return ptr; 733} 734 |
735static pte_t * __init pte_alloc(pmd_t *pmd, unsigned long addr, | 735static pte_t * __init arm_pte_alloc(pmd_t *pmd, unsigned long addr, |
736 unsigned long prot, 737 void *(*alloc)(unsigned long sz)) 738{ 739 if (pmd_none(*pmd)) { 740 pte_t *pte = alloc(PTE_HWTABLE_OFF + PTE_HWTABLE_SIZE); 741 __pmd_populate(pmd, __pa(pte), prot); 742 } 743 BUG_ON(pmd_bad(*pmd)); 744 return pte_offset_kernel(pmd, addr); 745} 746 747static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, 748 unsigned long prot) 749{ | 736 unsigned long prot, 737 void *(*alloc)(unsigned long sz)) 738{ 739 if (pmd_none(*pmd)) { 740 pte_t *pte = alloc(PTE_HWTABLE_OFF + PTE_HWTABLE_SIZE); 741 __pmd_populate(pmd, __pa(pte), prot); 742 } 743 BUG_ON(pmd_bad(*pmd)); 744 return pte_offset_kernel(pmd, addr); 745} 746 747static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, 748 unsigned long prot) 749{ |
750 return pte_alloc(pmd, addr, prot, early_alloc); | 750 return arm_pte_alloc(pmd, addr, prot, early_alloc); |
751} 752 753static void __init alloc_init_pte(pmd_t *pmd, unsigned long addr, 754 unsigned long end, unsigned long pfn, 755 const struct mem_type *type, 756 void *(*alloc)(unsigned long sz), 757 bool ng) 758{ | 751} 752 753static void __init alloc_init_pte(pmd_t *pmd, unsigned long addr, 754 unsigned long end, unsigned long pfn, 755 const struct mem_type *type, 756 void *(*alloc)(unsigned long sz), 757 bool ng) 758{ |
759 pte_t *pte = pte_alloc(pmd, addr, type->prot_l1, alloc); | 759 pte_t *pte = arm_pte_alloc(pmd, addr, type->prot_l1, alloc); |
760 do { 761 set_pte_ext(pte, pfn_pte(pfn, __pgprot(type->prot_pte)), 762 ng ? PTE_EXT_NG : 0); 763 pfn++; 764 } while (pte++, addr += PAGE_SIZE, addr != end); 765} 766 767static void __init __map_init_section(pmd_t *pmd, unsigned long addr, --- 875 unchanged lines hidden --- | 760 do { 761 set_pte_ext(pte, pfn_pte(pfn, __pgprot(type->prot_pte)), 762 ng ? PTE_EXT_NG : 0); 763 pfn++; 764 } while (pte++, addr += PAGE_SIZE, addr != end); 765} 766 767static void __init __map_init_section(pmd_t *pmd, unsigned long addr, --- 875 unchanged lines hidden --- |