lkml.org 
[lkml]   [2008]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 09/22 -v3] m32r: Use generic show_mem()
    Remove arch-specific show_mem() in favor of the generic version.

    This also removes the following redundant information display:

    - pages in swapcache, printed by show_swap_cache_info()

    where show_mem() calls show_free_areas(), which calls
    show_swap_cache_info().

    Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
    CC: Hirokazu Takata <takata@linux-m32r.org>
    ---

    Index: tree-linus/arch/m32r/Kconfig
    ===================================================================
    --- tree-linus.orig/arch/m32r/Kconfig
    +++ tree-linus/arch/m32r/Kconfig
    @@ -10,6 +10,7 @@ config M32R
    default y
    select HAVE_IDE
    select HAVE_OPROFILE
    + select HAVE_GENERIC_SHOW_MEM

    config SBUS
    bool
    Index: tree-linus/arch/m32r/mm/init.c
    ===================================================================
    --- tree-linus.orig/arch/m32r/mm/init.c
    +++ tree-linus/arch/m32r/mm/init.c
    @@ -36,41 +36,6 @@ pgd_t swapper_pg_dir[1024];

    DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);

    -void show_mem(void)
    -{
    - int total = 0, reserved = 0;
    - int shared = 0, cached = 0;
    - int highmem = 0;
    - struct page *page;
    - pg_data_t *pgdat;
    - unsigned long i;
    -
    - printk("Mem-info:\n");
    - show_free_areas();
    - for_each_online_pgdat(pgdat) {
    - unsigned long flags;
    - pgdat_resize_lock(pgdat, &flags);
    - for (i = 0; i < pgdat->node_spanned_pages; ++i) {
    - page = pgdat_page_nr(pgdat, i);
    - total++;
    - if (PageHighMem(page))
    - highmem++;
    - if (PageReserved(page))
    - reserved++;
    - else if (PageSwapCache(page))
    - cached++;
    - else if (page_count(page))
    - shared += page_count(page) - 1;
    - }
    - pgdat_resize_unlock(pgdat, &flags);
    - }
    - printk("%d pages of RAM\n", total);
    - printk("%d pages of HIGHMEM\n",highmem);
    - printk("%d reserved pages\n",reserved);
    - printk("%d pages shared\n",shared);
    - printk("%d pages swap cached\n",cached);
    -}
    -
    /*
    * Cache of MMU context last used.
    */
    --



    \
     
     \ /
      Last update: 2008-04-07 17:55    [W:0.038 / U:0.228 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site