linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arm/arm64: smp_spin_table.c for arm32?
@ 2018-03-28  8:12 Michel Pollet
  2018-03-28 15:54 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: Michel Pollet @ 2018-03-28  8:12 UTC (permalink / raw)
  To: open list
  Cc: Will Deacon, moderated list:ARM64 PORT (AARCH64 ARCHITECTURE,
	Catalin Marinas, buserror, Geert Uytterhoeven, Phil Edworthy

Hi guys,

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?

I obviously would prefer 3), however, I don't see any obvious way of 'sharing' anything
between these two arch...
Any suggestion greatly appreciated!

Regards,
Michel




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: arm/arm64: smp_spin_table.c for arm32?
  2018-03-28  8:12 arm/arm64: smp_spin_table.c for arm32? Michel Pollet
@ 2018-03-28 15:54 ` Catalin Marinas
  0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2018-03-28 15:54 UTC (permalink / raw)
  To: Michel Pollet
  Cc: open list, Phil Edworthy, Will Deacon, Geert Uytterhoeven,
	buserror, moderated list:ARM64 PORT (AARCH64 ARCHITECTURE

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-28 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-28  8:12 arm/arm64: smp_spin_table.c for arm32? Michel Pollet
2018-03-28 15:54 ` Catalin Marinas

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).