Merge branch 'akpm' (patches from Andrew)
Merge first patch-bomb from Andrew Morton: - some misc things - ofs2 updates - about half of MM - checkpatch updates - autofs4 update * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (120 commits) autofs4: fix string.h include in auto_dev-ioctl.h autofs4: use pr_xxx() macros directly for logging autofs4: change log print macros to not insert newline autofs4: make autofs log prints consistent autofs4: fix some white space errors autofs4: fix invalid ioctl return in autofs4_root_ioctl_unlocked() autofs4: fix coding style line length in autofs4_wait() autofs4: fix coding style problem in autofs4_get_set_timeout() autofs4: coding style fixes autofs: show pipe inode in mount options kallsyms: add support for relative offsets in kallsyms address table kallsyms: don't overload absolute symbol type for percpu symbols x86: kallsyms: disable absolute percpu symbols on !SMP checkpatch: fix another left brace warning checkpatch: improve UNSPECIFIED_INT test for bare signed/unsigned uses checkpatch: warn on bare unsigned or signed declarations without int checkpatch: exclude asm volatile from complex macro check mm: memcontrol: drop unnecessary lru locking from mem_cgroup_migrate() mm: migrate: consolidate mem_cgroup_migrate() calls mm/compaction: speed up pageblock_pfn_to_page() when zone is contiguous ...
This commit is contained in:
@@ -59,21 +59,24 @@ void free_initrd_mem(unsigned long, unsigned long);
|
||||
void __init zone_sizes_init(void)
|
||||
{
|
||||
unsigned long zones_size[MAX_NR_ZONES] = {0, };
|
||||
unsigned long max_dma;
|
||||
unsigned long low;
|
||||
unsigned long start_pfn;
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
start_pfn = START_PFN(0);
|
||||
max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
|
||||
low = MAX_LOW_PFN(0);
|
||||
{
|
||||
unsigned long low;
|
||||
unsigned long max_dma;
|
||||
|
||||
if (low < max_dma){
|
||||
zones_size[ZONE_DMA] = low - start_pfn;
|
||||
zones_size[ZONE_NORMAL] = 0;
|
||||
} else {
|
||||
zones_size[ZONE_DMA] = low - start_pfn;
|
||||
zones_size[ZONE_NORMAL] = low - max_dma;
|
||||
start_pfn = START_PFN(0);
|
||||
max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
|
||||
low = MAX_LOW_PFN(0);
|
||||
|
||||
if (low < max_dma) {
|
||||
zones_size[ZONE_DMA] = low - start_pfn;
|
||||
zones_size[ZONE_NORMAL] = 0;
|
||||
} else {
|
||||
zones_size[ZONE_DMA] = low - start_pfn;
|
||||
zones_size[ZONE_NORMAL] = low - max_dma;
|
||||
}
|
||||
}
|
||||
#else
|
||||
zones_size[ZONE_DMA] = 0 >> PAGE_SHIFT;
|
||||
|
Reference in New Issue
Block a user