~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to arch/arm/mm/init.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
        struct meminfo * mi = &meminfo;
96
96
 
97
97
        printk("Mem-info:\n");
98
 
        show_free_areas();
 
98
        show_free_areas(filter);
99
99
 
100
100
        for_each_bank (i, mi) {
101
101
                struct membank *bank = &mi->bank[i];
212
212
}
213
213
 
214
214
#ifdef CONFIG_ZONE_DMA
 
215
 
 
216
unsigned long arm_dma_zone_size __read_mostly;
 
217
EXPORT_SYMBOL(arm_dma_zone_size);
 
218
 
 
219
/*
 
220
 * The DMA mask corresponding to the maximum bus address allocatable
 
221
 * using GFP_DMA.  The default here places no restriction on DMA
 
222
 * allocations.  This must be the smallest DMA mask in the system,
 
223
 * so a successful GFP_DMA allocation will always satisfy this.
 
224
 */
 
225
u32 arm_dma_limit;
 
226
 
215
227
static void __init arm_adjust_dma_zone(unsigned long *size, unsigned long *hole,
216
228
        unsigned long dma_size)
217
229
{
267
279
#endif
268
280
        }
269
281
 
270
 
#ifdef ARM_DMA_ZONE_SIZE
271
 
#ifndef CONFIG_ZONE_DMA
272
 
#error ARM_DMA_ZONE_SIZE set but no DMA zone to limit allocations
273
 
#endif
274
 
 
 
282
#ifdef CONFIG_ZONE_DMA
275
283
        /*
276
284
         * Adjust the sizes according to any special requirements for
277
285
         * this machine type.
278
286
         */
279
 
        arm_adjust_dma_zone(zone_size, zhole_size,
280
 
                ARM_DMA_ZONE_SIZE >> PAGE_SHIFT);
 
287
        if (arm_dma_zone_size) {
 
288
                arm_adjust_dma_zone(zone_size, zhole_size,
 
289
                        arm_dma_zone_size >> PAGE_SHIFT);
 
290
                arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1;
 
291
        } else
 
292
                arm_dma_limit = 0xffffffff;
281
293
#endif
282
294
 
283
295
        free_area_init_node(0, zone_size, min, zhole_size);
422
434
        return pages;
423
435
}
424
436
 
 
437
/*
 
438
 * Poison init memory with an undefined instruction (ARM) or a branch to an
 
439
 * undefined instruction (Thumb).
 
440
 */
 
441
static inline void poison_init_mem(void *s, size_t count)
 
442
{
 
443
        u32 *p = (u32 *)s;
 
444
        while ((count = count - 4))
 
445
                *p++ = 0xe7fddef0;
 
446
}
 
447
 
425
448
static inline void
426
449
free_memmap(unsigned long start_pfn, unsigned long end_pfn)
427
450
{
639
662
                        "    pkmap   : 0x%08lx - 0x%08lx   (%4ld MB)\n"
640
663
#endif
641
664
                        "    modules : 0x%08lx - 0x%08lx   (%4ld MB)\n"
 
665
                        "      .text : 0x%p" " - 0x%p" "   (%4d kB)\n"
642
666
                        "      .init : 0x%p" " - 0x%p" "   (%4d kB)\n"
643
 
                        "      .text : 0x%p" " - 0x%p" "   (%4d kB)\n"
644
667
                        "      .data : 0x%p" " - 0x%p" "   (%4d kB)\n"
645
668
                        "       .bss : 0x%p" " - 0x%p" "   (%4d kB)\n",
646
669
 
662
685
#endif
663
686
                        MLM(MODULES_VADDR, MODULES_END),
664
687
 
 
688
                        MLK_ROUNDUP(_text, _etext),
665
689
                        MLK_ROUNDUP(__init_begin, __init_end),
666
 
                        MLK_ROUNDUP(_text, _etext),
667
690
                        MLK_ROUNDUP(_sdata, _edata),
668
691
                        MLK_ROUNDUP(__bss_start, __bss_stop));
669
692
 
704
727
#ifdef CONFIG_HAVE_TCM
705
728
        extern char __tcm_start, __tcm_end;
706
729
 
 
730
        poison_init_mem(&__tcm_start, &__tcm_end - &__tcm_start);
707
731
        totalram_pages += free_area(__phys_to_pfn(__pa(&__tcm_start)),
708
732
                                    __phys_to_pfn(__pa(&__tcm_end)),
709
733
                                    "TCM link");
710
734
#endif
711
735
 
 
736
        poison_init_mem(__init_begin, __init_end - __init_begin);
712
737
        if (!machine_is_integrator() && !machine_is_cintegrator())
713
738
                totalram_pages += free_area(__phys_to_pfn(__pa(__init_begin)),
714
739
                                            __phys_to_pfn(__pa(__init_end)),
721
746
 
722
747
void free_initrd_mem(unsigned long start, unsigned long end)
723
748
{
724
 
        if (!keep_initrd)
 
749
        if (!keep_initrd) {
 
750
                poison_init_mem((void *)start, PAGE_ALIGN(end) - start);
725
751
                totalram_pages += free_area(__phys_to_pfn(__pa(start)),
726
752
                                            __phys_to_pfn(__pa(end)),
727
753
                                            "initrd");
 
754
        }
728
755
}
729
756
 
730
757
static int __init keepinitrd_setup(char *__unused)