From: "Pali Rohár" <pali@kernel.org>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, robh+dt@kernel.org,
paulus@samba.org, Ash Logan <ash@heyquark.com>,
linuxppc-dev@lists.ozlabs.org, j.ne@posteo.net
Subject: Re: [PATCH 11/12] powerpc: wiiu: don't enforce flat memory
Date: Mon, 8 Aug 2022 20:40:34 +0200 [thread overview]
Message-ID: <20220808184034.lskqrk6z3gb5q76r@pali> (raw)
In-Reply-To: <20220609222420.ponpoodiqmaqtwht@pali>
On Friday 10 June 2022 00:24:20 Pali Rohár wrote:
> On Friday 20 May 2022 14:30:02 Pali Rohár wrote:
> > + linux-mm
> >
> > Do you know what are requirements for kernel to support non-contiguous
> > memory support and what is needed to enable it for 32-bit powerpc?
>
> Any hints?
PING?
> > Currently powerpc arch code does not support "memblock.memory.cnt > 1"
> > except for WII which seems like a hack... See below.
> >
> > On Friday 20 May 2022 20:44:04 Ash Logan wrote:
> > > On 20/5/22 18:04, Pali Rohár wrote:
> > > > On Friday 20 May 2022 13:41:04 Ash Logan wrote:
> > > >> On 14/5/22 08:43, Pali Rohár wrote:
> > > >>> On Wednesday 02 March 2022 15:44:05 Ash Logan wrote:
> > > >>>> pgtable_32.c:mapin_ram loops over each valid memory range, which means
> > > >>>> non-contiguous memory just works.
> > > >>>
> > > >>> Hello! Does it mean that non-contiguous memory works for any 32-bit
> > > >>> powerpc platform, and not only for wiiu? If yes, should not be
> > > >>> non-contiguous memory support enabled for all 32-bit ppc boards then?
> > > >>
> > > >> Hi! Sorry for my delayed response. As best I can tell, it does indeed
> > > >> Just Work, but I have only been able to test on wiiu which is missing a
> > > >> lot of features other boards have (like PCI) - so it's possible there's
> > > >> still an assumption elsewhere in the kernel that I haven't hit.
> > > >>
> > > >> As best I can tell, the Wii and Wii U are the only 32-bit powerpc boards
> > > >> out there where it's even possible to have non-contiguous memory.
> > > >
> > > > What is the reason that those two boards are the **only**? Is there some
> > > > specific requirement from bootloader or hardware to "enable"
> > > > non-contiguous memory support?
> > >
> > > Not that I know of, I was just saying that I was only aware of those two
> > > boards where the memory map isn't contiguous, and that is the only place
> > > where it has been tested. Evidently you know of another board!
> > >
> > > > I'm interested in enabling non-contiguous memory support for P2020-based
> > > > board as it has gaps in its 32-bit memory layout and which could be used
> > > > for RAM mapping when 4GB DDR3 module is plugged in (default is 2GB).
> > >
> > > If it's like the Wii or Wii U (some memory at 0, a gap for MMIO or
> > > whatever, then more memory at a higher address) then you should try a
> > > patch along these lines, because barring the unknowns I mentioned before
> > > it should work. At least as far as I'm aware ;)
> > >
> > > >>>> Signed-off-by: Ash Logan <ash@heyquark.com>
> > > >>>> ---
> > > >>>> arch/powerpc/mm/init_32.c | 4 ++--
> > > >>>> 1 file changed, 2 insertions(+), 2 deletions(-)
> > > >>>>
> > > >>>> diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
> > > >>>> index 3d690be48e84..59a84629d9a0 100644
> > > >>>> --- a/arch/powerpc/mm/init_32.c
> > > >>>> +++ b/arch/powerpc/mm/init_32.c
> > > >>>> @@ -125,10 +125,10 @@ void __init MMU_init(void)
> > > >>>> * lowmem_end_addr is initialized below.
> > > >>>> */
> > > >>>> if (memblock.memory.cnt > 1) {
> > > >>>> -#ifndef CONFIG_WII
> > > >>>> +#if !defined(CONFIG_WII) && !defined(CONFIG_WIIU)
> > > >>>> memblock_enforce_memory_limit(memblock.memory.regions[0].size);
> > > >>>> pr_warn("Only using first contiguous memory region\n");
> > > >>>> -#else
> > > >>>> +#elif defined(CONFIG_WII)
> > > >>>> wii_memory_fixups();
> > > >>>> #endif
> > > >>>> }
> > > >>>> --
> > > >>>> 2.35.1
> > > >>>>
next prev parent reply other threads:[~2022-08-08 18:41 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 4:43 [PATCH 00/12] powerpc: Nintendo Wii U support Ash Logan
2022-03-02 4:43 ` [PATCH 01/12] dt-bindings: wiiu: Document the Nintendo Wii U devicetree Ash Logan
2022-03-02 13:28 ` Rob Herring
2022-03-02 4:43 ` [PATCH 02/12] powerpc: wiiu: device tree Ash Logan
2022-03-02 13:36 ` Rob Herring
2022-03-03 2:41 ` Ash Logan
2022-03-02 4:43 ` [PATCH 03/12] powerpc: wiiu: bootwrapper support Ash Logan
2022-03-02 4:43 ` [PATCH 04/12] powerpc: wiiu: introduce wiiu platform Ash Logan
2022-03-02 4:43 ` [PATCH 05/12] powerpc: wiiu: declare as non-coherent Ash Logan
2022-03-02 4:44 ` [PATCH 06/12] powerpc: wiiu: udbg support for latteipc Ash Logan
2022-03-02 4:44 ` [PATCH 07/12] powerpc: wiiu: espresso interrupt controller support Ash Logan
2022-03-02 4:44 ` [PATCH 08/12] powerpc: wiiu: latte " Ash Logan
2022-03-02 4:44 ` [PATCH 09/12] powerpc: espresso processor support Ash Logan
2022-03-02 4:44 ` [PATCH 10/12] powerpc: wiiu: platform support Ash Logan
2022-03-02 4:44 ` [PATCH 11/12] powerpc: wiiu: don't enforce flat memory Ash Logan
2022-05-13 22:43 ` Pali Rohár
2022-05-20 3:41 ` Ash Logan
2022-05-20 8:04 ` Pali Rohár
2022-05-20 10:44 ` Ash Logan
2022-05-20 12:30 ` Pali Rohár
2022-06-09 22:24 ` Pali Rohár
2022-08-08 18:40 ` Pali Rohár [this message]
2022-09-08 15:25 ` Christophe Leroy
2022-09-08 15:35 ` Pali Rohár
2022-09-08 20:17 ` Fragmented physical memory on powerpc/32 Pali Rohár
2022-09-10 9:39 ` Christophe Leroy
2022-09-12 14:48 ` Mike Rapoport
2022-09-12 21:16 ` Pali Rohár
2022-09-13 6:11 ` Christophe Leroy
2022-09-13 12:36 ` Christophe Leroy
2022-09-14 9:32 ` Mike Rapoport
2022-09-14 9:43 ` Christophe Leroy
2022-09-14 15:55 ` Mike Rapoport
2022-09-14 19:56 ` Pali Rohár
2022-03-02 4:44 ` [PATCH 12/12] powerpc: wiiu: Add minimal default config Ash Logan
2022-06-22 13:10 ` [PATCH v2 00/12] powerpc: Nintendo Wii U support Ash Logan
2022-06-22 13:10 ` [PATCH v2 01/12] dt-bindings: wiiu: Document the Nintendo Wii U devicetree Ash Logan
2022-06-22 13:10 ` [PATCH v2 02/12] powerpc: wiiu: device tree Ash Logan
2022-06-22 13:10 ` [PATCH v2 03/12] powerpc: wiiu: bootwrapper support Ash Logan
2022-06-22 13:10 ` [PATCH v2 04/12] powerpc: wiiu: introduce wiiu platform Ash Logan
2022-06-22 13:10 ` [PATCH v2 05/12] powerpc: wiiu: declare as non-coherent Ash Logan
2022-06-22 13:10 ` [PATCH v2 06/12] powerpc: wiiu: udbg support for latteipc Ash Logan
2022-06-27 0:15 ` kernel test robot
2022-06-22 13:10 ` [PATCH v2 07/12] powerpc: wiiu: espresso interrupt controller support Ash Logan
2022-06-22 13:10 ` [PATCH v2 08/12] powerpc: wiiu: latte " Ash Logan
2022-06-27 2:51 ` kernel test robot
2022-06-22 13:10 ` [PATCH v2 09/12] powerpc: espresso processor support Ash Logan
2022-06-22 13:10 ` [PATCH v2 10/12] powerpc: wiiu: platform support Ash Logan
2022-06-22 13:10 ` [PATCH v2 11/12] powerpc: wiiu: don't enforce flat memory Ash Logan
2022-06-22 13:10 ` [PATCH v2 12/12] powerpc: wiiu: Add minimal default config Ash Logan
2022-06-28 13:31 ` [PATCH v3 00/12] powerpc: Nintendo Wii U support Ash Logan
2022-06-28 13:31 ` [PATCH v3 01/12] dt-bindings: wiiu: Document the Nintendo Wii U devicetree Ash Logan
2022-06-29 9:52 ` Krzysztof Kozlowski
2022-06-28 13:31 ` [PATCH v3 02/12] powerpc: wiiu: device tree Ash Logan
2022-06-29 9:58 ` Krzysztof Kozlowski
2022-06-29 16:13 ` Segher Boessenkool
2022-06-29 18:13 ` Krzysztof Kozlowski
2022-06-29 20:28 ` Segher Boessenkool
2022-06-28 13:31 ` [PATCH v3 03/12] powerpc: wiiu: bootwrapper support Ash Logan
2022-06-28 13:31 ` [PATCH v3 04/12] powerpc: wiiu: introduce wiiu platform Ash Logan
2022-06-28 13:31 ` [PATCH v3 05/12] powerpc: wiiu: declare as non-coherent Ash Logan
2022-06-28 13:31 ` [PATCH v3 06/12] powerpc: wiiu: udbg support for latteipc Ash Logan
2022-06-28 13:31 ` [PATCH v3 07/12] powerpc: wiiu: espresso interrupt controller support Ash Logan
2022-06-28 13:31 ` [PATCH v3 08/12] powerpc: wiiu: latte " Ash Logan
2022-06-28 13:31 ` [PATCH v3 09/12] powerpc: espresso processor support Ash Logan
2022-06-28 13:31 ` [PATCH v3 10/12] powerpc: wiiu: platform support Ash Logan
2022-06-28 13:31 ` [PATCH v3 11/12] powerpc: wiiu: don't enforce flat memory Ash Logan
2022-06-28 13:31 ` [PATCH v3 12/12] powerpc: wiiu: add minimal default config Ash Logan
2022-11-15 14:47 ` [PATCH v3 00/12] powerpc: Nintendo Wii U support Christophe Leroy
2022-11-19 11:30 ` [PATCH v4 00/11] " Ash Logan
2022-11-19 11:30 ` [PATCH v4 01/11] dt-bindings: wiiu: Document the Nintendo Wii U devicetree Ash Logan
2022-11-19 21:36 ` Rob Herring
2022-11-20 15:30 ` Rob Herring
2024-02-20 16:20 ` Christophe Leroy
2024-02-20 16:24 ` Krzysztof Kozlowski
2022-11-19 11:30 ` [PATCH v4 02/11] powerpc: wiiu: device tree Ash Logan
2022-11-19 11:30 ` [PATCH v4 03/11] powerpc: wiiu: bootwrapper support Ash Logan
2022-11-19 11:30 ` [PATCH v4 04/11] powerpc: wiiu: introduce wiiu platform Ash Logan
2022-11-19 11:30 ` [PATCH v4 05/11] powerpc: wiiu: declare as non-coherent Ash Logan
2022-11-19 11:30 ` [PATCH v4 06/11] powerpc: wiiu: udbg support for latteipc Ash Logan
2022-11-19 11:30 ` [PATCH v4 07/11] powerpc: wiiu: espresso interrupt controller support Ash Logan
2022-11-19 11:30 ` [PATCH v4 08/11] powerpc: wiiu: latte " Ash Logan
2022-11-19 11:30 ` [PATCH v4 09/11] powerpc: espresso processor support Ash Logan
2022-11-19 11:30 ` [PATCH v4 10/11] powerpc: wiiu: platform support Ash Logan
2022-11-19 11:30 ` [PATCH v4 11/11] powerpc: wiiu: add minimal default config Ash Logan
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=20220808184034.lskqrk6z3gb5q76r@pali \
--to=pali@kernel.org \
--cc=ash@heyquark.com \
--cc=j.ne@posteo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=robh+dt@kernel.org \
/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).