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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-mvebu/platsmp-a9.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-mvebu/platsmp-a9.c (Version linux-6.12-rc7) and /arch/sparc/mach-mvebu/platsmp-a9.c (Version linux-6.4.16)


  1 // SPDX-License-Identifier: GPL-2.0-only            1 
  2 /*                                                
  3  * Symmetric Multi Processing (SMP) support fo    
  4  * based SOCs (Armada 375/38x).                   
  5  *                                                
  6  * Copyright (C) 2014 Marvell                     
  7  *                                                
  8  * Gregory CLEMENT <gregory.clement@free-elect    
  9  * Thomas Petazzoni <thomas.petazzoni@free-ele    
 10  */                                               
 11                                                   
 12 #include <linux/init.h>                           
 13 #include <linux/io.h>                             
 14 #include <linux/of.h>                             
 15 #include <linux/smp.h>                            
 16 #include <linux/mbus.h>                           
 17 #include <asm/smp_scu.h>                          
 18 #include <asm/smp_plat.h>                         
 19 #include "common.h"                               
 20 #include "pmsu.h"                                 
 21                                                   
 22 extern void mvebu_cortex_a9_secondary_startup(    
 23                                                   
 24 static int mvebu_cortex_a9_boot_secondary(unsi    
 25                                                   
 26 {                                                 
 27         int ret, hw_cpu;                          
 28                                                   
 29         pr_info("Booting CPU %d\n", cpu);         
 30                                                   
 31         /*                                        
 32          * Write the address of secondary star    
 33          * flags register. The boot monitor wa    
 34          * soft interrupt, and then the second    
 35          * address.                               
 36          */                                       
 37         hw_cpu = cpu_logical_map(cpu);            
 38         if (of_machine_is_compatible("marvell,    
 39                 mvebu_system_controller_set_cp    
 40         else                                      
 41                 mvebu_pmsu_set_cpu_boot_addr(h    
 42         smp_wmb();                                
 43                                                   
 44         /*                                        
 45          * Doing this before deasserting the C    
 46          * in the offline state after using CP    
 47          */                                       
 48         arch_send_wakeup_ipi_mask(cpumask_of(c    
 49                                                   
 50         ret = mvebu_cpu_reset_deassert(hw_cpu)    
 51         if (ret) {                                
 52                 pr_err("Could not start the se    
 53                 return ret;                       
 54         }                                         
 55                                                   
 56         return 0;                                 
 57 }                                                 
 58 /*                                                
 59  * When a CPU is brought back online, either t    
 60  * because of the boot of a kexec'ed kernel, t    
 61  * for this CPU might be in the deep idle stat    
 62  * from receiving interrupts. Here, we therefo    
 63  * CPU from this state, which was entered by a    
 64  * below.                                         
 65  */                                               
 66 static void armada_38x_secondary_init(unsigned    
 67 {                                                 
 68         mvebu_v7_pmsu_idle_exit();                
 69 }                                                 
 70                                                   
 71 #ifdef CONFIG_HOTPLUG_CPU                         
 72 static void armada_38x_cpu_die(unsigned int cp    
 73 {                                                 
 74         /*                                        
 75          * CPU hotplug is implemented by putti    
 76          * deep idle sleep state.                 
 77          */                                       
 78         armada_38x_do_cpu_suspend(true);          
 79 }                                                 
 80                                                   
 81 /*                                                
 82  * We need a dummy function, so that platform_    
 83  * we support CPU hotplug. However, the functi    
 84  * anything, because CPUs going offline can en    
 85  * by themselves, without any help from a stil    
 86  */                                               
 87 static int armada_38x_cpu_kill(unsigned int cp    
 88 {                                                 
 89         return 1;                                 
 90 }                                                 
 91 #endif                                            
 92                                                   
 93 static const struct smp_operations mvebu_corte    
 94         .smp_boot_secondary     = mvebu_cortex    
 95 };                                                
 96                                                   
 97 static const struct smp_operations armada_38x_    
 98         .smp_boot_secondary     = mvebu_cortex    
 99         .smp_secondary_init     = armada_38x_s    
100 #ifdef CONFIG_HOTPLUG_CPU                         
101         .cpu_die                = armada_38x_c    
102         .cpu_kill               = armada_38x_c    
103 #endif                                            
104 };                                                
105                                                   
106 CPU_METHOD_OF_DECLARE(mvebu_armada_375_smp, "m    
107                       &mvebu_cortex_a9_smp_ops    
108 CPU_METHOD_OF_DECLARE(mvebu_armada_380_smp, "m    
109                       &armada_38x_smp_ops);       
110 CPU_METHOD_OF_DECLARE(mvebu_armada_390_smp, "m    
111                       &armada_38x_smp_ops);       
112                                                   

~ [ 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