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

TOMOYO Linux Cross Reference
Linux/arch/x86/xen/smp_hvm.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/x86/xen/smp_hvm.c (Architecture i386) and /arch/sparc64/xen/smp_hvm.c (Architecture sparc64)


  1 // SPDX-License-Identifier: GPL-2.0                 1 
  2 #include <linux/thread_info.h>                    
  3 #include <asm/smp.h>                              
  4                                                   
  5 #include <xen/events.h>                           
  6                                                   
  7 #include "xen-ops.h"                              
  8                                                   
  9 static void __init xen_hvm_smp_prepare_boot_cp    
 10 {                                                 
 11         BUG_ON(smp_processor_id() != 0);          
 12         native_smp_prepare_boot_cpu();            
 13                                                   
 14         /*                                        
 15          * Setup vcpu_info for boot CPU. Secon    
 16          * in xen_cpu_up_prepare_hvm().           
 17          */                                       
 18         xen_vcpu_setup(0);                        
 19                                                   
 20         /*                                        
 21          * Called again in case the kernel boo    
 22          * Refer to comments in xen_hvm_init_t    
 23          */                                       
 24         xen_hvm_init_time_ops();                  
 25                                                   
 26         /*                                        
 27          * The alternative logic (which patche    
 28          * the smp bootup up code is activated    
 29          * the core kernel is being patched. O    
 30          * modules patched but not core code.     
 31          */                                       
 32         xen_init_spinlocks();                     
 33 }                                                 
 34                                                   
 35 static void __init xen_hvm_smp_prepare_cpus(un    
 36 {                                                 
 37         int cpu;                                  
 38                                                   
 39         native_smp_prepare_cpus(max_cpus);        
 40                                                   
 41         if (xen_have_vector_callback) {           
 42                 WARN_ON(xen_smp_intr_init(0));    
 43                 xen_init_lock_cpu(0);             
 44         }                                         
 45                                                   
 46         for_each_possible_cpu(cpu) {              
 47                 if (cpu == 0)                     
 48                         continue;                 
 49                                                   
 50                 /* Set default vcpu_id to make    
 51                 per_cpu(xen_vcpu_id, cpu) = XE    
 52         }                                         
 53 }                                                 
 54                                                   
 55 #ifdef CONFIG_HOTPLUG_CPU                         
 56 static void xen_hvm_cleanup_dead_cpu(unsigned     
 57 {                                                 
 58         if (xen_have_vector_callback) {           
 59                 xen_smp_intr_free(cpu);           
 60                 xen_uninit_lock_cpu(cpu);         
 61                 xen_teardown_timer(cpu);          
 62         }                                         
 63 }                                                 
 64 #else                                             
 65 static void xen_hvm_cleanup_dead_cpu(unsigned     
 66 {                                                 
 67         BUG();                                    
 68 }                                                 
 69 #endif                                            
 70                                                   
 71 void __init xen_hvm_smp_init(void)                
 72 {                                                 
 73         smp_ops.smp_prepare_boot_cpu = xen_hvm    
 74         smp_ops.smp_prepare_cpus = xen_hvm_smp    
 75         smp_ops.smp_cpus_done = xen_smp_cpus_d    
 76         smp_ops.cleanup_dead_cpu = xen_hvm_cle    
 77                                                   
 78         if (!xen_have_vector_callback) {          
 79 #ifdef CONFIG_PARAVIRT_SPINLOCKS                  
 80                 nopvspin = true;                  
 81 #endif                                            
 82                 return;                           
 83         }                                         
 84                                                   
 85         smp_ops.smp_send_reschedule = xen_smp_    
 86         smp_ops.send_call_func_ipi = xen_smp_s    
 87         smp_ops.send_call_func_single_ipi = xe    
 88 }                                                 
 89                                                   

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