aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/frv/kernel/setup.c')
-rw-r--r--arch/frv/kernel/setup.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index a5136474c6fd..ae3a6706419b 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -735,7 +735,7 @@ static void __init parse_cmdline_early(char *cmdline)
735 /* "mem=XXX[kKmM]" sets SDRAM size to <mem>, overriding the value we worked 735 /* "mem=XXX[kKmM]" sets SDRAM size to <mem>, overriding the value we worked
736 * out from the SDRAM controller mask register 736 * out from the SDRAM controller mask register
737 */ 737 */
738 if (!memcmp(cmdline, "mem=", 4)) { 738 if (!strncmp(cmdline, "mem=", 4)) {
739 unsigned long long mem_size; 739 unsigned long long mem_size;
740 740
741 mem_size = memparse(cmdline + 4, &cmdline); 741 mem_size = memparse(cmdline + 4, &cmdline);
@@ -876,6 +876,7 @@ late_initcall(setup_arch_serial);
876static void __init setup_linux_memory(void) 876static void __init setup_linux_memory(void)
877{ 877{
878 unsigned long bootmap_size, low_top_pfn, kstart, kend, high_mem; 878 unsigned long bootmap_size, low_top_pfn, kstart, kend, high_mem;
879 unsigned long physpages;
879 880
880 kstart = (unsigned long) &__kernel_image_start - PAGE_OFFSET; 881 kstart = (unsigned long) &__kernel_image_start - PAGE_OFFSET;
881 kend = (unsigned long) &__kernel_image_end - PAGE_OFFSET; 882 kend = (unsigned long) &__kernel_image_end - PAGE_OFFSET;
@@ -893,19 +894,19 @@ static void __init setup_linux_memory(void)
893 ); 894 );
894 895
895 /* pass the memory that the kernel can immediately use over to the bootmem allocator */ 896 /* pass the memory that the kernel can immediately use over to the bootmem allocator */
896 max_mapnr = num_physpages = (memory_end - memory_start) >> PAGE_SHIFT; 897 max_mapnr = physpages = (memory_end - memory_start) >> PAGE_SHIFT;
897 low_top_pfn = (KERNEL_LOWMEM_END - KERNEL_LOWMEM_START) >> PAGE_SHIFT; 898 low_top_pfn = (KERNEL_LOWMEM_END - KERNEL_LOWMEM_START) >> PAGE_SHIFT;
898 high_mem = 0; 899 high_mem = 0;
899 900
900 if (num_physpages > low_top_pfn) { 901 if (physpages > low_top_pfn) {
901#ifdef CONFIG_HIGHMEM 902#ifdef CONFIG_HIGHMEM
902 high_mem = num_physpages - low_top_pfn; 903 high_mem = physpages - low_top_pfn;
903#else 904#else
904 max_mapnr = num_physpages = low_top_pfn; 905 max_mapnr = physpages = low_top_pfn;
905#endif 906#endif
906 } 907 }
907 else { 908 else {
908 low_top_pfn = num_physpages; 909 low_top_pfn = physpages;
909 } 910 }
910 911
911 min_low_pfn = memory_start >> PAGE_SHIFT; 912 min_low_pfn = memory_start >> PAGE_SHIFT;
@@ -979,7 +980,7 @@ static void __init setup_uclinux_memory(void)
979 free_bootmem(memory_start, memory_end - memory_start); 980 free_bootmem(memory_start, memory_end - memory_start);
980 981
981 high_memory = (void *) (memory_end & PAGE_MASK); 982 high_memory = (void *) (memory_end & PAGE_MASK);
982 max_mapnr = num_physpages = ((unsigned long) high_memory - PAGE_OFFSET) >> PAGE_SHIFT; 983 max_mapnr = ((unsigned long) high_memory - PAGE_OFFSET) >> PAGE_SHIFT;
983 984
984 min_low_pfn = memory_start >> PAGE_SHIFT; 985 min_low_pfn = memory_start >> PAGE_SHIFT;
985 max_low_pfn = memory_end >> PAGE_SHIFT; 986 max_low_pfn = memory_end >> PAGE_SHIFT;