All of lore.kernel.org
 help / color / mirror / Atom feed
From: t.figa@samsung.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] arm: use generic fixmap.h
Date: Tue, 22 Jul 2014 18:39:51 +0200	[thread overview]
Message-ID: <53CE93D7.5010608@samsung.com> (raw)
In-Reply-To: <1404898792-4201-2-git-send-email-leif.lindholm@linaro.org>

Hi Leif,

On 09.07.2014 11:39, Leif Lindholm wrote:
> From: Mark Salter <msalter@redhat.com>
> 
> ARM is different from other architectures in that fixmap pages are
> indexed with a positive offset from FIXADDR_START. Other architectures
> index with a negative offset from FIXADDR_TOP. In order to use the
> generic fixmap.h definitions, this patch redefines FIXADDR_TOP to be
> inclusive of the useable range. That is, FIXADDR_TOP is the virtual
> address of the topmost fixed page. The newly defined FIXADDR_END is
> the first virtual address past the fixed mappings.
> 
> The patch also introduces local helper macros in highmem.c to reverse
> the iteration order of fixmap pages.
> 
> Signed-off-by: Mark Salter <msalter@redhat.com>
> [Rebased to 3.16-rc4, reverse kmap fixmap traversal]
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> ---
>  arch/arm/include/asm/fixmap.h |   45 ++++++++++++++++++++++++++---------------
>  arch/arm/mm/highmem.c         |   13 +++++++-----
>  arch/arm/mm/init.c            |    2 +-
>  3 files changed, 38 insertions(+), 22 deletions(-)
> 

I've tried to use this series to enable earlycon without hardcoded
static mappings, but apparently something is not right yet. Please see
below.

[snip]

> -extern void __this_fixmap_does_not_exist(void);
> +#define FIXMAP_PAGE_NORMAL (L_PTE_MT_WRITEBACK | L_PTE_YOUNG | L_PTE_PRESENT)
> +#define FIXMAP_PAGE_IO (L_PTE_MT_DEV_NONSHARED | L_PTE_YOUNG | L_PTE_PRESENT)

This set of flags gives a read-only mapping on the machine I'm testing
on (Exynos4412, Cortex A9MPcore). If I use the same set of flags as used
in arch/arm/mm/mmu.c for MT_DEVICE_NONSHARED then the mapping works fine.

Best regards,
Tomasz

  parent reply	other threads:[~2014-07-22 16:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09  9:39 [PATCH 0/2] arm: add early_ioremap support Leif Lindholm
2014-07-09  9:39 ` [PATCH 1/2] arm: use generic fixmap.h Leif Lindholm
2014-07-09 20:49   ` Mark Salter
2014-07-18 14:33     ` Leif Lindholm
2014-07-25 19:56       ` Kees Cook
2014-07-22 16:39   ` Tomasz Figa [this message]
2014-07-09  9:39 ` [PATCH 2/2] arm: add early_ioremap support Leif Lindholm
2014-07-09  9:49   ` Russell King - ARM Linux
2014-07-09 11:48     ` Leif Lindholm
2014-07-22 16:48   ` Tomasz Figa
2014-07-22 17:11     ` Rob Herring
2014-07-22 17:27       ` Tomasz Figa
2014-07-09  9:42 ` [PATCH 0/2] " Russell King - ARM Linux
2014-07-09  9:58   ` Leif Lindholm
2014-07-09  9:47 ` Will Deacon
2014-07-09 10:02   ` Leif Lindholm

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=53CE93D7.5010608@samsung.com \
    --to=t.figa@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.