[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXEGOmeaWhh6+LhtXTZ-M_cXz1rzTzbaGNrcmyshaSQP=Q@mail.gmail.com>
Date: Fri, 10 Jun 2022 13:17:38 +0200
From: Ard Biesheuvel <ardb@...nel.org>
To: Kefeng Wang <wangkefeng.wang@...wei.com>
Cc: Wupeng Ma <mawupeng1@...wei.com>, Jonathan Corbet <corbet@....net>,
Will Deacon <will@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
X86 ML <x86@...nel.org>, "H. Peter Anvin" <hpa@...or.com>,
Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
Mike Rapoport <rppt@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
"Paul E. McKenney" <paulmck@...nel.org>,
Kees Cook <keescook@...omium.org>, songmuchun@...edance.com,
Randy Dunlap <rdunlap@...radead.org>,
damien.lemoal@...nsource.wdc.com,
Stephen Boyd <swboyd@...omium.org>,
Wei Liu <wei.liu@...nel.org>,
Robin Murphy <robin.murphy@....com>,
David Hildenbrand <david@...hat.com>,
Anshuman Khandual <anshuman.khandual@....com>,
Zhen Lei <thunder.leizhen@...wei.com>, gpiccoli@...lia.com,
Huacai Chen <chenhuacai@...nel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
vijayb@...ux.microsoft.com,
Linux Doc Mailing List <linux-doc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linux-efi <linux-efi@...r.kernel.org>,
platform-driver-x86@...r.kernel.org,
Linux Memory Management List <linux-mm@...ck.org>,
linux-riscv <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH v3 2/6] arm64/mirror: arm64 enabling - find mirrored
memory ranges
On Fri, 10 Jun 2022 at 12:24, Kefeng Wang <wangkefeng.wang@...wei.com> wrote:
>
>
> On 2022/6/10 17:34, Ard Biesheuvel wrote:
> > On Fri, 10 Jun 2022 at 11:27, Kefeng Wang <wangkefeng.wang@...wei.com> wrote:
> >>
> >> On 2022/6/7 17:38, Wupeng Ma wrote:
> >>> From: Ma Wupeng <mawupeng1@...wei.com>
> >>>
> >>> Commit b05b9f5f9dcf ("x86, mirror: x86 enabling - find mirrored memory ranges")
> >>> introduced mirrored memory support for x86 and this could be used on arm64.
> >>>
> >>> Since we only support this feature on arm64, efi_find_mirror() won't be placed
> >>> into efi_init(), which is used by riscv/arm/arm64, it is added in setup_arch()
> >>> to scan the memory map and mark mirrored memory in memblock.
> >> Move into efi_init() looks better, it won't bring negative effects on
> >> arm/riscv.
> >>
> >> but let's maintainer to make a decision.
> >>
> >> Reviewed-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> >>
> > I don't disagree with that in principle, but x86 calls the efi fake
> > memmap stuff between efi_init() and efi_find_mirror(), and I already
> > indicated that I don't want to enable fake memmap on !X86.
>
> I mean move into efi_init() in drivers/firmware/efi/efi-init.c which
> only used
>
> in arm32/arm64/riscv.
>
> >
> > But I do think there is some room for improvement here: we could move
> > things like efi_mokvar_table_init() and efi_esrt_init() into
> > efi_init() as well, and make efi_fake_memmap() do nothing on !X86 so
> > we can move it into efi_init() too.
>
> x86 has own efi_init() in arch/x86/platform/efi/efi.c, it seams that all
> the above
>
> function could move into x86's own efi_init(), not sure, but we could do
> it later
>
> if it possible.
>
Yes, I see what you mean now. I agree that would be better.
Powered by blists - more mailing lists