lkml.org 
[lkml]   [2008]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] kgdb: could not write to the last of valid memory with kgdb.
Hi,

I'm using i.MX31 ARM11 board which has 104Mbyte valid memory.
When I'd invoked a print command to write the last of valid memory from gdb,
there was no response from kgdb.

It seems that the following line causes this problem.

kernel/kgdb.c: write_mem_msg()
...
491 flush_icache_range(addr, addr + length + 1);

If the last byte of valid memory is specified, the last cache line and the next
cache line will be flushed by the ARM11 V6's function from flush_icache_range().
I'm not sure why the 2nd parameter has +1, I assume this +1 is unnecessary for
ARM11 V6's cache.
I send a patch to remove this +1, does anyone know necessity for other architectures?

Regards,

Signed-off-by Atsuo Igarashi <atsuo_igarashi@tripeaks.co.jp>
kernel/kgdb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/kgdb.c b/kernel/kgdb.c
index eaa21fc..949806a 100644
--- a/kernel/kgdb.c
+++ b/kernel/kgdb.c
@@ -488,7 +488,7 @@ static int write_mem_msg(int binary)
if (err)
return err;
if (CACHE_FLUSH_IS_SAFE)
- flush_icache_range(addr, addr + length + 1);
+ flush_icache_range(addr, addr + length);
return 0;
}
\
 
 \ /
  Last update: 2008-09-09 02:45    [W:0.032 / U:9.952 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site