powerpc: drop _PAGE_FILE and pte_file()-related helpers
[linux/fpc-iii.git] / arch / arm / mach-keystone / platsmp.c
blob5f46a7cf907b1f0fe162278c283431ce69aa8bed
1 /*
2 * Keystone SOC SMP platform code
4 * Copyright 2013 Texas Instruments, Inc.
5 * Cyril Chemparathy <cyril@ti.com>
6 * Santosh Shilimkar <santosh.shillimkar@ti.com>
8 * Based on platsmp.c, Copyright (C) 2002 ARM Ltd.
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms and conditions of the GNU General Public License,
12 * version 2, as published by the Free Software Foundation.
15 #include <linux/init.h>
16 #include <linux/smp.h>
17 #include <linux/io.h>
19 #include <asm/smp_plat.h>
20 #include <asm/prom.h>
21 #include <asm/tlbflush.h>
22 #include <asm/pgtable.h>
24 #include "keystone.h"
26 static int keystone_smp_boot_secondary(unsigned int cpu,
27 struct task_struct *idle)
29 unsigned long start = virt_to_idmap(&secondary_startup);
30 int error;
32 pr_debug("keystone-smp: booting cpu %d, vector %08lx\n",
33 cpu, start);
35 error = keystone_cpu_smc(KEYSTONE_MON_CPU_UP_IDX, cpu, start);
36 if (error)
37 pr_err("CPU %d bringup failed with %d\n", cpu, error);
39 return error;
42 #ifdef CONFIG_ARM_LPAE
43 static void __cpuinit keystone_smp_secondary_initmem(unsigned int cpu)
45 pgd_t *pgd0 = pgd_offset_k(0);
46 cpu_set_ttbr(1, __pa(pgd0) + TTBR1_OFFSET);
47 local_flush_tlb_all();
49 #else
50 static inline void __cpuinit keystone_smp_secondary_initmem(unsigned int cpu)
52 #endif
54 struct smp_operations keystone_smp_ops __initdata = {
55 .smp_boot_secondary = keystone_smp_boot_secondary,
56 .smp_secondary_init = keystone_smp_secondary_initmem,