Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1526257
| From | Ard Biesheuvel <ard.biesheuvel@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section |
| Date | 2016-11-20 18:10 +0100 |
| Message-ID | <sFDMR-6n8-9@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <sAZl0-8k-33@gated-at.bofh.it> <sAZl0-8k-31@gated-at.bofh.it> <sEw14-1T0-47@gated-at.bofh.it> <sEw14-1T0-45@gated-at.bofh.it> <sFDMR-6n8-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 17 November 2016 at 15:18, Robert Richter <robert.richter@cavium.com> wrote: > Thanks for your answer. > > On 17.11.16 14:25:29, Will Deacon wrote: >> On Wed, Nov 09, 2016 at 08:51:32PM +0100, Robert Richter wrote: >> > Thus, I don't see where my patch breaks code. Even acpi_os_ioremap() >> > keeps the same behaviour as before since it still uses memblock_is_ >> > memory(). Could you more describe your concerns why do you think this >> > patch breaks the kernel and moves the problem somewhere else? I >> > believe it fixes the problem at all. >> >> acpi_os_ioremap always ends up in __ioremap_caller, regardless of >> memblock_is_memory(). __ioremap_caller then fails if pfn_valid is true. > > But that's the reason my patch changed the code to use memblock_is_ > map_memory() instead. I was looking into the users of pfn_valid() esp. > in arm64 code and changed it where required. > > This week I looked into the kernel again for code that might break by > a pfn_valid() change. I found try_ram_remap() in memremap.c that has > changed behaviour now, but this is explicit for MEMREMAP_WB, so it > should be fine. > > Maybe it might be better to use page_is_ram() in addition to > pfn_valid() where necessary. This should work now after commit: > > e7cd190385d1 arm64: mark reserved memblock regions explicitly in iomem > > I still think pfn_valid() is not the correct use to determine the mem > attributes for mappings, there are further checks required. > > The risk of breaking something with my patch is small and limited only > to the mapping of efi reserved regions (which is the state of 4.4). If > something breaks anyway it can easily be fixed by adding more checks > to pfn_valid() as suggested above. > As I noted before, it looks to me like setting CONFIG_HOLES_IN_ZONE is the correct way to address this. However, doing that does uncover a bug in move_freepages() where the VM_BUG_ON_PAGE() dereferences struct page fields before the pfn_valid_within() check, so it seems those need to be switched around. Robert, you mentioned that CONFIG_HOLES_IN_ZONE seems inappropriate for sparsemem. Care to elaborate why?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section Will Deacon <will.deacon@arm.com> - 2016-11-17 15:40 +0100
Re: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-11-20 18:10 +0100
Re: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-11-23 22:30 +0100
Re: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-11-24 14:50 +0100
Re: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-11-24 15:00 +0100
Re: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-11-24 15:40 +0100
Re: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-11-24 20:50 +0100
csiph-web