From: David M. <da...@sn...> - 2003-02-14 15:02:23
|
Hi Paul, I just tried this on my 2.4.17 kernel on the 7751R/SH4 with no crash and it output 0 as I suspect it is supposed to. I can try some more platforms/combos monday when I am back in the office if you like. Not sure that it worked for me means much though, could be just be the cache state/entries are quite different between our platforms. Cheers, Davidm Jivin Paul Mundt lays it down ... > I've hit what looks to be another cache bug (looks like its an alias > issue), and so far it seems to hit both SH-3 and 4. (I haven't tested > SH-2 or 5 yet). > > The problem pops up when doing an mmap() of /dev/zero and then reading > from it, the read is sometimes 0, but most of the time ends up getting > back garbage and promptly segfaulting. > > I've attached my testcode for this as well. The fault happens right on > the read. > > I've managed to fix this on SH-4 (patch attached) by doing an all out > flush_cache_all() after the activate_context() in switch_mm() .. not a > very optimal solution, but seems to do the right thing for now. > > Unfortunately this same fix doesn't help SH-3 any (after implicitly > wrapping flush_cache_all() to cache_wback_all()). > > Anyone seen this before? > > Regards, > > -- > Paul Mundt <pau...@ti...> > TimeSys Corporation -- David McCullough: Ph: +61 7 3435 2815 http://www.SnapGear.com da...@sn... Fx: +61 7 3891 3630 Custom Embedded Solutions + Security |