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 19:04:11 +0000	[thread overview]
Message-ID: <20110127190411.GA1597@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.00.1101271337410.8580@xanadu.home>

On Thu, Jan 27, 2011 at 01:40:37PM -0500, Nicolas Pitre wrote:
> On Thu, 27 Jan 2011, Russell King - ARM Linux wrote:
> 
> > 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?
> 
> We don't support highmem on aliasing VIPT.  Highmem gets disabled at run 
> time on aliasing VIPT platforms.

Correct.  But a kernel which has this configuration:

CONFIG_SMP=y
CONFIG_HIGHMEM=y
CONFIG_CPU_V6=y
CONFIG_CPU_V7=y
CONFIG_CPU_32v6=y
CONFIG_CPU_32v7=y
CONFIG_CPU_CACHE_V6=y
CONFIG_CPU_CACHE_VIPT=y
CONFIG_CPU_CACHE_V7=y
CONFIG_CPU_CACHE_VIPT=y
CONFIG_CPU_TLB_V6=y
CONFIG_CPU_TLB_V7=y

This disables ARCH_NEEDS_KMAP_HIGH_GET in this kernel, which can be used on
ARMv6 VIPT non-aliasing, VIPT aliasing, as well as SMP stuff.

If we don't need ARCH_NEEDS_KMAP_HIGH_GET on V6 and V7, we should just not
enable it for those at all.

  reply	other threads:[~2011-01-27 19:04 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
2011-01-27 18:40             ` Nicolas Pitre
2011-01-27 19:04               ` Russell King - ARM Linux [this message]
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=20110127190411.GA1597@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).