~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-highbank/platsmp.c

Version: ~ [ linux-5.4-rc7 ] ~ [ linux-5.3.11 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.84 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.154 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.201 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.201 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.77 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Copyright 2010-2011 Calxeda, Inc.
  3  * Based on platsmp.c, Copyright (C) 2002 ARM Ltd.
  4  *
  5  * This program is free software; you can redistribute it and/or modify it
  6  * under the terms and conditions of the GNU General Public License,
  7  * version 2, as published by the Free Software Foundation.
  8  *
  9  * This program is distributed in the hope it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 12  * more details.
 13  *
 14  * You should have received a copy of the GNU General Public License along with
 15  * this program.  If not, see <http://www.gnu.org/licenses/>.
 16  */
 17 #include <linux/init.h>
 18 #include <linux/smp.h>
 19 #include <linux/io.h>
 20 
 21 #include <asm/smp_scu.h>
 22 #include <asm/hardware/gic.h>
 23 
 24 #include "core.h"
 25 
 26 extern void secondary_startup(void);
 27 
 28 void __cpuinit platform_secondary_init(unsigned int cpu)
 29 {
 30         gic_secondary_init(0);
 31 }
 32 
 33 int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
 34 {
 35         gic_raise_softirq(cpumask_of(cpu), 0);
 36         return 0;
 37 }
 38 
 39 /*
 40  * Initialise the CPU possible map early - this describes the CPUs
 41  * which may be present or become present in the system.
 42  */
 43 void __init smp_init_cpus(void)
 44 {
 45         unsigned int i, ncores;
 46 
 47         ncores = scu_get_core_count(scu_base_addr);
 48 
 49         /* sanity check */
 50         if (ncores > NR_CPUS) {
 51                 printk(KERN_WARNING
 52                        "highbank: no. of cores (%d) greater than configured "
 53                        "maximum of %d - clipping\n",
 54                        ncores, NR_CPUS);
 55                 ncores = NR_CPUS;
 56         }
 57 
 58         for (i = 0; i < ncores; i++)
 59                 set_cpu_possible(i, true);
 60 
 61         set_smp_cross_call(gic_raise_softirq);
 62 }
 63 
 64 void __init platform_smp_prepare_cpus(unsigned int max_cpus)
 65 {
 66         int i;
 67 
 68         scu_enable(scu_base_addr);
 69 
 70         /*
 71          * Write the address of secondary startup into the jump table
 72          * The cores are in wfi and wait until they receive a soft interrupt
 73          * and a non-zero value to jump to. Then the secondary CPU branches
 74          * to this address.
 75          */
 76         for (i = 1; i < max_cpus; i++)
 77                 highbank_set_cpu_jump(i, secondary_startup);
 78 }
 79 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp