All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Neil Armstrong <narmstrong@baylibre.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-oxnas@lists.tuxfamily.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ARM: oxnas: Add OX820 SMP support
Date: Mon, 31 Oct 2016 08:18:27 +0000	[thread overview]
Message-ID: <20161031081827.GQ1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <9124cda0-d16b-0992-2552-8a617aeb5d40@baylibre.com>

On Mon, Oct 17, 2016 at 11:34:32AM +0200, Neil Armstrong wrote:
> On 10/17/2016 11:06 AM, Arnd Bergmann wrote:
> > On Monday, October 17, 2016 10:43:02 AM CEST Neil Armstrong wrote:
> > This seems to have been copied from plat-versatile, but is really
> > not needed here since you apparently have proper hardware support for
> > starting up the CPUs.
> Yes it seems.
> 
> > 
> > Any reason you can't just write to the cpu_ctrl register
> > once and keep going without that whole holding_pen loop
> > and spinlock?
> I suppose but I did not find any good examples except the plat-versatile code.
> I will try some simpler code.

There's plenty of examples - most ARM SMP platforms in the kernel now
do not blindly copy the versatile code.  You only have to go looking
for arch/arm/*/platsmp.c files to find them.

I'm not sure what you'd call a "good example" - maybe the imx code?
arch/arm/mach-imx/platsmp.c can't be simpler:

static int imx_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
        imx_set_cpu_jump(cpu, v7_secondary_startup);
        imx_enable_cpu(cpu, true);
        return 0;
}

I guess the difficult thing is to understand what each of those called
functions does... though the function names give a very accurate clue
there.

and because plat-versatile is almost entirely software-based, it's
easy to understand and follow, _despite_ being completely broken
for things like PM and kexec (which, the platform does not support.)

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

WARNING: multiple messages have this Message-ID (diff)
From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: oxnas: Add OX820 SMP support
Date: Mon, 31 Oct 2016 08:18:27 +0000	[thread overview]
Message-ID: <20161031081827.GQ1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <9124cda0-d16b-0992-2552-8a617aeb5d40@baylibre.com>

On Mon, Oct 17, 2016 at 11:34:32AM +0200, Neil Armstrong wrote:
> On 10/17/2016 11:06 AM, Arnd Bergmann wrote:
> > On Monday, October 17, 2016 10:43:02 AM CEST Neil Armstrong wrote:
> > This seems to have been copied from plat-versatile, but is really
> > not needed here since you apparently have proper hardware support for
> > starting up the CPUs.
> Yes it seems.
> 
> > 
> > Any reason you can't just write to the cpu_ctrl register
> > once and keep going without that whole holding_pen loop
> > and spinlock?
> I suppose but I did not find any good examples except the plat-versatile code.
> I will try some simpler code.

There's plenty of examples - most ARM SMP platforms in the kernel now
do not blindly copy the versatile code.  You only have to go looking
for arch/arm/*/platsmp.c files to find them.

I'm not sure what you'd call a "good example" - maybe the imx code?
arch/arm/mach-imx/platsmp.c can't be simpler:

static int imx_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
        imx_set_cpu_jump(cpu, v7_secondary_startup);
        imx_enable_cpu(cpu, true);
        return 0;
}

I guess the difficult thing is to understand what each of those called
functions does... though the function names give a very accurate clue
there.

and because plat-versatile is almost entirely software-based, it's
easy to understand and follow, _despite_ being completely broken
for things like PM and kexec (which, the platform does not support.)

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2016-10-31  8:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17  8:43 [PATCH 0/2] ARM: oxnas: Add SMP support for OX820 Neil Armstrong
2016-10-17  8:43 ` Neil Armstrong
2016-10-17  8:43 ` [PATCH 1/2] ARM: oxnas: Add OX820 SMP support Neil Armstrong
2016-10-17  8:43   ` Neil Armstrong
2016-10-17  9:06   ` Arnd Bergmann
2016-10-17  9:06     ` Arnd Bergmann
2016-10-17  9:34     ` Neil Armstrong
2016-10-17  9:34       ` Neil Armstrong
2016-10-31  8:18       ` Russell King - ARM Linux [this message]
2016-10-31  8:18         ` Russell King - ARM Linux
2016-10-17  8:43 ` [PATCH 2/2] ARM: oxnas: Add OX820 config and makefile entry Neil Armstrong
2016-10-17  8:43   ` Neil Armstrong

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=20161031081827.GQ1041@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-oxnas@lists.tuxfamily.org \
    --cc=narmstrong@baylibre.com \
    /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.