patch-2.4.20 linux-2.4.20/arch/ppc64/xmon/xmon.c
Next file: linux-2.4.20/arch/s390/config.in
Previous file: linux-2.4.20/arch/ppc64/xmon/start.c
Back to the patch index
Back to the overall index
- Lines: 186
- Date:
Thu Nov 28 15:53:11 2002
- Orig file:
linux-2.4.19/arch/ppc64/xmon/xmon.c
- Orig date:
Fri Aug 2 17:39:43 2002
diff -urN linux-2.4.19/arch/ppc64/xmon/xmon.c linux-2.4.20/arch/ppc64/xmon/xmon.c
@@ -123,12 +123,10 @@
static void mem_check(void);
static void mem_find_real(void);
static void mem_find_vsid(void);
-static void mem_check_full_group(void);
static void mem_check_pagetable_vsids (void);
static void mem_map_check_slab(void);
static void mem_map_lock_pages(void);
-static void mem_map_check_hash(void);
static void mem_check_dup_rpn (void);
static void debug_trace(void);
@@ -191,13 +189,6 @@
asm volatile("sync; isync");
}
-extern inline void __delay(unsigned int loops)
-{
- if (loops != 0)
- __asm__ __volatile__("mtctr %0; 1: bdnz 1b" : :
- "r" (loops) : "ctr");
-}
-
/* (Ref: 64-bit PowerPC ELF ABI Spplement; Ian Lance Taylor, Zembu Labs).
A PPC stack frame looks like this:
@@ -544,7 +535,7 @@
}
}
- if (!__is_processor(PV_POWER4)) {
+ if (!__is_processor(PV_POWER4) && !__is_processor(PV_POWER4p)) {
if (dabr.enabled)
set_dabr(dabr.address);
if (iabr.enabled)
@@ -561,7 +552,7 @@
if (naca->platform != PLATFORM_PSERIES)
return;
- if (!__is_processor(PV_POWER4)) {
+ if (!__is_processor(PV_POWER4) && !__is_processor(PV_POWER4p)) {
set_dabr(0);
set_iabr(0);
}
@@ -634,15 +625,9 @@
case 'c':
mem_check();
break;
- case 'g':
- mem_check_full_group();
- break;
case 'j':
mem_map_check_slab();
break;
- case 'h':
- mem_map_check_hash();
- break;
case 'f':
mem_find_real();
break;
@@ -864,7 +849,7 @@
cmd = inchar();
switch (cmd) {
case 'd': /* bd - hardware data breakpoint */
- if (__is_processor(PV_POWER4)) {
+ if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p)) {
printf("Not implemented on POWER4\n");
break;
}
@@ -884,8 +869,7 @@
dabr.address = (dabr.address & ~7) | mode;
break;
case 'i': /* bi - hardware instr breakpoint */
- if (__is_processor(PV_POWER4)) {
- printf("Not implemented on POWER4\n");
+ if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p)) {
break;
}
iabr.address = 0;
@@ -2490,34 +2474,6 @@
printf(" count of locked pages = %d \n", lock_count);
}
-
-
-void mem_map_check_hash()
-{
- int i = max_mapnr;
-
- while (i-- > 0) {
- /* skip the reserved */
- if (!PageReserved(mem_map+i)) {
- if (((mem_map+i)->next_hash) != NULL) {
- if ( REGION_ID((mem_map+i)->next_hash) != KERNEL_REGION_ID ) {
- printf(" mem_map check hash - non c0 entry - "
- "address/value = %p %lx\n", mem_map+i,(mem_map+i)->next_hash);
- }
- if ((unsigned long)((mem_map+i)->next_hash) == KERNELBASE){
- printf(" mem_map check hash - 0x%lx entry = %p \n",
- KERNELBASE, mem_map+i);
- }
- }
- } else {
- if (page_count(mem_map+i) < 0) {
- printf(" reserved page with negative count- entry = %lx \n", mem_map+i);
- }
- }
- }
- printf(" mem_map check hash completed \n");
-}
-
void mem_check_dup_rpn ()
{
unsigned long htab_size_bytes;
@@ -2727,70 +2683,6 @@
}
-
-void mem_check_full_group()
-{
- unsigned long htab_size_bytes;
- unsigned count;
- unsigned count_array[] = {0,0,0,0,0,0,0,0,0};
- unsigned i;
- unsigned long htab_end;
- HPTE *hpte1, *hpte2, *hpte3;
- u64 rpn = 0;
-
- htab_size_bytes = htab_data.htab_num_ptegs * 128; // 128B / PTEG
- htab_end = (unsigned long)htab_data.htab + htab_size_bytes;
-
- printf("\nHardware Page Find full groups \n-------------------\n");
- printf("htab base : %.16lx\n", htab_data.htab);
- printf("htab size : %.16lx\n", htab_size_bytes);
-
- for (hpte1 = htab_data.htab; (unsigned long)hpte1 < htab_end; hpte1= hpte1 + 8)
- {
- count = 0;
- hpte2 = hpte1;
- for (i=0; i<8; ++i)
- {
- if ( hpte2->dw0.dw0.v != 0 )
- {
- count++;
- }
- hpte2++;
- }
- if (count == 8 )
- {
- printf(" full group starting with entry %lx \n", hpte1);
- hpte3 = hpte1;
- for (i=0; i<8; ++i)
- {
- if ( hpte3->dw0.dw0.v != 0 )
- {
- printf(" entry number %d \n",i);
- printf(" vsid: %.13lx api: %.2lx hash: %.1lx\n",
- (hpte3->dw0.dw0.avpn)>>5,
- (hpte3->dw0.dw0.avpn) & 0x1f,
- (hpte3->dw0.dw0.h));
- printf(" rpn: %.13lx \n", (hpte3->dw1.dw1.rpn));
- // Dump out the memmap array entry address, corresponding virtual address, and reference count.
- rpn = hpte3->dw1.dw1.rpn;
- printf(" mem_map+rpn=%p, virtual@=%p, count=%lx \n", mem_map+rpn, (mem_map+rpn)->virtual, (mem_map+rpn)->count);
- }
- hpte3++;
- }
- if (xmon_interrupted())
- return;
- }
-
- count_array[count]++;
- }
- for (i=1; i<9; ++i)
- {
- printf(" group count for size %i = %lx \n", i, count_array[i]);
- }
-
- printf("\nDone -------------------\n");
-}
-
static void debug_trace(void) {
unsigned long val, cmd, on;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)