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

TOMOYO Linux Cross Reference
Linux/arch/s390/boot/als.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/s390/boot/als.c (Architecture m68k) and /arch/sparc64/boot/als.c (Architecture sparc64)


  1 // SPDX-License-Identifier: GPL-2.0                 1 
  2 /*                                                
  3  *    Copyright IBM Corp. 2016                    
  4  */                                               
  5 #include <linux/kernel.h>                         
  6 #include <asm/processor.h>                        
  7 #include <asm/facility.h>                         
  8 #include <asm/lowcore.h>                          
  9 #include <asm/sclp.h>                             
 10 #include "boot.h"                                 
 11                                                   
 12 static unsigned long als[] = { FACILITIES_ALS     
 13                                                   
 14 static void u16_to_decimal(char *str, u16 val)    
 15 {                                                 
 16         int div = 1;                              
 17                                                   
 18         while (div * 10 <= val)                   
 19                 div *= 10;                        
 20         while (div) {                             
 21                 *str++ = '' + val / div;          
 22                 val %= div;                       
 23                 div /= 10;                        
 24         }                                         
 25         *str = '\0';                              
 26 }                                                 
 27                                                   
 28 void print_missing_facilities(void)               
 29 {                                                 
 30         static char als_str[80] = "Missing fac    
 31         unsigned long val;                        
 32         char val_str[6];                          
 33         int i, j, first;                          
 34                                                   
 35         first = 1;                                
 36         for (i = 0; i < ARRAY_SIZE(als); i++)     
 37                 val = ~stfle_fac_list[i] & als    
 38                 for (j = 0; j < BITS_PER_LONG;    
 39                         if (!(val & (1UL << (B    
 40                                 continue;         
 41                         if (!first)               
 42                                 strcat(als_str    
 43                         /*                        
 44                          * Make sure we stay w    
 45                          * each facility bit a    
 46                          * z/VM adds a four ch    
 47                          */                       
 48                         if (strlen(als_str) >     
 49                                 boot_printk("%    
 50                                 *als_str = '\0    
 51                         }                         
 52                         u16_to_decimal(val_str    
 53                         strcat(als_str, val_st    
 54                         first = 0;                
 55                 }                                 
 56         }                                         
 57         boot_printk("%s\n", als_str);             
 58 }                                                 
 59                                                   
 60 static void facility_mismatch(void)               
 61 {                                                 
 62         struct cpuid id;                          
 63                                                   
 64         get_cpu_id(&id);                          
 65         boot_printk("The Linux kernel requires    
 66         boot_printk("Detected machine-type num    
 67         print_missing_facilities();               
 68         boot_printk("See Principles of Operati    
 69         disabled_wait();                          
 70 }                                                 
 71                                                   
 72 void verify_facilities(void)                      
 73 {                                                 
 74         int i;                                    
 75                                                   
 76         __stfle(stfle_fac_list, ARRAY_SIZE(stf    
 77         for (i = 0; i < ARRAY_SIZE(als); i++)     
 78                 if ((stfle_fac_list[i] & als[i    
 79                         facility_mismatch();      
 80         }                                         
 81 }                                                 
 82                                                   

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