public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: robert.richter@cavium.com (Robert Richter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section
Date: Thu, 24 Nov 2016 14:51:51 +0100	[thread overview]
Message-ID: <20161124135151.GJ10776@rric.localdomain> (raw)
In-Reply-To: <CAKv+Gu_Ug3XOD6jy5xziy1pS7WV=TC0RLD4j3DT6nytujQDzRQ@mail.gmail.com>

On 24.11.16 13:44:31, Ard Biesheuvel wrote:
> On 24 November 2016 at 13:42, Robert Richter <robert.richter@cavium.com> wrote:
> > On 23.11.16 21:25:06, Ard Biesheuvel wrote:
> >> Why? MEMREMAP_WB is used often, among other things for mapping
> >> firmware tables, which are marked as NOMAP, so in these cases, the
> >> linear address is not mapped.
> >
> > If fw tables are mapped wb, that is wrong and needs a separate fix.
> >
> 
> Why is that wrong?

The whole issue with mapping acpi tables is not marking them cachable,
what wb does. Otherwise we could just use linear mapping for those mem
ranges.

> >> > If you think pfn_valid() is wrong here, I am happy to send a patch
> >> > that fixes this by using page_is_ram(). In any case, the worst case
> >> > that may happen is to behave the same as v4.4, we might fix then the
> >> > wrong use of pfn_valid() where it is not correctly used to check for
> >> > ram.
> >> >
> >>
> >> page_is_ram() uses string comparisons to look for regions called
> >> 'System RAM'. Is that something we can tolerate for each pfn_valid()
> >> calll?
> >>
> >> Perhaps the solution is to reimplement page_is_ram() for arm64 using
> >> memblock_is_memory() instead, But that still means we need to modify
> >> the generic memremap() code first to switch to it before changing the
> >> arm64 implementation of pfn_valid
> >
> > No, that's not the solution. pfn_valid() should just check if there is
> > a valid struct page, as other archs do. And if there is a mis-use of
> > pfn_valid() to check for ram, only that calls should be fixed to use
> > page_is_ram(), however this is implemented, or something appropriate.
> > But I don't see any problematic code, and if so, I will fix that.
> >
> 
> memremap() uses pfn_valid() to decide whether some address is covered
> by the linear mapping. If we correct pfn_valid() to adhere to your
> definition, we will need to fix memremap() first in any case.

As said, will fix that if needed. But I think the caller is wrong
then.

-Robert

  reply	other threads:[~2016-11-24 13:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06  9:52 [PATCH] arm64: mm: Fix memmap to be initialized for the entire section Robert Richter
2016-10-06 10:00 ` Ard Biesheuvel
2016-10-06 16:11   ` Robert Richter
2016-10-17 18:58     ` Robert Richter
2016-10-27 16:01       ` Will Deacon
2016-10-28  9:19         ` Robert Richter
2016-11-07 21:05           ` Will Deacon
2016-11-09 19:51             ` Robert Richter
2016-11-17 14:25               ` Will Deacon
2016-11-17 15:18                 ` Robert Richter
2016-11-20 17:07                   ` Ard Biesheuvel
2016-11-23 21:15                     ` Robert Richter
2016-11-23 21:25                       ` Ard Biesheuvel
2016-11-24 13:42                         ` Robert Richter
2016-11-24 13:44                           ` Ard Biesheuvel
2016-11-24 13:51                             ` Robert Richter [this message]
2016-11-24 13:58                               ` Ard Biesheuvel
2016-11-24 14:11                                 ` Robert Richter
2016-11-24 14:23                                   ` Ard Biesheuvel
2016-11-24 15:09                                     ` Robert Richter
2016-11-24 19:26                                       ` Robert Richter
2016-11-24 19:42                                         ` Ard Biesheuvel
2016-11-25 11:29                                           ` Robert Richter
2016-11-25 12:28                                             ` Ard Biesheuvel
2016-11-25 17:01                                               ` Ard Biesheuvel
2016-10-18 10:18     ` Mark Rutland
2016-10-18 15:02       ` Robert Richter
2016-10-10 15:33 ` David Daney
2016-11-01 16:55 ` Robert Richter

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=20161124135151.GJ10776@rric.localdomain \
    --to=robert.richter@cavium.com \
    --cc=linux-arm-kernel@lists.infradead.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