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

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

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/arm/mach-versatile/platsmp-vexpress.c (Version linux-6.12-rc7) and /arch/ppc/mach-versatile/platsmp-vexpress.c (Version linux-2.6.32.71)


  1 // SPDX-License-Identifier: GPL-2.0-only            1 
  2 /*                                                
  3  *  Copyright (C) 2002 ARM Ltd.                   
  4  *  All Rights Reserved                           
  5  */                                               
  6 #include <linux/init.h>                           
  7 #include <linux/errno.h>                          
  8 #include <linux/smp.h>                            
  9 #include <linux/io.h>                             
 10 #include <linux/of_address.h>                     
 11 #include <linux/vexpress.h>                       
 12                                                   
 13 #include <asm/mcpm.h>                             
 14 #include <asm/smp_scu.h>                          
 15 #include <asm/mach/map.h>                         
 16                                                   
 17 #include "platsmp.h"                              
 18 #include "vexpress.h"                             
 19                                                   
 20 bool __init vexpress_smp_init_ops(void)           
 21 {                                                 
 22 #ifdef CONFIG_MCPM                                
 23         int cpu;                                  
 24         struct device_node *cpu_node, *cci_nod    
 25                                                   
 26         /*                                        
 27          * The best way to detect a multi-clus    
 28          * is to detect if the kernel can take    
 29          * control. Loop over possible CPUs an    
 30          * port control is available.             
 31          * Override the default vexpress_smp_o    
 32          */                                       
 33         for_each_possible_cpu(cpu) {              
 34                 bool available;                   
 35                                                   
 36                 cpu_node = of_get_cpu_node(cpu    
 37                 if (WARN(!cpu_node, "Missing c    
 38                         return false;             
 39                                                   
 40                 cci_node = of_parse_phandle(cp    
 41                 available = cci_node && of_dev    
 42                 of_node_put(cci_node);            
 43                 of_node_put(cpu_node);            
 44                                                   
 45                 if (!available)                   
 46                         return false;             
 47         }                                         
 48                                                   
 49         mcpm_smp_set_ops();                       
 50         return true;                              
 51 #else                                             
 52         return false;                             
 53 #endif                                            
 54 }                                                 
 55                                                   
 56 static const struct of_device_id vexpress_smp_    
 57         { .compatible = "arm,cortex-a5-scu", }    
 58         { .compatible = "arm,cortex-a9-scu", }    
 59         {}                                        
 60 };                                                
 61                                                   
 62 static void __init vexpress_smp_dt_prepare_cpu    
 63 {                                                 
 64         struct device_node *scu = of_find_matc    
 65                         vexpress_smp_dt_scu_ma    
 66                                                   
 67         if (scu)                                  
 68                 scu_enable(of_iomap(scu, 0));     
 69                                                   
 70         /*                                        
 71          * Write the address of secondary star    
 72          * system-wide flags register. The boo    
 73          * until it receives a soft interrupt,    
 74          * secondary CPU branches to this addr    
 75          */                                       
 76         vexpress_flags_set(__pa_symbol(versati    
 77 }                                                 
 78                                                   
 79 #ifdef CONFIG_HOTPLUG_CPU                         
 80 static void vexpress_cpu_die(unsigned int cpu)    
 81 {                                                 
 82         versatile_immitation_cpu_die(cpu, 0x40    
 83 }                                                 
 84 #endif                                            
 85                                                   
 86 const struct smp_operations vexpress_smp_dt_op    
 87         .smp_prepare_cpus       = vexpress_smp    
 88         .smp_secondary_init     = versatile_se    
 89         .smp_boot_secondary     = versatile_bo    
 90 #ifdef CONFIG_HOTPLUG_CPU                         
 91         .cpu_die                = vexpress_cpu    
 92 #endif                                            
 93 };                                                
 94                                                   

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php