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

TOMOYO Linux Cross Reference
Linux/arch/alpha/kernel/err_ev7.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/alpha/kernel/err_ev7.c (Architecture sparc64) and /arch/m68k/kernel/err_ev7.c (Architecture m68k)


  1 // SPDX-License-Identifier: GPL-2.0                 1 
  2 /*                                                
  3  *      linux/arch/alpha/kernel/err_ev7.c         
  4  *                                                
  5  *      Copyright (C) 2000 Jeff Wiedemeier (Co    
  6  *                                                
  7  *      Error handling code supporting Alpha s    
  8  */                                               
  9                                                   
 10 #include <linux/init.h>                           
 11 #include <linux/sched.h>                          
 12                                                   
 13 #include <asm/io.h>                               
 14 #include <asm/hwrpb.h>                            
 15 #include <asm/smp.h>                              
 16 #include <asm/err_common.h>                       
 17 #include <asm/err_ev7.h>                          
 18                                                   
 19 #include "err_impl.h"                             
 20 #include "proto.h"                                
 21                                                   
 22 struct ev7_lf_subpackets *                        
 23 ev7_collect_logout_frame_subpackets(struct el_    
 24                                     struct ev7    
 25 {                                                 
 26         struct el_subpacket *subpacket;           
 27         int i;                                    
 28                                                   
 29         /*                                        
 30          * A Marvel machine check frame is alw    
 31          * el_subpacket of class HEADER, type     
 32          */                                       
 33         if (el_ptr->class != EL_CLASS__HEADER     
 34             el_ptr->type != EL_TYPE__HEADER__L    
 35                 return NULL;                      
 36                                                   
 37         /*                                        
 38          * It is a logout frame header. Look a    
 39          */                                       
 40         el_ptr = (struct el_subpacket *)          
 41                 ((unsigned long)el_ptr + el_pt    
 42                                                   
 43         /*                                        
 44          * It has to be class PAL, type LOGOUT    
 45          */                                       
 46         if (el_ptr->class != EL_CLASS__PAL ||     
 47             el_ptr->type != EL_TYPE__PAL__LOGO    
 48                 return NULL;                      
 49                                                   
 50         lf_subpackets->logout = (struct ev7_pa    
 51                 el_ptr->by_type.raw.data_start    
 52                                                   
 53         /*                                        
 54          * Process the subpackets.                
 55          */                                       
 56         subpacket = (struct el_subpacket *)       
 57                 ((unsigned long)el_ptr + el_pt    
 58         for (i = 0;                               
 59              subpacket && i < lf_subpackets->l    
 60              subpacket = (struct el_subpacket     
 61                      ((unsigned long)subpacket    
 62                 /*                                
 63                  * All subpackets should be cl    
 64                  */                               
 65                 if (subpacket->class != EL_CLA    
 66                         printk("%s**UNEXPECTED    
 67                                "IN LOGOUT FRAM    
 68                                err_print_prefi    
 69                         return NULL;              
 70                 }                                 
 71                                                   
 72                 /*                                
 73                  * Remember the subpacket.        
 74                  */                               
 75                 switch(subpacket->type) {         
 76                 case EL_TYPE__PAL__EV7_PROCESS    
 77                         lf_subpackets->ev7 =      
 78                                 (struct ev7_pa    
 79                                 subpacket->by_    
 80                         break;                    
 81                                                   
 82                 case EL_TYPE__PAL__EV7_RBOX:      
 83                         lf_subpackets->rbox =     
 84                                 subpacket->by_    
 85                         break;                    
 86                                                   
 87                 case EL_TYPE__PAL__EV7_ZBOX:      
 88                         lf_subpackets->zbox =     
 89                                 subpacket->by_    
 90                         break;                    
 91                                                   
 92                 case EL_TYPE__PAL__EV7_IO:        
 93                         lf_subpackets->io = (s    
 94                                 subpacket->by_    
 95                         break;                    
 96                                                   
 97                 case EL_TYPE__PAL__ENV__AMBIEN    
 98                 case EL_TYPE__PAL__ENV__AIRMOV    
 99                 case EL_TYPE__PAL__ENV__VOLTAG    
100                 case EL_TYPE__PAL__ENV__INTRUS    
101                 case EL_TYPE__PAL__ENV__POWER_    
102                 case EL_TYPE__PAL__ENV__LAN:      
103                 case EL_TYPE__PAL__ENV__HOT_PL    
104                         lf_subpackets->env[ev7    
105                                 (struct ev7_pa    
106                                 subpacket->by_    
107                         break;                    
108                                                   
109                 default:                          
110                         /*                        
111                          * Don't know what kin    
112                          */                       
113                         return NULL;              
114                 }                                 
115         }                                         
116                                                   
117         return lf_subpackets;                     
118 }                                                 
119                                                   
120 void                                              
121 ev7_machine_check(unsigned long vector, unsign    
122 {                                                 
123         struct el_subpacket *el_ptr = (struct     
124         char *saved_err_prefix = err_print_pre    
125                                                   
126         /*                                        
127          * Sync the processor                     
128          */                                       
129         mb();                                     
130         draina();                                 
131                                                   
132         err_print_prefix = KERN_CRIT;             
133         printk("%s*CPU %s Error (Vector 0x%x)     
134                err_print_prefix,                  
135                (vector == SCB_Q_PROCERR) ? "Co    
136                (unsigned int)vector, (int)smp_    
137         el_process_subpacket(el_ptr);             
138         err_print_prefix = saved_err_prefix;      
139                                                   
140         /*                                        
141          * Release the logout frame               
142          */                                       
143         wrmces(0x7);                              
144         mb();                                     
145 }                                                 
146                                                   
147 static char *el_ev7_processor_subpacket_annota    
148         "Subpacket Header",     "I_STAT",         
149         "C_ADDR",               "C_SYNDROME_1"    
150         "C_STAT",               "C_STS",          
151         "EXC_ADDR",             "IER_CM",         
152         "PAL_BASE",             "I_CTL",          
153         "CBOX_CTL",             "CBOX_STP_CTL"    
154         "CBOX_LCL_SET",         "CBOX_GLB_SET"    
155         "BBOX_ERR_STS",         "BBOX_ERR_IDX"    
156         "BBOX_DAT_RMP",         NULL              
157 };                                                
158                                                   
159 static char *el_ev7_zbox_subpacket_annotation[    
160         "Subpacket Header",                       
161         "ZBOX(0): DRAM_ERR_STATUS_2 / DRAM_ERR    
162         "ZBOX(0): DRAM_ERROR_CTL    / DRAM_ERR    
163         "ZBOX(0): DIFT_TIMEOUT      / DRAM_ERR    
164         "ZBOX(0): FRC_ERR_ADR       / DRAM_MAP    
165         "ZBOX(0): reserved          / DIFT_ERR    
166         "ZBOX(1): DRAM_ERR_STATUS_2 / DRAM_ERR    
167         "ZBOX(1): DRAM_ERROR_CTL    / DRAM_ERR    
168         "ZBOX(1): DIFT_TIMEOUT      / DRAM_ERR    
169         "ZBOX(1): FRC_ERR_ADR       / DRAM_MAP    
170         "ZBOX(1): reserved          / DIFT_ERR    
171         "CBOX_CTL",             "CBOX_STP_CTL"    
172         "ZBOX(0)_ERROR_PA",     "ZBOX(1)_ERROR    
173         "ZBOX(0)_ORED_SYNDROME","ZBOX(1)_ORED_    
174         NULL                                      
175 };                                                
176                                                   
177 static char *el_ev7_rbox_subpacket_annotation[    
178         "Subpacket Header",     "RBOX_CFG",       
179         "RBOX_S_CFG",           "RBOX_E_CFG",     
180         "RBOX_N_ERR",           "RBOX_S_ERR",     
181         "RBOX_W_ERR",           "RBOX_IO_CFG",    
182         "RBOX_L_ERR",           "RBOX_WHOAMI",    
183         "RBOX_INTQ",            "RBOX_INT",       
184 };                                                
185                                                   
186 static char *el_ev7_io_subpacket_annotation[]     
187         "Subpacket Header",     "IO_ASIC_REV",    
188         "IO7_UPH",              "HPI_CTL",        
189         "HEI_CTL",              "PO7_ERROR_SUM    
190         "PO7_CRRCT_SYM",        "PO7_UGBGE_SYM    
191         "PO7_ERR_PKT1",         "reserved",       
192         "PO0_ERR_SUM",          "PO0_TLB_ERR",    
193         "PO0_TRANS_SUM",        "PO0_FIRST_ERR    
194         "DM CSR PH",            "DM CSR PH",      
195         "DM CSR PH",            "reserved",       
196         "PO1_ERR_SUM",          "PO1_TLB_ERR",    
197         "PO1_TRANS_SUM",        "PO1_FIRST_ERR    
198         "DM CSR PH",            "DM CSR PH",      
199         "DM CSR PH",            "reserved",       
200         "PO2_ERR_SUM",          "PO2_TLB_ERR",    
201         "PO2_TRANS_SUM",        "PO2_FIRST_ERR    
202         "DM CSR PH",            "DM CSR PH",      
203         "DM CSR PH",            "reserved",       
204         "PO3_ERR_SUM",          "PO3_TLB_ERR",    
205         "PO3_TRANS_SUM",        "PO3_FIRST_ERR    
206         "DM CSR PH",            "DM CSR PH",      
207         "DM CSR PH",            "reserved",       
208         NULL                                      
209 };                                                
210                                                   
211 static struct el_subpacket_annotation el_ev7_p    
212         SUBPACKET_ANNOTATION(EL_CLASS__PAL,       
213                              EL_TYPE__PAL__EV7    
214                              1,                   
215                              "EV7 Processor Su    
216                              el_ev7_processor_    
217         SUBPACKET_ANNOTATION(EL_CLASS__PAL,       
218                              EL_TYPE__PAL__EV7    
219                              1,                   
220                              "EV7 ZBOX Subpack    
221                              el_ev7_zbox_subpa    
222         SUBPACKET_ANNOTATION(EL_CLASS__PAL,       
223                              EL_TYPE__PAL__EV7    
224                              1,                   
225                              "EV7 RBOX Subpack    
226                              el_ev7_rbox_subpa    
227         SUBPACKET_ANNOTATION(EL_CLASS__PAL,       
228                              EL_TYPE__PAL__EV7    
229                              1,                   
230                              "EV7 IO Subpacket    
231                              el_ev7_io_subpack    
232 };                                                
233                                                   
234 static struct el_subpacket *                      
235 ev7_process_pal_subpacket(struct el_subpacket     
236 {                                                 
237         struct ev7_pal_subpacket *packet;         
238                                                   
239         if (header->class != EL_CLASS__PAL) {     
240                 printk("%s  ** Unexpected head    
241                        err_print_prefix,          
242                        header->class, header->    
243                 return NULL;                      
244         }                                         
245                                                   
246         packet = (struct ev7_pal_subpacket *)h    
247                                                   
248         switch(header->type) {                    
249         case EL_TYPE__PAL__LOGOUT_FRAME:          
250                 printk("%s*** MCHK occurred on    
251                        err_print_prefix,          
252                        packet->by_type.logout.    
253                        packet->by_type.logout.    
254                 el_print_timestamp(&packet->by    
255                 printk("%s  EXC_ADDR: %016llx\    
256                          "  HALT_CODE: %llx\n"    
257                        err_print_prefix,          
258                        packet->by_type.logout.    
259                        packet->by_type.logout.    
260                 el_process_subpackets(header,     
261                                       packet->    
262                 break;                            
263         default:                                  
264                 printk("%s  ** PAL TYPE %d SUB    
265                        err_print_prefix,          
266                        header->type);             
267                 el_annotate_subpacket(header);    
268                 break;                            
269         }                                         
270                                                   
271         return (struct el_subpacket *)((unsign    
272 }                                                 
273                                                   
274 struct el_subpacket_handler ev7_pal_subpacket_    
275         SUBPACKET_HANDLER_INIT(EL_CLASS__PAL,     
276                                                   
277 void __init                                       
278 ev7_register_error_handlers(void)                 
279 {                                                 
280         int i;                                    
281                                                   
282         for (i = 0; i < ARRAY_SIZE(el_ev7_pal_    
283                 cdl_register_subpacket_annotat    
284                                                   
285         cdl_register_subpacket_handler(&ev7_pa    
286 }                                                 
287                                                   
288                                                   

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