|
On Mon, 2006-03-27 at 09:13 +1000, James Steward wrote:
On Sun, 2006-03-26 at 06:46 +1000, James Steward wrote:
On Fri, 2006-03-24 at 12:36 -0500, Nicolas Pitre wrote:
2) and so far only for the mtdblock interface.
Please excuse my ignorance, but isnt PCMCIA to Compact Flash a
candidate? Its PIO isnt it?
So obviously this should do the job but still possibly needlessly if the
data has been copied with DMA. Furthermore the fs code is sprinkled
with many flush_dcache_page() calls so why it is not effective with PIO
block drivers (maybe it is not used with actual data pages) I dont
know. And I didnt investigate it further at this point.
Even with these sprinklings of flush_dcache_page() I get mysterious
behaviour in user space.
Maybe more spinkles are required?
Further to this, where and what debug can I add to dump some fault
finding debuggery from the kernel about its cache state when a user
space program gets sent a SEGV?
Would it be as simple as defining CONFIG_DEBUG_USER in
arch/arm/mm/fault.c ?
Anything I can do to provide the required evidence to track this problem
down..
I enabled some debug and loaded up the box until it died....
root@drmcc-XTM:~# gdb /usr/nanoX/bin/nano-X
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "arm-linux"...Using host libthread_db library
"/lib/libthread_db.so.1".
(gdb) att 822
Attaching to program: /usr/nanoX/bin/nano-X, process 822
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/src/arm-linux/libs/jpeg-6b/libjpeg.so...done.
Loaded symbols for /usr/src/arm-linux/libs/jpeg-6b/libjpeg.so
Reading symbols
from /usr/src/arm-linux/libs/freetype/lib/libttf.so...done.
Loaded symbols for /usr/src/arm-linux/libs/freetype/lib/libttf.so
Reading symbols from /lib/libc.so.6...pgd = c6bac000
[00005a54] *pgd=a65ae031, *pte=00000000, *ppte=00000000
Pid: 960, comm: gdb
CPU: 0
PC is at 0x3b570
LR is at 0x3b530
pc : [<0003b570 ] lr : [<0003b530 ] Not tainted
sp : be8dd444 ip : 40317477 fp : 402bf010
r10: 00000000 r9 : 003ca410 r8 : 0000234c
r7 : 000583e0 r6 : 402bf010 r5 : 00001fe0 r4 : 0004fb00
r3 : 402bf010 r2 : 00005a54 r1 : 003ca3f0 r0 : 4030eae8
Flags: Nzcv IRQs on FIQs on Mode USER_32 Segment user
Control: 397F Table: A6BAC000 DAC: 00000015
[<c001bd44 ] (show_regs+0x0/0x4c) from [<c0021030 ] (__do_user_fault
+0x9c/0xa8)
r4 = C038D0C0
[<c0020f94 ] (__do_user_fault+0x0/0xa8) from [<c002124c ] (do_page_fault
+0x1a8/0x214)
r7 = C6CA6CD4 r6 = C6CD5230 r5 = 00000017 r4 = FFFFFFEC
[<c00210a4 ] (do_page_fault+0x0/0x214) from [<c00213f4 ] (do_DataAbort
+0x3c/0xa4)
[<c00213b8 ] (do_DataAbort+0x0/0xa4) from [<c0019dc8 ]
(ret_from_exception+0x0/0x10)
r8 = 0000234C r7 = 000583E0 r6 = 402BF010 r5 = 00001FE0
r4 = FFFFFFFF
Segmentation fault
root@drmcc-XTM:~# ps
PID Uid VmSize Stat Command
1 root 556 S init
2 root SWN [ksoftirqd/0]
3 root SW [watchdog/0]
4 root SW< [events/0]
5 root SW< [khelper]
6 root SW< [kthread]
18 root SW< [kblockd/0]
41 root SW [pdflush]
42 root SW [pdflush]
44 root SW< [aio/0]
43 root SW [kswapd0]
626 root SW< [kseriod]
634 root SW [mtdblockd]
645 root SW [pccardd]
658 root SW [kjournald]
801 root 504 S /bin/dropbear
804 root 528 S /bin/crond
810 root 1372 S -bash
811 root 560 S /sbin/syslogd -n -m 0
812 root 532 S /sbin/klogd -n
813 root 1916 S ./drSystem ../etc/drConfig.xml
816 root 1680 S ./logger /tmp/.drmcc
CommAgentLogger.0 ../etc/drLogge
817 root 1664 S ./mbserv /tmp/.drmcc
CommAgentModbus.0 ../etc/caModbu
818 root 1604 S ./cuserv CommAgentCU.0 ../etc/cuIO.xml
823 root 432 S ./bin/nanowm
856 root 428 S tail -f /var/log/messages
822 root 1236 S ./bin/nano-X
966 root 572 R ps
root@drmcc-XTM:~#
As can be seen it was GDB that was running to cause the fault, however
the next run of gdb worked as expected..
root@drmcc-XTM:~# gdb /usr/nanoX/bin/nano-X
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "arm-linux"...Using host libthread_db library
"/lib/libthread_db.so.1".
(gdb) att 822
Attaching to program: /usr/nanoX/bin/nano-X, process 822
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/src/arm-linux/libs/jpeg-6b/libjpeg.so...done.
Loaded symbols for /usr/src/arm-linux/libs/jpeg-6b/libjpeg.so
Reading symbols
from /usr/src/arm-linux/libs/freetype/lib/libttf.so...done.
Loaded symbols for /usr/src/arm-linux/libs/freetype/lib/libttf.so
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
0x401b5e08 in select () from /lib/libc.so.6
(gdb)
This is in cachepolicy=writethrough mode also.
Is this the same cache problem? How can I help to track it further?
This is executing of compact flash connected via the second PCMCIA slot
on a custom PXA255 based board.
Regards,
James.
-------------------------------------------------------------------
List admin: rel="nofollow" lists.arm.linux.org.uk/mailman/listinfo/linux-arm lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ: rel="nofollow" www.arm.linux.org.uk/mailinglists/faq.php www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: rel="nofollow" www.arm.linux.org.uk/mailinglists/etiquette.php www.arm.linux.org.uk/mailinglists/etiquette.php
|