linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: HIGHMEM is broken when working in SMP V6 mode
Date: Thu, 27 Jan 2011 17:37:16 +0000	[thread overview]
Message-ID: <20110127173716.GA605@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.00.1101241010580.8580@xanadu.home>

On Mon, Jan 24, 2011 at 02:58:07PM -0500, Nicolas Pitre wrote:
>  /*
> + * The reason for kmap_high_get() is to ensure that the currently kmap'd
> + * page usage count does not decrease to zero while we're using its
> + * existing virtual mapping in an atomic context.  With a VIVT cache this
> + * is essential to do, but with a VIPT cache this is only an optimization
> + * so not to pay the price of establishing a second mapping if an existing
> + * one can be used.  However, on platforms without hardware TLB maintainence
> + * broadcast, we simply cannot use ARCH_NEEDS_KMAP_HIGH_GET at all since
> + * the locking involved must also disable IRQs which is incompatible with
> + * the IPI mechanism used by global TLB operations.
> + */
> +#define ARCH_NEEDS_KMAP_HIGH_GET
> +#if defined(CONFIG_SMP) && defined(CONFIG_CPU_TLB_V6)
> +#undef ARCH_NEEDS_KMAP_HIGH_GET
> +#if defined(CONFIG_HIGHMEM) && defined(CONFIG_CPU_CACHE_VIVT)
> +#error "The sum of feature in your kernel config cannot be supported together"
> +#endif

This is wrong.  Take a moment to consider a kernel supporting an ARMv6
VIPT aliasing cache CPU and ARMv7 SMP.  Don't we need kmap_high_get()
for ARMv6 VIPT aliasing cache?

The effect of this is that dma_cache_maint_page() will create new mappings
which could be have the wrong colour - and therefore the subsequent cache
maintainence will not have the desired effect.

I think this may break OMAP.

  parent reply	other threads:[~2011-01-27 17:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-23 14:38 HIGHMEM is broken when working in SMP V6 mode saeed bishara
2011-01-23 14:56 ` Russell King - ARM Linux
2011-01-23 16:34   ` saeed bishara
2011-01-23 17:08     ` Russell King - ARM Linux
2011-01-24  8:47       ` saeed bishara
2011-01-24  9:19         ` Russell King - ARM Linux
2011-01-24  9:55           ` saeed bishara
2011-01-24 19:58         ` Nicolas Pitre
2011-01-25  8:37           ` saeed bishara
2011-01-27 17:37           ` Russell King - ARM Linux [this message]
2011-01-27 18:40             ` Nicolas Pitre
2011-01-27 19:04               ` Russell King - ARM Linux
2011-01-27 19:45                 ` Nicolas Pitre

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=20110127173716.GA605@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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;
as well as URLs for NNTP newsgroup(s).