Hi,<br><br>Thanks, I will do this changes.<br>Move fixes as first and separte the fix calculation patch in fixes for 'request_sdram_region' and 'printouts of iomem at boottime', which is only necessary for correct eyecandy.<br>
<br>Sry, It's true to get all information from iomem, never used this command :)<br>I got ideas to improve my other patches... I will try to insert it, too.<br><br>I send this mail from my private mail address...<br>My phytec address doesn't work with the barebox mailinglist.<br>
<br>Regards<br>Alexander Aring<br><br><div class="gmail_quote">2012/10/16 Sascha Hauer <span dir="ltr"><<a href="mailto:s.hauer@pengutronix.de" target="_blank">s.hauer@pengutronix.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, Oct 15, 2012 at 03:22:42PM +0200, Alexander Aring wrote:<br>
> Fix memory calculation.<br>
><br>
> Signed-off-by: Alexander Aring <<a href="mailto:a.aring@phytec.de">a.aring@phytec.de</a>><br>
> ---<br>
> common/meminfo.c | 8 ++++----<br>
> common/memory.c | 4 ++--<br>
> 2 files changed, 6 insertions(+), 6 deletions(-)<br>
><br>
> diff --git a/common/meminfo.c b/common/meminfo.c<br>
> index b2b09da..13633a2 100644<br>
> --- a/common/meminfo.c<br>
> +++ b/common/meminfo.c<br>
> @@ -15,9 +15,9 @@ static int display_meminfo(void)<br>
> #endif<br>
><br>
> debug("barebox code: 0x%p -> 0x%p (size 0x%08lx)\n",<br>
> - _stext, _etext, text_size);<br>
> + _stext, _etext - 1, text_size);<br>
> debug("bss segment: 0x%p -> 0x%p (size 0x%08lx)\n",<br>
> - __bss_start, __bss_stop, bss_size);<br>
> + __bss_start, __bss_stop - 1, bss_size);<br>
> #ifdef DEBUG<br>
> printf("malloc space: 0x%08lx -> 0x%08lx (size 0x%08lx)\n",<br>
> mstart, mend, msize);<br>
> @@ -28,11 +28,11 @@ static int display_meminfo(void)<br>
> #ifdef CONFIG_ARM<br>
> #ifdef DEBUG<br>
> printf("stack space: 0x%08x -> 0x%08x (size 0x%08x)\n",<br>
> - STACK_BASE, STACK_BASE + STACK_SIZE,<br>
> + STACK_BASE, STACK_BASE + STACK_SIZE - 1,<br>
> STACK_SIZE);<br>
> #else<br>
> printf("stack space: 0x%08x -> 0x%08x (size %s)\n",<br>
> - STACK_BASE, STACK_BASE + STACK_SIZE,<br>
> + STACK_BASE, STACK_BASE + STACK_SIZE - 1,<br>
> size_human_readable(STACK_SIZE));<br>
<br>
Hm, you copied wrong code in an earlier patch in this series which<br>
you fix afterwards. That's not good, fixes, should always come first.<br>
This for example makes it possible to apply the fix to the master<br>
branch and feature additions to -next.<br>
<br>
Besides, printing the exact values for the debug case and<br>
size_human_readable otherwise is unnecessary churn. All the<br>
information above can be retrieved using the iomem command<br>
anyway, so removing the code altogether seems more useful.<br>
<br>
> #endif<br>
> #endif<br>
> diff --git a/common/memory.c b/common/memory.c<br>
> index 8919ab1..6bf4af6 100644<br>
> --- a/common/memory.c<br>
> +++ b/common/memory.c<br>
> @@ -74,11 +74,11 @@ static int mem_malloc_resource(void)<br>
> request_sdram_region("barebox",<br>
> (unsigned long)&_stext,<br>
> (unsigned long)&_etext -<br>
> - (unsigned long)&_stext + 1);<br>
> + (unsigned long)&_stext);<br>
> request_sdram_region("bss",<br>
> (unsigned long)&__bss_start,<br>
> (unsigned long)&__bss_stop -<br>
> - (unsigned long)&__bss_start + 1);<br>
> + (unsigned long)&__bss_start);<br>
<br>
That's a useful fix. Can we have this as a separate patch?<br>
<span class="HOEnZb"><font color="#888888"><br>
Sascha<br>
<br>
<br>
--<br>
Pengutronix e.K. | |<br>
Industrial Linux Solutions | <a href="http://www.pengutronix.de/" target="_blank">http://www.pengutronix.de/</a> |<br>
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: <a href="tel:%2B49-5121-206917-0" value="+4951212069170">+49-5121-206917-0</a> |<br>
Amtsgericht Hildesheim, HRA 2686 | Fax: <a href="tel:%2B49-5121-206917-5555" value="+4951212069175555">+49-5121-206917-5555</a> |<br>
<br>
_______________________________________________<br>
barebox mailing list<br>
<a href="mailto:barebox@lists.infradead.org">barebox@lists.infradead.org</a><br>
<a href="http://lists.infradead.org/mailman/listinfo/barebox" target="_blank">http://lists.infradead.org/mailman/listinfo/barebox</a><br>
</font></span></blockquote></div><br>