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

TOMOYO Linux Cross Reference
Linux/arch/microblaze/kernel/cpu/mb.c

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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/microblaze/kernel/cpu/mb.c (Architecture alpha) and /arch/sparc/kernel/cpu/mb.c (Architecture sparc)


  1 /*                                                  1 
  2  * CPU-version specific code                      
  3  *                                                
  4  * Copyright (C) 2007-2009 Michal Simek <monst    
  5  * Copyright (C) 2006-2009 PetaLogix              
  6  *                                                
  7  * This file is subject to the terms and condi    
  8  * License. See the file "COPYING" in the main    
  9  * for more details.                              
 10  */                                               
 11                                                   
 12 #include <linux/init.h>                           
 13 #include <linux/string.h>                         
 14 #include <linux/seq_file.h>                       
 15 #include <linux/cpu.h>                            
 16 #include <linux/initrd.h>                         
 17                                                   
 18 #include <linux/bug.h>                            
 19 #include <asm/cpuinfo.h>                          
 20 #include <linux/delay.h>                          
 21 #include <linux/io.h>                             
 22 #include <asm/page.h>                             
 23 #include <linux/param.h>                          
 24 #include <asm/pvr.h>                              
 25 #include <asm/sections.h>                         
 26 #include <asm/setup.h>                            
 27                                                   
 28 static int show_cpuinfo(struct seq_file *m, vo    
 29 {                                                 
 30         char *fpga_family = "Unknown";            
 31         char *cpu_ver = "Unknown";                
 32         int i;                                    
 33                                                   
 34         /* Denormalised to get the fpga family    
 35         for (i = 0; family_string_lookup[i].s     
 36                 if (cpuinfo.fpga_family_code =    
 37                         fpga_family = (char *)    
 38                         break;                    
 39                 }                                 
 40         }                                         
 41                                                   
 42         /* Denormalised to get the hw version     
 43         for (i = 0; cpu_ver_lookup[i].s != NUL    
 44                 if (cpuinfo.ver_code == cpu_ve    
 45                         cpu_ver = (char *)cpu_    
 46                         break;                    
 47                 }                                 
 48         }                                         
 49                                                   
 50         seq_printf(m,                             
 51                    "CPU-Family: MicroBlaze\n"     
 52                    "FPGA-Arch:  %s\n"             
 53                    "CPU-Ver:    %s, %s endian\    
 54                    "CPU-MHz:    %d.%02d\n"        
 55                    "BogoMips:   %lu.%02lu\n",     
 56                    fpga_family,                   
 57                    cpu_ver,                       
 58                    cpuinfo.endian ? "little" :    
 59                    cpuinfo.cpu_clock_freq / 10    
 60                    cpuinfo.cpu_clock_freq % 10    
 61                    loops_per_jiffy / (500000 /    
 62                    (loops_per_jiffy / (5000 /     
 63                                                   
 64         seq_printf(m,                             
 65                    "HW:\n Shift:\t\t%s\n"         
 66                    " MSR:\t\t%s\n"                
 67                    " PCMP:\t\t%s\n"               
 68                    " DIV:\t\t%s\n",               
 69                    (cpuinfo.use_instr & PVR0_U    
 70                    (cpuinfo.use_instr & PVR2_U    
 71                    (cpuinfo.use_instr & PVR2_U    
 72                    (cpuinfo.use_instr & PVR0_U    
 73                                                   
 74         seq_printf(m, " MMU:\t\t%x\n", cpuinfo    
 75                                                   
 76         seq_printf(m,                             
 77                    " MUL:\t\t%s\n"                
 78                    " FPU:\t\t%s\n",               
 79                    (cpuinfo.use_mult & PVR2_US    
 80                    (cpuinfo.use_mult & PVR0_US    
 81                    (cpuinfo.use_fpu & PVR2_USE    
 82                    (cpuinfo.use_fpu & PVR0_USE    
 83                                                   
 84         seq_printf(m,                             
 85                    " Exc:\t\t%s%s%s%s%s%s%s%s\    
 86                    (cpuinfo.use_exc & PVR2_OPC    
 87                    (cpuinfo.use_exc & PVR2_UNA    
 88                    (cpuinfo.use_exc & PVR2_ILL    
 89                    (cpuinfo.use_exc & PVR2_IOP    
 90                    (cpuinfo.use_exc & PVR2_DOP    
 91                    (cpuinfo.use_exc & PVR2_DIV    
 92                    (cpuinfo.use_exc & PVR2_FPU    
 93                    (cpuinfo.use_exc & PVR2_USE    
 94                                                   
 95         seq_printf(m,                             
 96                    "Stream-insns:\t%sprivilege    
 97                    cpuinfo.mmu_privins ? "un"     
 98                                                   
 99         if (cpuinfo.use_icache)                   
100                 seq_printf(m,                     
101                            "Icache:\t\t%ukB\tl    
102                            cpuinfo.icache_size    
103                            cpuinfo.icache_line    
104         else                                      
105                 seq_puts(m, "Icache:\t\tno\n")    
106                                                   
107         if (cpuinfo.use_dcache) {                 
108                 seq_printf(m,                     
109                            "Dcache:\t\t%ukB\tl    
110                            cpuinfo.dcache_size    
111                            cpuinfo.dcache_line    
112                 seq_puts(m, "Dcache-Policy:\t"    
113                 if (cpuinfo.dcache_wb)            
114                         seq_puts(m, "write-bac    
115                 else                              
116                         seq_puts(m, "write-thr    
117         } else {                                  
118                 seq_puts(m, "Dcache:\t\tno\n")    
119         }                                         
120                                                   
121         seq_printf(m,                             
122                    "HW-Debug:\t%s\n",             
123                    cpuinfo.hw_debug ? "yes" :     
124                                                   
125         seq_printf(m,                             
126                    "PVR-USR1:\t%02x\n"            
127                    "PVR-USR2:\t%08x\n",           
128                    cpuinfo.pvr_user1,             
129                    cpuinfo.pvr_user2);            
130                                                   
131         seq_printf(m, "Page size:\t%lu\n", PAG    
132                                                   
133         return 0;                                 
134 }                                                 
135                                                   
136 static void *c_start(struct seq_file *m, loff_    
137 {                                                 
138         int i = *pos;                             
139                                                   
140         return i < NR_CPUS ? (void *) (i + 1)     
141 }                                                 
142                                                   
143 static void *c_next(struct seq_file *m, void *    
144 {                                                 
145         ++*pos;                                   
146         return c_start(m, pos);                   
147 }                                                 
148                                                   
149 static void c_stop(struct seq_file *m, void *v    
150 {                                                 
151 }                                                 
152                                                   
153 const struct seq_operations cpuinfo_op = {        
154         .start = c_start,                         
155         .next = c_next,                           
156         .stop = c_stop,                           
157         .show = show_cpuinfo,                     
158 };                                                
159                                                   

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