linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Michel Pollet <michel.pollet@bp.renesas.com>
Cc: open list <linux-kernel@vger.kernel.org>,
	Phil Edworthy <phil.edworthy@renesas.com>,
	Will Deacon <will.deacon@arm.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	"buserror@gmail.com" <buserror@gmail.com>,
	"moderated list:ARM64 PORT (AARCH64 ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: arm/arm64: smp_spin_table.c for arm32?
Date: Wed, 28 Mar 2018 16:54:33 +0100	[thread overview]
Message-ID: <20180328155432.znx2w2xfa3aflccs@armageddon.cambridge.arm.com> (raw)
In-Reply-To: <OSBPR01MB2054DFD1BEECD87186E29E51D2A30@OSBPR01MB2054.jpnprd01.prod.outlook.com>

On Wed, Mar 28, 2018 at 08:12:50AM +0000, Michel Pollet wrote:
> I'm currently adapting a port from a machine-file based approach to driver based, and I
> would have a need for arch/arm64/kernel/smp_spin_table.c -- it's *exactly* my use
> case, but for arm32.
> So what would be my options here?
> 
> 1) Make myself a custom driver and ignore this one...
> 2) Fully duplicate smp_spin_table.c in arch/arm/kernel...
> 3) .... something else involving a shared bit of code?

There will be some small differences between the two like writeq() vs
writel(). My advice:

4) Use PSCI, already available in arch/arm/kernel/psci_smp.c

Otherwise, if you do need a spin table, duplicating is probably the
easiest, especially since you need a .S counterpart, but you'd need to
keep the arch/arm/mach-* directory. Also see this thread (and maybe
others):

https://lkml.org/lkml/2014/3/28/458

As long as booting is not standardised for your SoC, I don't think you'd
be able to move everything into drivers/.

On arm64, we only keep the pen release mechanism for XGene as they don't
have EL3 and cannot implement PSCI. All other platforms use PSCI (at
least those supported upstream).

-- 
Catalin

      reply	other threads:[~2018-03-28 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28  8:12 arm/arm64: smp_spin_table.c for arm32? Michel Pollet
2018-03-28 15:54 ` Catalin Marinas [this message]

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=20180328155432.znx2w2xfa3aflccs@armageddon.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=buserror@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michel.pollet@bp.renesas.com \
    --cc=phil.edworthy@renesas.com \
    --cc=will.deacon@arm.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 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).