From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Cc: John Crispin <john@phrozen.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
Chuanhong Guo <gch981213@gmail.com>
Subject: Re: [PATCH 2/2] MIPS: ralink: mt7621: add memory detection support
Date: Mon, 29 Mar 2021 11:26:07 +0200 [thread overview]
Message-ID: <20210329092607.GE8484@alpha.franken.de> (raw)
In-Reply-To: <20210327053840.471155-2-ilya.lipnitskiy@gmail.com>
On Fri, Mar 26, 2021 at 10:38:40PM -0700, Ilya Lipnitskiy wrote:
> From: Chuanhong Guo <gch981213@gmail.com>
>
> mt7621 has the following memory map:
> 0x0-0x1c000000: lower 448m memory
> 0x1c000000-0x2000000: peripheral registers
> 0x20000000-0x2400000: higher 64m memory
>
> detect_memory_region in arch/mips/kernel/setup.c only adds the first
> memory region and isn't suitable for 512m memory detection because
> it may accidentally read the memory area for peripheral registers.
>
> This commit adds memory detection capability for mt7621:
> 1. Add the highmem area when 512m is detected.
> 2. Guard memcmp from accessing peripheral registers:
> This only happens when a user decided to change kernel load address
> to 256m or higher address. Since this is a quite unusual case, we
> just skip 512m testing and return 256m as memory size.
>
> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
> [Minor commit message reword, make mt7621_memory_detect static]
> Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
> ---
> arch/mips/include/asm/mach-ralink/mt7621.h | 7 +++---
> arch/mips/ralink/common.h | 1 +
> arch/mips/ralink/mt7621.c | 29 +++++++++++++++++++---
> arch/mips/ralink/of.c | 2 ++
> 4 files changed, 32 insertions(+), 7 deletions(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2021-03-29 16:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-27 5:38 [PATCH 1/2] MIPS: ralink: annotate prom_soc_init() with __init Ilya Lipnitskiy
2021-03-27 5:38 ` [PATCH 2/2] MIPS: ralink: mt7621: add memory detection support Ilya Lipnitskiy
2021-03-29 9:26 ` Thomas Bogendoerfer [this message]
2021-03-29 9:25 ` [PATCH 1/2] MIPS: ralink: annotate prom_soc_init() with __init Thomas Bogendoerfer
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=20210329092607.GE8484@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=gch981213@gmail.com \
--cc=ilya.lipnitskiy@gmail.com \
--cc=john@phrozen.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).