~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/powerpc/mm/mem.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
382
382
        mem_init_done = 1;
383
383
}
384
384
 
 
385
#ifdef CONFIG_BLK_DEV_INITRD
 
386
void __init free_initrd_mem(unsigned long start, unsigned long end)
 
387
{
 
388
        if (start >= end)
 
389
                return;
 
390
 
 
391
        start = _ALIGN_DOWN(start, PAGE_SIZE);
 
392
        end = _ALIGN_UP(end, PAGE_SIZE);
 
393
        pr_info("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
 
394
 
 
395
        for (; start < end; start += PAGE_SIZE) {
 
396
                ClearPageReserved(virt_to_page(start));
 
397
                init_page_count(virt_to_page(start));
 
398
                free_page(start);
 
399
                totalram_pages++;
 
400
        }
 
401
}
 
402
#endif
 
403
 
385
404
/*
386
405
 * This is called when a page has been modified by the kernel.
387
406
 * It just marks the page as not i-cache clean.  We do the i-cache
424
443
        clear_page(page);
425
444
 
426
445
        /*
427
 
         * We shouldnt have to do this, but some versions of glibc
 
446
         * We shouldn't have to do this, but some versions of glibc
428
447
         * require it (ld.so assumes zero filled pages are icache clean)
429
448
         * - Anton
430
449
         */