Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760500AbYGDQ5c (ORCPT ); Fri, 4 Jul 2008 12:57:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759882AbYGDQwC (ORCPT ); Fri, 4 Jul 2008 12:52:02 -0400 Received: from saeurebad.de ([85.214.36.134]:38568 "EHLO saeurebad.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759875AbYGDQwA (ORCPT ); Fri, 4 Jul 2008 12:52:00 -0400 X-Mailbox-Line: From hannes@saeurebad.de Fri Jul 4 18:14:56 2008 Message-Id: <20080704161456.761820496@saeurebad.de> References: <20080704160737.750988999@saeurebad.de> User-Agent: quilt/0.46-1 Date: Fri, 04 Jul 2008 18:07:52 +0200 From: Johannes Weiner To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Ralf Baechle Subject: [PATCH 15/20] mips: use generic show_mem() Content-Disposition: inline; filename=mips-use-generic-show_mem.patch X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.1.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2123 Lines: 78 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(). And show_mem() does now actually print something on configurations with multiple nodes. Signed-off-by: Johannes Weiner Acked-by: Ralf Baechle --- arch/mips/mm/Makefile | 3 +-- arch/mips/mm/pgtable.c | 36 ------------------------------------ 2 files changed, 1 insertion(+), 38 deletions(-) --- a/arch/mips/mm/Makefile +++ b/arch/mips/mm/Makefile @@ -3,8 +3,7 @@ # obj-y += cache.o dma-default.o extable.o fault.o \ - init.o pgtable.o tlbex.o tlbex-fault.o \ - uasm.o page.o + init.o tlbex.o tlbex-fault.o uasm.o page.o obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o obj-$(CONFIG_64BIT) += pgtable-64.o --- a/arch/mips/mm/pgtable.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include -#include - -void show_mem(void) -{ -#ifndef CONFIG_NEED_MULTIPLE_NODES /* XXX(hch): later.. */ - int pfn, total = 0, reserved = 0; - int shared = 0, cached = 0; - int highmem = 0; - struct page *page; - - printk("Mem-info:\n"); - show_free_areas(); - pfn = max_mapnr; - while (pfn-- > 0) { - if (!pfn_valid(pfn)) - continue; - page = pfn_to_page(pfn); - total++; - if (PageHighMem(page)) - highmem++; - if (PageReserved(page)) - reserved++; - else if (PageSwapCache(page)) - cached++; - else if (page_count(page)) - shared += page_count(page) - 1; - } - 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); -#endif -} -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/