mmu.c (7961239599de71130c852ecfa9a4140f3f60547b) | mmu.c (be370302742ff9948f2a42b15cb2ba174d97b930) |
---|---|
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. --- 813 unchanged lines hidden (view full) --- 822 * memory bank, up to the end of the vmalloc region. 823 */ 824 for (addr = __phys_to_virt(bank_phys_end(&meminfo.bank[0])); 825 addr < VMALLOC_END; addr += PGDIR_SIZE) 826 pmd_clear(pmd_off_k(addr)); 827} 828 829/* | 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. --- 813 unchanged lines hidden (view full) --- 822 * memory bank, up to the end of the vmalloc region. 823 */ 824 for (addr = __phys_to_virt(bank_phys_end(&meminfo.bank[0])); 825 addr < VMALLOC_END; addr += PGDIR_SIZE) 826 pmd_clear(pmd_off_k(addr)); 827} 828 829/* |
830 * Reserve the various regions of node 0 | 830 * Reserve the various regions |
831 */ | 831 */ |
832void __init reserve_node_zero(pg_data_t *pgdat) | 832void __init reserve_special_regions(void) |
833{ 834 unsigned long res_size = 0; 835 836 /* 837 * Register the kernel text and data with bootmem. 838 * Note that this can only be in node 0. 839 */ 840#ifdef CONFIG_XIP_KERNEL | 833{ 834 unsigned long res_size = 0; 835 836 /* 837 * Register the kernel text and data with bootmem. 838 * Note that this can only be in node 0. 839 */ 840#ifdef CONFIG_XIP_KERNEL |
841 reserve_bootmem_node(pgdat, __pa(_data), _end - _data, 842 BOOTMEM_DEFAULT); | 841 reserve_bootmem(__pa(_data), _end - _data, BOOTMEM_DEFAULT); |
843#else | 842#else |
844 reserve_bootmem_node(pgdat, __pa(_stext), _end - _stext, 845 BOOTMEM_DEFAULT); | 843 reserve_bootmem(__pa(_stext), _end - _stext, BOOTMEM_DEFAULT); |
846#endif 847 848 /* 849 * Reserve the page tables. These are already in use, 850 * and can only be in node 0. 851 */ | 844#endif 845 846 /* 847 * Reserve the page tables. These are already in use, 848 * and can only be in node 0. 849 */ |
852 reserve_bootmem_node(pgdat, __pa(swapper_pg_dir), 853 PTRS_PER_PGD * sizeof(pgd_t), BOOTMEM_DEFAULT); | 850 reserve_bootmem(__pa(swapper_pg_dir), 851 PTRS_PER_PGD * sizeof(pgd_t), BOOTMEM_DEFAULT); |
854 855 /* 856 * Hmm... This should go elsewhere, but we really really need to 857 * stop things allocating the low memory; ideally we need a better 858 * implementation of GFP_DMA which does not assume that DMA-able 859 * memory starts at zero. 860 */ 861 if (machine_is_integrator() || machine_is_cintegrator()) --- 7 unchanged lines hidden (view full) --- 869 res_size = 0x00020000; 870 if (machine_is_p720t()) 871 res_size = 0x00014000; 872 873 /* H1940, RX3715 and RX1950 need to reserve this for suspend */ 874 875 if (machine_is_h1940() || machine_is_rx3715() 876 || machine_is_rx1950()) { | 852 853 /* 854 * Hmm... This should go elsewhere, but we really really need to 855 * stop things allocating the low memory; ideally we need a better 856 * implementation of GFP_DMA which does not assume that DMA-able 857 * memory starts at zero. 858 */ 859 if (machine_is_integrator() || machine_is_cintegrator()) --- 7 unchanged lines hidden (view full) --- 867 res_size = 0x00020000; 868 if (machine_is_p720t()) 869 res_size = 0x00014000; 870 871 /* H1940, RX3715 and RX1950 need to reserve this for suspend */ 872 873 if (machine_is_h1940() || machine_is_rx3715() 874 || machine_is_rx1950()) { |
877 reserve_bootmem_node(pgdat, 0x30003000, 0x1000, 878 BOOTMEM_DEFAULT); 879 reserve_bootmem_node(pgdat, 0x30081000, 0x1000, 880 BOOTMEM_DEFAULT); | 875 reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT); 876 reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT); |
881 } 882 883 if (machine_is_palmld() || machine_is_palmtx()) { | 877 } 878 879 if (machine_is_palmld() || machine_is_palmtx()) { |
884 reserve_bootmem_node(pgdat, 0xa0000000, 0x1000, 885 BOOTMEM_EXCLUSIVE); 886 reserve_bootmem_node(pgdat, 0xa0200000, 0x1000, 887 BOOTMEM_EXCLUSIVE); | 880 reserve_bootmem(0xa0000000, 0x1000, BOOTMEM_EXCLUSIVE); 881 reserve_bootmem(0xa0200000, 0x1000, BOOTMEM_EXCLUSIVE); |
888 } 889 890 if (machine_is_treo680() || machine_is_centro()) { | 882 } 883 884 if (machine_is_treo680() || machine_is_centro()) { |
891 reserve_bootmem_node(pgdat, 0xa0000000, 0x1000, 892 BOOTMEM_EXCLUSIVE); 893 reserve_bootmem_node(pgdat, 0xa2000000, 0x1000, 894 BOOTMEM_EXCLUSIVE); | 885 reserve_bootmem(0xa0000000, 0x1000, BOOTMEM_EXCLUSIVE); 886 reserve_bootmem(0xa2000000, 0x1000, BOOTMEM_EXCLUSIVE); |
895 } 896 897 if (machine_is_palmt5()) | 887 } 888 889 if (machine_is_palmt5()) |
898 reserve_bootmem_node(pgdat, 0xa0200000, 0x1000, 899 BOOTMEM_EXCLUSIVE); | 890 reserve_bootmem(0xa0200000, 0x1000, BOOTMEM_EXCLUSIVE); |
900 901 /* 902 * U300 - This platform family can share physical memory 903 * between two ARM cpus, one running Linux and the other 904 * running another OS. 905 */ 906 if (machine_is_u300()) { 907#ifdef CONFIG_MACH_U300_SINGLE_RAM --- 7 unchanged lines hidden (view full) --- 915#ifdef CONFIG_SA1111 916 /* 917 * Because of the SA1111 DMA bug, we want to preserve our 918 * precious DMA-able memory... 919 */ 920 res_size = __pa(swapper_pg_dir) - PHYS_OFFSET; 921#endif 922 if (res_size) | 891 892 /* 893 * U300 - This platform family can share physical memory 894 * between two ARM cpus, one running Linux and the other 895 * running another OS. 896 */ 897 if (machine_is_u300()) { 898#ifdef CONFIG_MACH_U300_SINGLE_RAM --- 7 unchanged lines hidden (view full) --- 906#ifdef CONFIG_SA1111 907 /* 908 * Because of the SA1111 DMA bug, we want to preserve our 909 * precious DMA-able memory... 910 */ 911 res_size = __pa(swapper_pg_dir) - PHYS_OFFSET; 912#endif 913 if (res_size) |
923 reserve_bootmem_node(pgdat, PHYS_OFFSET, res_size, 924 BOOTMEM_DEFAULT); | 914 reserve_bootmem(PHYS_OFFSET, res_size, BOOTMEM_DEFAULT); |
925} 926 927/* 928 * Set up device the mappings. Since we clear out the page tables for all 929 * mappings above VMALLOC_END, we will remove any debug device mappings. 930 * This means you have to be careful how you debug this function, or any 931 * called function. This means you can't use any function or debugging 932 * method which may touch any device, otherwise the kernel _will_ crash. --- 185 unchanged lines hidden --- | 915} 916 917/* 918 * Set up device the mappings. Since we clear out the page tables for all 919 * mappings above VMALLOC_END, we will remove any debug device mappings. 920 * This means you have to be careful how you debug this function, or any 921 * called function. This means you can't use any function or debugging 922 * method which may touch any device, otherwise the kernel _will_ crash. --- 185 unchanged lines hidden --- |