RE: [Linux-ia64] Kernel panic in dtlb_fault

Mallick, Asit K
2001-01-15T23:08:38Z

[-- Attachment #1: Type: text/plain, Size: 1983 bytes --]

This is a patch that fixes the VHPT disabled kernel problems. Uros has
verified this and it is at the same level as VHPT enabled kernel on B3.

Thanks,
Asit

> -----Original Message-----
> From: Uros Prestor [mailto:uros@turbolinux.com]
> Sent: Friday, January 12, 2001 11:37 AM
> To: Mallick, Asit K
> Cc: linux-ia64@linuxia64.org
> Subject: Re: [Linux-ia64] Kernel panic in dtlb_fault
>
>
> "Mallick, Asit K" wrote:
>
> > Attached is a patch to fix the problem. Uros and Jenna were
> able to boot
> > with this patch. Sorry for sending the early version.
>
> Something is still not kosher if you enable
> CONFIG_DISABLE_VHPT=y. If I try
> recompiling the gnupro RPM the compilation breaks down
> immediately after the
> config stage With the following error:
>
> # rpm -ba /usr/src/turbo/SPECS/gnupro.spec
> ...
> creating ./config.status
> creating Makefile
> Configuring utils...
> Created "Makefile" in /work/BUILD/gnupro-2.96/build/utils
> Configuring spu...
> Created "Makefile" in /work/BUILD/gnupro-2.96/build/utils/spu
> ++ perl -e 'if( -x "/usr/bin/getconf" && ( ($p=`/usr/bin/getconf
> _NPROCESSORS_ONLN`) >= 0 ) ){ print "$p"} else { print "1"; }'
> + make -j 2
> /bin/sh: SHELL: command not found
> /bin/sh: -c: command not found
> make: *** [all-libiberty] Error 127
> make: *** Waiting for unfinished jobs....
> Bad exit status from /var/tmp/rpm-tmp.82077 (%build)
>
> Things become very bizarre if you try to compile by hand, ranging from
> reports of missing /lib/libc.so.6.1 to internal compiler
> errors... This
> happens both on 2xB3 BigSur and 4xB3 Lion. If I revert to
> the kernel which
> enables VHPT the compilation goes just fine.
>
> Uros
>
> --
> Uros Prestor
> uros@turbolinux.com
>
>
>
>
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64
>

[-- Attachment #2: ivt.diff --]
[-- Type: application/octet-stream, Size: 2207 bytes --]

--- linux-2.4.0/arch/ia64/kernel/ivt.S Tue Jan 9 03:48:36 2001
+++ linux/arch/ia64/kernel/ivt.S Fri Jan 12 04:47:05 2001
@@ -184,15 +184,16 @@
* mode, walk the page table, and then re-execute the L3 PTE read
* and go on normally after that.
*/
-itlb_fault:
mov r16=cr.ifa // get virtual address
mov r29=b0 // save b0
mov r31=pr // save predicates
+itlb_fault:
mov r17=cr.iha // get virtual address of L3 PTE
movl r30=1f // load nested fault continuation point
;;
1: ld8 r18=[r17] // read L3 PTE
;;
+ mov b0=r29
tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared?
(p6) br.cond.spnt.many page_fault
;;
@@ -219,15 +220,16 @@
* mode, walk the page table, and then re-execute the L3 PTE read
* and go on normally after that.
*/
-dtlb_fault:
mov r16=cr.ifa // get virtual address
mov r29=b0 // save b0
mov r31=pr // save predicates
+dtlb_fault:
mov r17=cr.iha // get virtual address of L3 PTE
movl r30=1f // load nested fault continuation point
;;
1: ld8 r18=[r17] // read L3 PTE
;;
+ mov b0=r29
tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared?
(p6) br.cond.spnt.many page_fault
;;
@@ -261,6 +263,7 @@
(p8) thash r17=r16
;;
(p8) mov cr.iha=r17
+(p8) mov r29=b0 // save b0
(p8) br.cond.dptk.many itlb_fault
#endif
extr.u r23=r21,IA64_PSR_CPL0_BIT,2 // extract psr.cpl
@@ -296,6 +299,7 @@
(p8) thash r17=r16
;;
(p8) mov cr.iha=r17
+(p8) mov r29=b0 // save b0
(p8) br.cond.dptk.many dtlb_fault
#endif
extr.u r23=r21,IA64_PSR_CPL0_BIT,2 // extract psr.cpl
@@ -399,7 +403,6 @@
shr.u r18=r16,PMD_SHIFT // shift L2 index into position
;;
ld8 r17=[r17] // fetch the L1 entry (may be 0)
- mov b0=r30
;;
(p7) cmp.eq p6,p7=r17,r0 // was L1 entry NULL?
dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry
@@ -409,8 +412,8 @@
;;
(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L2 entry NULL?
dep r17=r19,r17,3,(PAGE_SHIFT-3) // compute address of L3 page table entry
- ;;
(p6) br.cond.spnt.many page_fault
+ mov b0=r30
br.sptk.many b0 // return to continuation point
;;