diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-16 14:51:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-16 14:51:08 -0400 |
commit | 271ecc5253e2b317d729d366560789cd7f93836c (patch) | |
tree | d3a60bc4dfa8245ff934f357f2367db76b59e7cf /arch/m32r | |
parent | aa6865d836418eb2ba888a4cb1318a28e9aa2e0c (diff) | |
parent | 63c06227a22b098a3849c5c99e836aea161ca0d7 (diff) |
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
...
Diffstat (limited to 'arch/m32r')
-rw-r--r-- | arch/m32r/mm/init.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c index 0d4146f644dc..11fa717d93b1 100644 --- a/arch/m32r/mm/init.c +++ b/arch/m32r/mm/init.c | |||
@@ -59,21 +59,24 @@ void free_initrd_mem(unsigned long, unsigned long); | |||
59 | void __init zone_sizes_init(void) | 59 | void __init zone_sizes_init(void) |
60 | { | 60 | { |
61 | unsigned long zones_size[MAX_NR_ZONES] = {0, }; | 61 | unsigned long zones_size[MAX_NR_ZONES] = {0, }; |
62 | unsigned long max_dma; | ||
63 | unsigned long low; | ||
64 | unsigned long start_pfn; | 62 | unsigned long start_pfn; |
65 | 63 | ||
66 | #ifdef CONFIG_MMU | 64 | #ifdef CONFIG_MMU |
67 | start_pfn = START_PFN(0); | 65 | { |
68 | max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; | 66 | unsigned long low; |
69 | low = MAX_LOW_PFN(0); | 67 | unsigned long max_dma; |
70 | 68 | ||
71 | if (low < max_dma){ | 69 | start_pfn = START_PFN(0); |
72 | zones_size[ZONE_DMA] = low - start_pfn; | 70 | max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; |
73 | zones_size[ZONE_NORMAL] = 0; | 71 | low = MAX_LOW_PFN(0); |
74 | } else { | 72 | |
75 | zones_size[ZONE_DMA] = low - start_pfn; | 73 | if (low < max_dma) { |
76 | zones_size[ZONE_NORMAL] = low - max_dma; | 74 | zones_size[ZONE_DMA] = low - start_pfn; |
75 | zones_size[ZONE_NORMAL] = 0; | ||
76 | } else { | ||
77 | zones_size[ZONE_DMA] = low - start_pfn; | ||
78 | zones_size[ZONE_NORMAL] = low - max_dma; | ||
79 | } | ||
77 | } | 80 | } |
78 | #else | 81 | #else |
79 | zones_size[ZONE_DMA] = 0 >> PAGE_SHIFT; | 82 | zones_size[ZONE_DMA] = 0 >> PAGE_SHIFT; |