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: [PATCH RFCv2 3/5] ARM: allow CONFIG_SMP_ON_UP on non-SMP configurations
Date: Mon, 26 May 2014 17:35:56 +0100	[thread overview]
Message-ID: <20140526163556.GC3693@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1400600105-3013-4-git-send-email-thomas.petazzoni@free-electrons.com>

On Tue, May 20, 2014 at 05:35:03PM +0200, Thomas Petazzoni wrote:
> Currently CONFIG_SMP_ON_UP is used when CONFIG_SMP is enabled to allow
> a SMP kernel to boot on UP platforms that do not support certain
> aspects of SMP platforms.
> 
> However, some of the SMP characteristics are needed on platforms that
> have SMP capabilities but are single core, and use their SMP
> capabilities to provide hardware I/O coherency. This is for example
> the case on Marvell Armada platforms.
> 
> Instead of special casing these platforms to enable the SMP and TLB
> broadcast bit and use shareable pages, this patch proposes to simply
> allow CONFIG_SMP_ON_UP to be enabled even on non-SMP
> configurations. When CONFIG_SMP_ON_UP is enabled in a !CONFIG_SMP
> configuration, it will check that the processor is SMP capable, and if
> yes use all the SMP characteristics (SMP and TLB broadcast bit,
> shareable pages, etc.). It will not support multiprocessing of course,
> but it will have sufficient capabilities to allow hardware I/O
> coherency to work.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> Of course, the name of CONFIG_SMP_ON_UP is maybe no longer
> appropriate. Suggestions are welcome to change this: this patch is
> really the minimal set of changes to get things to work.
> 
> We could also decide to completely get rid of CONFIG_SMP_ON_UP and
> make it always on. Suggestions welcome.

This feels very wrong - while you may need a SCU for coherency, which
implies that you have a SMP capable CPU, this feels very much like
overloading a currently well-defined facility with a well-defined
purpose (which gets used for a lot of things) with a new purpose, which
is going to be painful in the future if we ever need to separate the
two things.  So no, I really don't like this.

If we need to change things here, make the change properly even if it
means that it takes more time, and don't do quick sticky-plasters like
this - the quick sticky-plaster method ultimately makes stuff less
maintainable.

Secondly, doesn't this make your first patch redundant - if you need the
SMP instructions, then is_smp() returns true, which then forces WBWA
cache mode.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

  reply	other threads:[~2014-05-26 16:35 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20 15:35 [PATCH RFCv2 0/5] ARM core support for hardware I/O coherency in non-SMP platforms Thomas Petazzoni
2014-05-20 15:35 ` [PATCH RFCv2 1/5] ARM: use write allocate by default on ARMv6+ Thomas Petazzoni
2014-05-26 16:26   ` Russell King - ARM Linux
2014-05-27  9:15     ` Thomas Petazzoni
2014-05-27  9:47       ` Russell King - ARM Linux
2014-05-27 11:52         ` Thomas Petazzoni
2014-05-27 12:18           ` Russell King - ARM Linux
2014-05-27 12:37             ` Thomas Petazzoni
2014-05-28 11:24               ` Russell King - ARM Linux
2014-05-30  8:08                 ` Thomas Petazzoni
2014-05-30  9:20                   ` Russell King - ARM Linux
2014-06-13 10:11                     ` Thomas Petazzoni
2014-06-13 10:20                       ` Russell King - ARM Linux
2014-06-13 11:34                         ` Thomas Petazzoni
2014-06-13 13:51                           ` Thomas Petazzoni
2014-06-17  8:48                             ` Thomas Petazzoni
2014-06-17 11:26                               ` Russell King - ARM Linux
2014-06-28 15:39                                 ` Thomas Petazzoni
2014-06-28 16:34                                   ` Russell King - ARM Linux
2014-06-28 16:52                                     ` Thomas Petazzoni
2014-05-20 15:35 ` [PATCH RFCv2 2/5] ARM: kernel: allow the SCU to be enabled even on !SMP Thomas Petazzoni
2014-05-20 15:35 ` [PATCH RFCv2 3/5] ARM: allow CONFIG_SMP_ON_UP on non-SMP configurations Thomas Petazzoni
2014-05-26 16:35   ` Russell King - ARM Linux [this message]
2014-05-27 11:59     ` Thomas Petazzoni
2014-05-27 12:22       ` Russell King - ARM Linux
2014-05-27 12:47         ` Thomas Petazzoni
2014-05-20 15:35 ` [PATCH RFCv2 4/5] ARM: mvebu: enable coherency only when possible on Armada XP Thomas Petazzoni
2014-05-20 15:35 ` [PATCH RFCv2 5/5] ARM: mvebu: add debugging message indicating the status of I/O coherency Thomas Petazzoni
2014-05-26 13:32 ` [PATCH RFCv2 0/5] ARM core support for hardware I/O coherency in non-SMP platforms Thomas Petazzoni

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=20140526163556.GC3693@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).