Executable delay
Hi All,
I'm getting some funny behaviour on my MPC8260ADS based system.
I am mounting my DiskOnChip 2000 on /mnt/doc. It all seems fine until I try executing something from it. Trying to execute anything from the doc takes ages, execution will not occur until a good 2 minutes after you have typed the command. I have tried this with the most basic of programs and it still does the same. Everthing runs fine when executed from the nfs mounted root filesystem.
I know that this is not a hardware problem because I can boot into Bluecat linux and access the filesystem without problems.
I have tried setting Use short timeouts but it makes no difference.
I have the latest eldk and 2.4.23 kernel from linuxppc_2_4_devel.
Looking into this problem a little deeper we put a logic analyser on the DiskOnChip and discovered.
1) All large reads ( > ~10K get stuck)
2) Looking at the "top" output. Any process that accesses the DOC quickly gets put into the D state (Task Uninterruptable).
3) Kicking off a new process brings the accessing process to life for a short while it then goes back into the task uninterruptable state.
It smells like an mtd driver problem but I havn't the foggiest where to start looking for the solution. Any ideas greatly received.
Kind Regards,
James Bates
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Hi All,
I have had my first real poke around the kernel and it looks like I was correct in saying that any task accessing the DOC drivers was put into an incorrect state. The code that seemed to do the damage can be found in drivers/mtd/devices/doc2000.c in the function _DoC_WaitReady().
The problem seems to be the call to cond_resched which is not in slightly older kernel versions. To fix the bug I reverted this function back to the code in version 2.4.10 of the kernel.
After making these changes it appears to work perfectly. My question now is. Have I inadvertently broken something without knowing it.
Kind Regards,
James Bates
PS: My _DoC_WaitReady is as follows:
/* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */ static int _DoC_WaitReady(struct DiskOnChip *doc)
{
unsigned long docptr = doc->virtadr;
#ifndef CONFIG_MTD_DOCPROBE_SHORT_TIMEOUTS
unsigned long timeo = jiffies + (HZ * 10);
#else
unsigned long timeo = jiffies + 1;#endif
DEBUG(MTD_DEBUG_LEVEL3,
"_DoC_WaitReady called for out-of-line wait\n");
/* Out-of-line routine to wait for chip response */
while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) {
if (time_after(jiffies, timeo)) {
DEBUG(MTD_DEBUG_LEVEL2, "_DoC_WaitReady timed out.\n");
return -EIO;
}// This is the "new" code from version 2.4.23
// udelay(1);
// cond_resched();
// Revert back to old task state management in 2.4.10
if (current->need_resched) {
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
}
else
udelay(1);
// End of 2.4.10 code
}
return 0;
}** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Boot Loader
Hello,
For my end target I have to boot across a shared memory interface by placing the executable into RAM. This is part of a multi processor system where the Linux board is a cPCI slave. The Linux board will not have a flash or a network connection. I is held in reset by the master until the s/w is loaded and then released. This is an 8275 target. The "Master" is a Solaris Workstation or a PC style Linux box or card.
Any suggestions on how to do this ?
Have to fill in my own board info in a bd_t struct, pass it in R3, if I use and initrd it's start and end ptrs go into R4, R5 and the cmd line params will
be hard coded and inserted into R6,R7...
I will be using a RAM disk for the root file system.
Instead of compressing and creating uImage for das u-boot, I create a binary(?) image and just shove it into RAM at 0? Ensure the Reset vec is set to my initialization code that will be part of the download...
Any ideas would be appreciated.
Thank you
Kevin
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Re: Boot Loader
Dear Kevin,
Quoted 7 lines · in message <[email protected]> you wrote:
For my end target I have to boot across a shared memory interface by placing the executable into RAM. This is part of a multi processor system where the Linux board is a cPCI slave. The Linux board will not have a flash or a network connection. I is held in reset by the master until the s/w is loaded and then released. This is an 8275
This has been done before. See for example the "PN62" configuration in U-Boot.
Quoted 1 line
Any suggestions on how to do this ?
Use U-Boot...
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] It all seemed, he thought, to be rather a lot of trouble to go to just sharpen a razor blade. - Terry Pratchett, _The Light Fantastic_
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/