Hi all,

I always found the remap_file_pages failing in PowerPC target (ppc44x) , the
patch to fix the test cases of remap_file_pages passes the test cases on
PowerPC targets ( ppc44x virtex target does not use bootloader ), any better
suggestions are welcome.

-Srikanth

On Fri, Jul 24, 2009 at 2:01 AM, srikanth krishnakar
<[email protected]>wrote:

>
>
> On Thu, Jul 23, 2009 at 6:33 AM, Kumar Gala <[email protected]>wrote:
>
>>
>> On Jul 22, 2009, at 11:32 AM, srikanth krishnakar wrote:
>>
>>
>>>
>>> On Wed, Jul 22, 2009 at 9:14 PM, Kumar Gala <[email protected]>
>>> wrote:
>>>
>>> On Jul 22, 2009, at 10:38 AM, srikanth krishnakar wrote:
>>>
>>>
>>>
>>> On Wed, Jul 22, 2009 at 8:52 PM, Kumar Gala <[email protected]>
>>> wrote:
>>> I'm not seeing any BUG* in traps.c @ line 904.
>>>
>>>
>>> On Jul 21, 2009, at 4:33 AM, srikanth krishnakar wrote:
>>>
>>> The LTP test case msgctl10.c fails on linux-2.6.29.6 for PowerPC
>>> architecture (ppc440)
>>>
>>>
>>> msgctl10    1  B------------[ cut here ]------------
>>> kernel BUG at arch/powerpc/kernel/traps.c:904!
>>> Oops: Exception in kernel mode, sig: 5 [#9]
>>>
>>> I'm not seeing any BUG* in traps.c @ line 904.  Do you have some other
>>> patches on top of 2.6.29.6?
>>>
>>> - k
>>>
>>>
>>> I have LTTng patches on top of linux-2.6.29.6.
>>>
>>> Does it modify traps.c?  Can you see what the code around line 904 looks
>>> like and post that.
>>>
>>> - k
>>>  896
>>>  897 #if defined(CONFIG_XILINX_VIRTEX_5_FXT) && defined(CONFIG_PPC_FPU)
>>>  898         if (reason & REASON_ILLEGAL) {
>>>  899                 if (excep_state < 1) {
>>>  900                         excep_state++;
>>>  901                         return;
>>>  902                 }
>>>  903                 /* should never get here */
>>>  904                 BUG();
>>>  905         }
>>>  906 #endif
>>>  907
>>>  908         /* Try to emulate it if we should. */
>>>
>>>
>> Are you sure this is coming from the LTTng patches?  Which actual patch
>> makes this change?
>>
>> - k
>>
> Thanks kumar,
>
> I've got the patch out which fixes the issues. But now.. seems there is
> some generic issue in PPC440 targets, I am observing that
> *remap_file_pages01* and *remap_file_pages02  *test cases from LTP are
> failing since *Linux-2.6.24* kernel to *Linux-2.6.30*. If you can give
> some pointers that would be greatly appreciated ! Or if you have results for
> this on any PPC44x would be helpful.
>
> Arch : PowerPC
> Target : Xilinx PowerPC440 virtex5
>
> I've tried to test the cause for this but found that kernel throws error
> message of "segmentation fault".
>
> Thanks in Advance.
>
> -Srikant
>
>


-- 
"The Good You Do, The Best You GET"

Regards
Srikanth Krishnakar
**********************
We need to verify the validity of using MAP_FIXED in this manner.  The tests
do no checking to see whether the address space is safe to use or not. It should
be safe after  removing the flag MAP_FIXED from all calls to mmap in the
remap_file_pages tests.  If mmap is called without that flag, the kernel will
find a safe memory space to map, and the test will pass.

Signed-off-by: Srikanth Krishnakar <[email protected]>

Index: ltp-full-20090630/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c
===================================================================
--- ltp-full-20090630.orig/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c	2009-07-27 15:58:27.000000000 +0530
+++ ltp-full-20090630/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c	2009-07-27 15:58:39.000000000 +0530
@@ -174,7 +174,7 @@
 
 	data = mmap((void *)WINDOW_START,
 		    window_sz,
-		    PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0);
+		    PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 
 	if (data == MAP_FAILED) {
 		tst_resm(TFAIL, "mmap Error, errno=%d : %s", errno,
Index: ltp-full-20090630/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c
===================================================================
--- ltp-full-20090630.orig/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c	2009-07-27 15:58:45.000000000 +0530
+++ ltp-full-20090630/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c	2009-07-27 15:58:54.000000000 +0530
@@ -324,7 +324,7 @@
 
 	data = mmap((void *)WINDOW_START,
 		    cache_sz,
-		    PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0);
+		    PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 
 	if (data == MAP_FAILED) {
 		tst_resm(TFAIL, "mmap Error, errno=%d : %s", errno,
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to