summaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm/smp.h
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-10-12 16:28:55 +0530
committerVineet Gupta <vgupta@synopsys.com>2015-10-28 16:13:40 +0530
commite55af4da026ebdb9ded3cb7708b8a8bd7884ad3a (patch)
treedcd0c632606005ec87ffa24fa2414040fce1cfa0 /arch/arc/include/asm/smp.h
parent4c82f28617ab9ce938118f0b99156a96c64d3da0 (diff)
downloadlinux-e55af4da026ebdb9ded3cb7708b8a8bd7884ad3a.tar.bz2
ARC: smp: Introduce smp hook @init_early_smp for Master core
This adds a platform agnostic early SMP init hook which is called on Master core before calling setup_processor() setup_arch() smp_init_cpus() smp_ops.init_early_smp() ... setup_processor() How this helps: - Used for one time init of certain SMP centric IP blocks, before calling setup_processor() which probes various bits of core, possibly including this block - Currently platforms need to call this IP block init from their init routines, which doesn't make sense as this is specific to ARC core and not platform and otherwise requires copy/paste in all (and hence a possible point of failure) e.g. MCIP init is called from 2 platforms currently (axs10x and sim) which will go away once we have this. This change only adds the hooks but they are empty for now. Next commit will populate them and remove the explicit init calls from platforms. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include/asm/smp.h')
-rw-r--r--arch/arc/include/asm/smp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arc/include/asm/smp.h b/arch/arc/include/asm/smp.h
index 3845b9e94f69..5ea4cf8cd1a8 100644
--- a/arch/arc/include/asm/smp.h
+++ b/arch/arc/include/asm/smp.h
@@ -45,12 +45,16 @@ extern int smp_ipi_irq_setup(int cpu, int irq);
* struct plat_smp_ops - SMP callbacks provided by platform to ARC SMP
*
* @info: SoC SMP specific info for /proc/cpuinfo etc
+ * @init_early_smp: A SMP specific h/w block can init itself
+ * Could be common across platforms so not covered by
+ * mach_desc->init_early()
* @cpu_kick: For Master to kickstart a cpu (optionally at a PC)
* @ipi_send: To send IPI to a @cpu
* @ips_clear: To clear IPI received at @irq
*/
struct plat_smp_ops {
const char *info;
+ void (*init_early_smp)(void);
void (*cpu_kick)(int cpu, unsigned long pc);
void (*ipi_send)(int cpu);
void (*ipi_clear)(int irq);