diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 18:15:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 18:15:27 -0400 |
commit | 42cd71bf1e3a081b3150018bbf448cb6c8a844a5 (patch) | |
tree | 4a5d2eb0444255e4ad827a76dbd1417dd3876db6 /arch/arm/mm/init.c | |
parent | f5039935ac685b3b9b8c13fbc33cac8643dee32e (diff) | |
parent | 9a55d9752d8abfc62f1ab05ccc790d22a0c8e7c0 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (137 commits)
ARM: bcmring: convert to use sp804 clockevents
ARM: bcmring: convert to sp804 clocksource
ARM: 6912/1: bcmring: Add clkdev table in init_early
clockevents: ARM sp804: obtain sp804 timer rate via clks
clockevents: ARM sp804: allow clockevent name to be specified
clocksource: ARM sp804: obtain sp804 timer rate via clks
clocksource: ARM sp804: allow clocksource name to be specified
clocksource: convert OMAP1 to 32-bit down counting clocksource
clocksource: convert MXS timrotv2 to 32-bit down counting clocksource
clocksource: convert SPEAr platforms 16-bit up counting clocksource
clocksource: convert Integrator/AP 16-bit down counting clocksource
clocksource: convert W90x900 24-bit down counting clocksource
clocksource: convert ARM 32-bit down counting clocksources
clocksource: convert ARM 32-bit up counting clocksources
clocksource: add common mmio clocksource
ARM: update sa1100 to reflect PXA updates
ARM: omap1: convert to using readl/writel instead of volatile struct
ARM: omap1: delete useless interrupt handler
ARM: s5p: consolidate selection of timer register
ARM: 6939/1: fix missing 'cpu_relax()' declaration
...
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r-- | arch/arm/mm/init.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index e591513bb53e..76f82ae44efb 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -201,6 +201,20 @@ static void __init arm_bootmem_init(unsigned long start_pfn, | |||
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
204 | #ifdef CONFIG_ZONE_DMA | ||
205 | static void __init arm_adjust_dma_zone(unsigned long *size, unsigned long *hole, | ||
206 | unsigned long dma_size) | ||
207 | { | ||
208 | if (size[0] <= dma_size) | ||
209 | return; | ||
210 | |||
211 | size[ZONE_NORMAL] = size[0] - dma_size; | ||
212 | size[ZONE_DMA] = dma_size; | ||
213 | hole[ZONE_NORMAL] = hole[0]; | ||
214 | hole[ZONE_DMA] = 0; | ||
215 | } | ||
216 | #endif | ||
217 | |||
204 | static void __init arm_bootmem_free(unsigned long min, unsigned long max_low, | 218 | static void __init arm_bootmem_free(unsigned long min, unsigned long max_low, |
205 | unsigned long max_high) | 219 | unsigned long max_high) |
206 | { | 220 | { |
@@ -243,11 +257,18 @@ static void __init arm_bootmem_free(unsigned long min, unsigned long max_low, | |||
243 | #endif | 257 | #endif |
244 | } | 258 | } |
245 | 259 | ||
260 | #ifdef ARM_DMA_ZONE_SIZE | ||
261 | #ifndef CONFIG_ZONE_DMA | ||
262 | #error ARM_DMA_ZONE_SIZE set but no DMA zone to limit allocations | ||
263 | #endif | ||
264 | |||
246 | /* | 265 | /* |
247 | * Adjust the sizes according to any special requirements for | 266 | * Adjust the sizes according to any special requirements for |
248 | * this machine type. | 267 | * this machine type. |
249 | */ | 268 | */ |
250 | arch_adjust_zones(zone_size, zhole_size); | 269 | arm_adjust_dma_zone(zone_size, zhole_size, |
270 | ARM_DMA_ZONE_SIZE >> PAGE_SHIFT); | ||
271 | #endif | ||
251 | 272 | ||
252 | free_area_init_node(0, zone_size, min, zhole_size); | 273 | free_area_init_node(0, zone_size, min, zhole_size); |
253 | } | 274 | } |