diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86/mm/init_32.c | 6 | ||||
| -rw-r--r-- | arch/x86/mm/init_64.c | 20 |
2 files changed, 2 insertions, 24 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index bca79091b9d6..90e054589aae 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
| @@ -1069,9 +1069,3 @@ void mark_rodata_ro(void) | |||
| 1069 | #endif | 1069 | #endif |
| 1070 | } | 1070 | } |
| 1071 | #endif | 1071 | #endif |
| 1072 | |||
| 1073 | int __init reserve_bootmem_generic(unsigned long phys, unsigned long len, | ||
| 1074 | int flags) | ||
| 1075 | { | ||
| 1076 | return reserve_bootmem(phys, len, flags); | ||
| 1077 | } | ||
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index ee41bba315d1..634fa0884a41 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
| @@ -799,13 +799,10 @@ void mark_rodata_ro(void) | |||
| 799 | 799 | ||
| 800 | #endif | 800 | #endif |
| 801 | 801 | ||
| 802 | #ifndef CONFIG_NO_BOOTMEM | ||
| 802 | int __init reserve_bootmem_generic(unsigned long phys, unsigned long len, | 803 | int __init reserve_bootmem_generic(unsigned long phys, unsigned long len, |
| 803 | int flags) | 804 | int flags) |
| 804 | { | 805 | { |
| 805 | #ifdef CONFIG_NUMA | ||
| 806 | int nid, next_nid; | ||
| 807 | int ret; | ||
| 808 | #endif | ||
| 809 | unsigned long pfn = phys >> PAGE_SHIFT; | 806 | unsigned long pfn = phys >> PAGE_SHIFT; |
| 810 | 807 | ||
| 811 | if (pfn >= max_pfn) { | 808 | if (pfn >= max_pfn) { |
| @@ -821,21 +818,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len, | |||
| 821 | return -EFAULT; | 818 | return -EFAULT; |
| 822 | } | 819 | } |
| 823 | 820 | ||
| 824 | /* Should check here against the e820 map to avoid double free */ | ||
| 825 | #ifdef CONFIG_NUMA | ||
| 826 | nid = phys_to_nid(phys); | ||
| 827 | next_nid = phys_to_nid(phys + len - 1); | ||
| 828 | if (nid == next_nid) | ||
| 829 | ret = reserve_bootmem_node(NODE_DATA(nid), phys, len, flags); | ||
| 830 | else | ||
| 831 | ret = reserve_bootmem(phys, len, flags); | ||
| 832 | |||
| 833 | if (ret != 0) | ||
| 834 | return ret; | ||
| 835 | |||
| 836 | #else | ||
| 837 | reserve_bootmem(phys, len, flags); | 821 | reserve_bootmem(phys, len, flags); |
| 838 | #endif | ||
| 839 | 822 | ||
| 840 | if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) { | 823 | if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) { |
| 841 | dma_reserve += len / PAGE_SIZE; | 824 | dma_reserve += len / PAGE_SIZE; |
| @@ -844,6 +827,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len, | |||
| 844 | 827 | ||
| 845 | return 0; | 828 | return 0; |
| 846 | } | 829 | } |
| 830 | #endif | ||
| 847 | 831 | ||
| 848 | int kern_addr_valid(unsigned long addr) | 832 | int kern_addr_valid(unsigned long addr) |
| 849 | { | 833 | { |
