anderson@xxxxxxxxxx wrote on 08/14/2006 07:52:40 PM: > > One thing that I noticed, and that I've added to your patch, is this: > > diff -r1.264 defs.h > 2410c2410 > < #define IS_VMALLOC_ADDR(X) (vt->vmalloc_start && (ulong)(X) >= > vt->vmalloc_start) > --- > > #define IS_VMALLOC_ADDR(X) s390x_IS_VMALLOC_ADDR(X) > > It seems that s390x_IS_VMALLOC_ADDR() was created but never > put in place for IS_VMALLOC_ADDR() to use. > > Let me know if that's not correct. > At least that is not wrong. But I noticed that we do not need s390(x)_IS_VMALLOC_ADDR() at all. In memory.c/vm_init(), we set vt->vmalloc_start to: vt->vmalloc_start = machdep->vmalloc_start(); which leads to a call of s390(x)_vmalloc_start(). Therefore, we can use that for IS_VMALLOC_ADDR() like other architectures do. I attached a patch, which removes s390(x)_IS_VMALLOC_ADDR(). Michael --- diff -Naur crash-4.0-3.1-fix-warn/defs.h crash-4.0-3.1-fix-warn-is-valloc/defs.h --- crash-4.0-3.1-fix-warn/defs.h 2006-08-14 18:32:01.000000000 +0200 +++ crash-4.0-3.1-fix-warn-is-valloc/defs.h 2006-08-15 09:57:35.000000000 +0200 @@ -2383,7 +2383,7 @@ #define PTOV(X) ((unsigned long)(X)+(machdep->kvbase)) #define VTOP(X) ((unsigned long)(X)-(machdep->kvbase)) -#define IS_VMALLOC_ADDR(X) s390_IS_VMALLOC_ADDR(X) +#define IS_VMALLOC_ADDR(X) (vt->vmalloc_start && (ulong)(X) >= vt->vmalloc_start) #define PTRS_PER_PTE 1024 #define PTRS_PER_PMD 1 @@ -3715,7 +3715,6 @@ #ifdef S390 void s390_init(int); void s390_dump_machdep_table(ulong); -int s390_IS_VMALLOC_ADDR(ulong addr); #define display_idt_table() \ error(FATAL, "-d option is not applicable to S390 architecture\n") #define KSYMS_START (0x1) @@ -3741,7 +3740,6 @@ #ifdef S390X void s390x_init(int); void s390x_dump_machdep_table(ulong); -int s390x_IS_VMALLOC_ADDR(ulong addr); #define display_idt_table() \ error(FATAL, "-d option is not applicable to S390X architecture\n") #define KSYMS_START (0x1) diff -Naur crash-4.0-3.1-fix-warn/s390.c crash-4.0-3.1-fix-warn-is-valloc/s390.c --- crash-4.0-3.1-fix-warn/s390.c 2006-08-14 18:45:37.000000000 +0200 +++ crash-4.0-3.1-fix-warn-is-valloc/s390.c 2006-08-15 09:55:38.000000000 +0200 @@ -228,19 +228,6 @@ } /* - * Check if address is in the vmalloc area - */ -int -s390_IS_VMALLOC_ADDR(ulong addr) -{ - static unsigned long high_memory = 0; - if(!high_memory){ - high_memory = s390_vmalloc_start(); - } - return (addr > high_memory); -} - -/* * Check if address is in context's address space */ static int diff -Naur crash-4.0-3.1-fix-warn/s390x.c crash-4.0-3.1-fix-warn-is-valloc/s390x.c --- crash-4.0-3.1-fix-warn/s390x.c 2006-08-14 18:28:38.000000000 +0200 +++ crash-4.0-3.1-fix-warn-is-valloc/s390x.c 2006-08-15 09:55:36.000000000 +0200 @@ -245,19 +245,6 @@ } /* - * Check if address is in the vmalloc area - */ -int -s390x_IS_VMALLOC_ADDR(ulong addr) -{ - static unsigned long high_memory = 0; - if(!high_memory){ - high_memory = s390x_vmalloc_start(); - } - return (addr > high_memory); -} - -/* * Check if address is in context's address space */ static int -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility