Q: static allocated task stack on PPC

Franz Hollerer hollerer at decomsys.com
Thu Nov 21 13:53:11 CET 2002


Hi!

Yes, I know that I throw away the pointer returned
by kmalloc(). The code is only a temporary code to
isolate the problem.

I am logged in via telnet. If I cause some Linux activity
by calling 'date', 'ls' or other commands,
the system hangs after some seconds in the switch
form the Linux task to a real time task.

Leaving Linux idle it runs much much longer.

Currently I am not yet using BDM, but I will try to set
it up.

Best regards,
Franz

Wolfgang Denk wrote:

> In message <3DDCB869.7030504 at decomsys.com> you wrote:
> 
>>  >     77 static int Stack0[1024];
>>  >
>>  >    124 p->nStackSize = sizeof(Stack0);
>>  >    125 if ((p->pStackBottom=kmalloc(p->nStackSize, GFP_KERNEL))==NULL)
>>  >    126     dcsHALMsg(DCSOTOS_PANIC, "kmalloc");
>>  >    127 // p->pStackBottom = Stack0;
>>  >    128 p->psRuntimeData->pInitialTopOfStack =
>>  >        	(int *) (((unsigned long) p->pStackBottom +
>>  >                           p->nStackSize - 0x10) & ~0xf);
>>  >    129
>> 
>> If I remove the comment characters in line 127 to set the bottom of
>> the stack to the global static variable Stack0, the systems hangs.
> 
> 
> When does it hang, immediately?
> 
> You are aware that this way you throw away the  pointer  returned  by
> kmalloc(), thus making it impossible to free the allocated memory? Or
> don't you call kmalloc(), then?
> 
> And what do you mean with "the system hangs"?  If  you  interrupt  it
> with the DMB debugger - what is printed when you type "where" ?
> 
> Viele Grüße,
> Best regards,
> 
> Wolfgang Denk


-- 
Franz Hollerer
DECOMSYS - Dependable Computer Systems
Stumpergasse 48/28, A-1060 Wien, Austria
Phone: +43 1 59983-21
Fax: +43 1 59983-18
mailto:hollerer at decomsys.com http://www.decomsys.com





More information about the Rtai mailing list