From: hannes@saeurebad.de
To: LKML <linux-kernel@vger.kernel.org>
Cc: Mikael Starvik <starvik@axis.com>
Subject: [patch 06/22 -v2] cris: Use generic show_mem()
Date: Fri, 04 Apr 2008 13:51:43 +0200 [thread overview]
Message-ID: <20080404115231.455409043@skyscraper.fehenstaub.lan> (raw)
In-Reply-To: <20080404115137.397502419@skyscraper.fehenstaub.lan>
[-- Attachment #1: cris-use-generic-show_mem.patch --]
[-- Type: text/plain, Size: 1779 bytes --]
Remove arch-specific show_mem() in favor of the generic version.
This also removes the following redundant information display:
- free pages, printed by show_free_areas()
- 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: Mikael Starvik <starvik@axis.com>
---
Index: tree-linus/arch/cris/Kconfig
===================================================================
--- tree-linus.orig/arch/cris/Kconfig
+++ tree-linus/arch/cris/Kconfig
@@ -55,7 +55,6 @@ config CRIS
bool
default y
select HAVE_IDE
- select HAVE_ARCH_SHOW_MEM
config HZ
int
Index: tree-linus/arch/cris/mm/init.c
===================================================================
--- tree-linus.orig/arch/cris/mm/init.c
+++ tree-linus/arch/cris/mm/init.c
@@ -19,36 +19,6 @@ unsigned long empty_zero_page;
extern char _stext, _edata, _etext; /* From linkerscript */
extern char __init_begin, __init_end;
-void
-show_mem(void)
-{
- int i,free = 0,total = 0,cached = 0, reserved = 0, nonshared = 0;
- int shared = 0;
-
- printk("\nMem-info:\n");
- show_free_areas();
- i = max_mapnr;
- while (i-- > 0) {
- total++;
- if (PageReserved(mem_map+i))
- reserved++;
- else if (PageSwapCache(mem_map+i))
- cached++;
- else if (!page_count(mem_map+i))
- free++;
- else if (page_count(mem_map+i) == 1)
- nonshared++;
- else
- shared += page_count(mem_map+i) - 1;
- }
- printk("%d pages of RAM\n",total);
- printk("%d free pages\n",free);
- printk("%d reserved pages\n",reserved);
- printk("%d pages nonshared\n",nonshared);
- printk("%d pages shared\n",shared);
- printk("%d pages swap cached\n",cached);
-}
-
void __init
mem_init(void)
{
--
next prev parent reply other threads:[~2008-04-04 13:01 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-04 11:51 [patch 00/22 -v2] Generic show_mem() hannes
2008-04-04 11:51 ` [patch 01/22 -v2] Print current swapcache page count in show_swap_cache_info() hannes
2008-04-04 11:51 ` [patch 02/22 -v2] Generic show_mem() implementation hannes
2008-04-04 11:51 ` [patch 03/22 -v2] alpha: Use generic show_mem() hannes
2008-04-04 11:51 ` [patch 04/22 -v2] avr32: " hannes
2008-04-06 22:03 ` Haavard Skinnemoen
2008-04-04 11:51 ` [patch 05/22 -v2] blackfin: " hannes
2008-04-04 14:43 ` Bryan Wu
2008-04-04 11:51 ` hannes [this message]
2008-04-04 11:51 ` [patch 07/22 -v2] frv: " hannes
2008-04-04 11:51 ` [patch 08/22 -v2] h8300: " hannes
2008-04-04 11:51 ` [patch 09/22 -v2] m32r: " hannes
2008-04-04 11:51 ` [patch 10/22 -v2] m68k: " hannes
2008-04-04 11:51 ` [patch 11/22 -v2] m68knommu: " hannes
2008-04-04 11:51 ` [patch 12/22 -v2] mips: " hannes
2008-04-04 11:51 ` [patch 13/22 -v2] mn10300: " hannes
2008-04-04 11:51 ` [patch 14/22 -v2] powerpc: " hannes
2008-04-04 11:51 ` [patch 15/22 -v2] ppc: " hannes
2008-04-04 11:51 ` [patch 16/22 -v2] s390: " hannes
2008-04-04 11:51 ` [patch 17/22 -v2] sh: " hannes
2008-04-07 1:29 ` Paul Mundt
2008-04-04 11:51 ` [patch 18/22 -v2] sparc64: " hannes
2008-04-04 11:51 ` [patch 19/22 -v2] um: " hannes
2008-04-04 11:51 ` [patch 20/22 -v2] v850: " hannes
2008-04-04 11:51 ` [patch 21/22 -v2] x86: " hannes
2008-04-04 11:51 ` [patch 22/22 -v2] xtensa: " hannes
2008-04-04 14:30 ` [patch 07/22 -v2] frv: " David Howells
2008-04-04 14:30 ` [patch 13/22 -v2] mn10300: " David Howells
[not found] <BFECAF9E178F144FAEF2BF4CE739C66805CE3BBA@exmail1.se.axis.com>
2008-04-04 13:07 ` [patch 06/22 -v2] cris: " Mikael Starvik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080404115231.455409043@skyscraper.fehenstaub.lan \
--to=hannes@saeurebad.de \
--cc=linux-kernel@vger.kernel.org \
--cc=starvik@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome