From: Jason Wessel <jason.wessel@windriver.com>
To: Atsuo Igarashi <atsuo_igarashi@tripeaks.co.jp>
Cc: linux-kernel@vger.kernel.org,
Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>,
Tom Rini <trini@kernel.crashing.org>
Subject: Re: [PATCH] kgdb: could not write to the last of valid memory with kgdb.
Date: Tue, 09 Sep 2008 08:14:19 -0500 [thread overview]
Message-ID: <48C676AB.2070101@windriver.com> (raw)
In-Reply-To: <48C5BDA0.90105@tripeaks.co.jp>
Atsuo Igarashi wrote:
> 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?
I had to go digging through the archives to find out where the "+1"
came from, as it pre-dates my involvement with kgdb. It turns out
this actually appeared in the initial version of the 'X' 'M' gdb
serial packet write.
You can see historical first version if you scroll to line 973 at:
http://kgdb.cvs.sourceforge.net/kgdb/kgdb-2/core-lite.patch?annotate=1.40
That means we have carried this for 3 years, 10 months with no one
noticing it. :-)
The flush_icache_range() is a "start" to "end" address so there should
be no need for the +1, as it is already computed by adding the length.
I will queue this patch for some testing and pushing into the
mainline.
Thanks,
Jason.
prev parent reply other threads:[~2008-09-09 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 0:04 [PATCH] kgdb: could not write to the last of valid memory with kgdb Atsuo Igarashi
2008-09-09 13:14 ` Jason Wessel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48C676AB.2070101@windriver.com \
--to=jason.wessel@windriver.com \
--cc=atsuo_igarashi@tripeaks.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=trini@kernel.crashing.org \
--cc=yoichi_yuasa@tripeaks.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox