init.c (47ea3c15498154f634c304e08dee284efdd7dceb) | init.c (d0e775afb94d9b61ba6c63299169ef7a87b68189) |
---|---|
1/* 2 * linux/arch/arm/mm/init.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. --- 422 unchanged lines hidden (view full) --- 431 * Align up here since the VM subsystem insists that the 432 * memmap entries are valid from the bank end aligned to 433 * MAX_ORDER_NR_PAGES. 434 */ 435 prev_bank_end = ALIGN(bank_pfn_end(bank), MAX_ORDER_NR_PAGES); 436 } 437} 438 | 1/* 2 * linux/arch/arm/mm/init.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. --- 422 unchanged lines hidden (view full) --- 431 * Align up here since the VM subsystem insists that the 432 * memmap entries are valid from the bank end aligned to 433 * MAX_ORDER_NR_PAGES. 434 */ 435 prev_bank_end = ALIGN(bank_pfn_end(bank), MAX_ORDER_NR_PAGES); 436 } 437} 438 |
439static void __init free_highpages(void) 440{ 441#ifdef CONFIG_HIGHMEM 442 int i; 443 444 /* set highmem page free */ 445 for_each_bank (i, &meminfo) { 446 unsigned long start = bank_pfn_start(&meminfo.bank[i]); 447 unsigned long end = bank_pfn_end(&meminfo.bank[i]); 448 if (start >= max_low_pfn + PHYS_PFN_OFFSET) 449 totalhigh_pages += free_area(start, end, NULL); 450 } 451 totalram_pages += totalhigh_pages; 452#endif 453} 454 |
|
439/* 440 * mem_init() marks the free areas in the mem_map and tells us how much 441 * memory is free. This is done after various parts of the system have 442 * claimed their memory after the kernel image. 443 */ 444void __init mem_init(void) 445{ 446 unsigned long reserved_pages, free_pages; --- 13 unchanged lines hidden (view full) --- 460 totalram_pages += free_all_bootmem(); 461 462#ifdef CONFIG_SA1111 463 /* now that our DMA memory is actually so designated, we can free it */ 464 totalram_pages += free_area(PHYS_PFN_OFFSET, 465 __phys_to_pfn(__pa(swapper_pg_dir)), NULL); 466#endif 467 | 455/* 456 * mem_init() marks the free areas in the mem_map and tells us how much 457 * memory is free. This is done after various parts of the system have 458 * claimed their memory after the kernel image. 459 */ 460void __init mem_init(void) 461{ 462 unsigned long reserved_pages, free_pages; --- 13 unchanged lines hidden (view full) --- 476 totalram_pages += free_all_bootmem(); 477 478#ifdef CONFIG_SA1111 479 /* now that our DMA memory is actually so designated, we can free it */ 480 totalram_pages += free_area(PHYS_PFN_OFFSET, 481 __phys_to_pfn(__pa(swapper_pg_dir)), NULL); 482#endif 483 |
468#ifdef CONFIG_HIGHMEM 469 /* set highmem page free */ 470 for_each_bank (i, &meminfo) { 471 unsigned long start = bank_pfn_start(&meminfo.bank[i]); 472 unsigned long end = bank_pfn_end(&meminfo.bank[i]); 473 if (start >= max_low_pfn + PHYS_PFN_OFFSET) 474 totalhigh_pages += free_area(start, end, NULL); 475 } 476 totalram_pages += totalhigh_pages; 477#endif | 484 free_highpages(); |
478 479 reserved_pages = free_pages = 0; 480 481 for_each_bank(i, &meminfo) { 482 struct membank *bank = &meminfo.bank[i]; 483 unsigned int pfn1, pfn2; 484 struct page *page, *end; 485 --- 149 unchanged lines hidden --- | 485 486 reserved_pages = free_pages = 0; 487 488 for_each_bank(i, &meminfo) { 489 struct membank *bank = &meminfo.bank[i]; 490 unsigned int pfn1, pfn2; 491 struct page *page, *end; 492 --- 149 unchanged lines hidden --- |