PATCH for displaying pages [was: Re: PATCH: [olh at suse.de: kdb and softirqs]]
linas at austin.ibm.com
linas at austin.ibm.com
Wed Mar 24 05:07:35 EST 2004
Hi Olaf,
On Tue, Mar 23, 2004 at 03:19:05PM +0100, Olaf Hering wrote:
>
> Here is another one:
>
> #if defined(CONFIG_X86) | defined(CONFIG_PPC64)
>
> linuxppc64-2.5/kdb/modules/kdbm_pg.c, around line 500.
You want to leave that one in. It enables a kdb command
that enables the display of of memmap pages. I added that;
I think I sent a patch for it to the kdb list, but if not,
below is a pseudo-patch that should be applied to KDB.
I tried to make the patch be 'minimal'; I think this command
works fine for all arches, and so the CONFIG_X86 is a red herring.
--linas
diff -up kdbm_pg.c.orig kdbm_pg.c
--- kdbm_pg.c.orig 2004-03-23 11:58:14.000000000 -0600
+++ kdbm_pg.c 2004-03-23 11:59:26.000000000 -0600
@@ -490,10 +490,12 @@ out:
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) | defined(CONFIG_PPC64)
/* According to Steve Lord, this code is ix86 specific.
* Patches to extend it to other architectures will be
* greatefully accepted.
+ * I think the above comments are crazy. I think this
+ * works fine for all arches. At least for ppc64.
*/
static int
kdbm_memmap(int argc, const char **argv, const char **envp,
@@ -556,7 +558,7 @@ kdbm_memmap(int argc, const char **argv,
kdb_printf(" high page count: %6d\n", page_counts[8]);
return 0;
}
-#endif /* CONFIG_X86 */
+#endif /* CONFIG_X86 | CONFIG_PPC64 */
static int __init kdbm_pg_init(void)
{
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list