[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [microblaze-uclinux] Linux hang in restore_context (PetaLinuxv0.30-rc1,kernel 2.6.20-uc0)



Hi,

thanks very much! Going to try it next...
Is your include/asm-microblaze/system.h also patched, locally?
(Because following that certain discussion thread I've also found this: http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2007/11/msg00075.html.)

Cheers, F@lk

> -----Original Message-----
> From: John Williams [mailto:jwilliams@xxxxxxxxxxxxxx]
> Sent: Friday, March 07, 2008 12:41 PM
> To: microblaze-uclinux@xxxxxxxxxxxxxx
> Subject: Re: [microblaze-uclinux] Linux hang in restore_context
> (PetaLinuxv0.30-rc1,kernel 2.6.20-uc0)
> 
> 
> Hi Falk,
> 
> Here's the change that's in our internal tree - there was a slight
> problem with the original patch from Kenneth:
> 
> Index: software/linux-2.6.x-petalogix/arch/microblaze/kernel/entry.S
> ===================================================================
> --- software/linux-2.6.x-petalogix/arch/microblaze/kernel/entry.S
> (revision 3290)
> +++ software/linux-2.6.x-petalogix/arch/microblaze/kernel/entry.S
> (revision 3389)
> @@ -122,7 +122,7 @@
> 
>  ret_from_intr:
> -	lwi	r11, r1, PT_MODE
> -	bneid	r11, 3f		
> -
> +	/* Returning to kernel mode?  Skip the sigpend and 
> sched checks */
> +	lwi	r20, r1, PT_MODE
> +	bneid	r20, no_intr_resched
> 
>  	lwi	r6, r31, TS_THREAD_INFO	/* get thread info */
> @@ -135,5 +135,5 @@
>  	nop
>  1:	andi	r11, r19, _TIF_SIGPENDING
> -	beqid	r11, no_intr_reshed
> +	beqid	r11, no_intr_resched
>  	addk	r5, r1, r0
>  	addk	r7, r0, r0
> @@ -141,11 +141,12 @@
>  	addk	r6, r0, r0
> 
> -no_intr_reshed:
> -	/* save mode indicator */
> -	lwi	r11, r1, PT_MODE
> -3:	
> -	swi	r11, r0, PER_CPU(KM)
> -
> -	/* save r31 */
> +no_intr_resched:
> +	/* Disable interrupts, we are now committed to the 
> state restore */
> +	disable_irq
> +
> +	/* Save kernel mode indicator */
> +	swi	r20, r0, PER_CPU(KM)
> +
> +	/* save r31  ("current" ptr)*/
>  	swi	r31, r0, PER_CPU(CURRENT_SAVE)
>  restore_context:
> 
> 
> Brettschneider Falk wrote:
> 
> > Hi,
> > 
> > John Williams wrote:
> > 
> >>A couple of things - first of all, make sure you try the MicroBlaze
> >>"tactical" patches from Xilinx
> > 
> > Hmm...I still use CPU version 4.00.b. So I wonder if the 
> patch also helps for that version.
> > 
> > 
> >>Secondly, there was a patch posted late 2007/early 2008 that 
> >>also fixes
> >>an issue that was found in the high IRQ load scenario.
> > 
> > Do you mean this?:
> > 
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2007/11/msg00048.html
> It's a good hint. I thought it's already in PetaLinux-0.3-rc1 but obviously it isn't. Trying that patch...
> 
> Cheers,
> Falk
> 
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@xxxxxxxxxxxxxx
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
> 

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/


___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/