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

TOMOYO Linux Cross Reference
Linux/arch/s390/kernel/machine_kexec_reloc.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/s390/kernel/machine_kexec_reloc.c (Architecture i386) and /arch/ppc/kernel/machine_kexec_reloc.c (Architecture ppc)


  1 // SPDX-License-Identifier: GPL-2.0                 1 
  2 #include <linux/elf.h>                            
  3 #include <asm/kexec.h>                            
  4                                                   
  5 int arch_kexec_do_relocs(int r_type, void *loc    
  6                          unsigned long addr)      
  7 {                                                 
  8         switch (r_type) {                         
  9         case R_390_NONE:                          
 10                 break;                            
 11         case R_390_8:           /* Direct 8 bi    
 12                 *(u8 *)loc = val;                 
 13                 break;                            
 14         case R_390_12:          /* Direct 12 b    
 15                 *(u16 *)loc &= 0xf000;            
 16                 *(u16 *)loc |= val & 0xfff;       
 17                 break;                            
 18         case R_390_16:          /* Direct 16 b    
 19                 *(u16 *)loc = val;                
 20                 break;                            
 21         case R_390_20:          /* Direct 20 b    
 22                 *(u32 *)loc &= 0xf00000ff;        
 23                 *(u32 *)loc |= (val & 0xfff) <    
 24                 *(u32 *)loc |= (val & 0xff000)    
 25                 break;                            
 26         case R_390_32:          /* Direct 32 b    
 27                 *(u32 *)loc = val;                
 28                 break;                            
 29         case R_390_64:          /* Direct 64 b    
 30         case R_390_GLOB_DAT:                      
 31         case R_390_JMP_SLOT:                      
 32                 *(u64 *)loc = val;                
 33                 break;                            
 34         case R_390_PC16:        /* PC relative    
 35                 *(u16 *)loc = (val - addr);       
 36                 break;                            
 37         case R_390_PC16DBL:     /* PC relative    
 38                 *(u16 *)loc = (val - addr) >>     
 39                 break;                            
 40         case R_390_PC32DBL:     /* PC relative    
 41                 *(u32 *)loc = (val - addr) >>     
 42                 break;                            
 43         case R_390_PC32:        /* PC relative    
 44                 *(u32 *)loc = (val - addr);       
 45                 break;                            
 46         case R_390_PC64:        /* PC relative    
 47                 *(u64 *)loc = (val - addr);       
 48                 break;                            
 49         case R_390_RELATIVE:                      
 50                 *(unsigned long *) loc = val;     
 51                 break;                            
 52         default:                                  
 53                 return 1;                         
 54         }                                         
 55         return 0;                                 
 56 }                                                 
 57                                                   

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