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

TOMOYO Linux Cross Reference
Linux/arch/m68k/68000/ints.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/m68k/68000/ints.c (Version linux-6.12-rc7) and /arch/sparc64/68000/ints.c (Version linux-5.15.171)


  1 /*                                                  1 
  2  * ints.c - Generic interrupt controller suppo    
  3  *                                                
  4  * This file is subject to the terms and condi    
  5  * License.  See the file COPYING in the main     
  6  * for more details.                              
  7  *                                                
  8  * Copyright 1996 Roman Zippel                    
  9  * Copyright 1999 D. Jeff Dionne <jeff@rt-cont    
 10  */                                               
 11                                                   
 12 #include <linux/types.h>                          
 13 #include <linux/kernel.h>                         
 14 #include <linux/init.h>                           
 15 #include <linux/interrupt.h>                      
 16 #include <linux/irq.h>                            
 17 #include <linux/cpu.h>                            
 18 #include <asm/traps.h>                            
 19 #include <asm/io.h>                               
 20 #include <asm/machdep.h>                          
 21                                                   
 22 #if defined(CONFIG_M68EZ328)                      
 23 #include <asm/MC68EZ328.h>                        
 24 #elif defined(CONFIG_M68VZ328)                    
 25 #include <asm/MC68VZ328.h>                        
 26 #else                                             
 27 #include <asm/MC68328.h>                          
 28 #endif                                            
 29                                                   
 30 #include "ints.h"                                 
 31                                                   
 32 /* assembler routines */                          
 33 asmlinkage void system_call(void);                
 34 asmlinkage void buserr(void);                     
 35 asmlinkage void trap(void);                       
 36 asmlinkage void trap3(void);                      
 37 asmlinkage void trap4(void);                      
 38 asmlinkage void trap5(void);                      
 39 asmlinkage void trap6(void);                      
 40 asmlinkage void trap7(void);                      
 41 asmlinkage void trap8(void);                      
 42 asmlinkage void trap9(void);                      
 43 asmlinkage void trap10(void);                     
 44 asmlinkage void trap11(void);                     
 45 asmlinkage void trap12(void);                     
 46 asmlinkage void trap13(void);                     
 47 asmlinkage void trap14(void);                     
 48 asmlinkage void trap15(void);                     
 49 asmlinkage void trap33(void);                     
 50 asmlinkage void trap34(void);                     
 51 asmlinkage void trap35(void);                     
 52 asmlinkage void trap36(void);                     
 53 asmlinkage void trap37(void);                     
 54 asmlinkage void trap38(void);                     
 55 asmlinkage void trap39(void);                     
 56 asmlinkage void trap40(void);                     
 57 asmlinkage void trap41(void);                     
 58 asmlinkage void trap42(void);                     
 59 asmlinkage void trap43(void);                     
 60 asmlinkage void trap44(void);                     
 61 asmlinkage void trap45(void);                     
 62 asmlinkage void trap46(void);                     
 63 asmlinkage void trap47(void);                     
 64 asmlinkage irqreturn_t bad_interrupt(int, void    
 65 asmlinkage irqreturn_t inthandler(void);          
 66 asmlinkage irqreturn_t inthandler1(void);         
 67 asmlinkage irqreturn_t inthandler2(void);         
 68 asmlinkage irqreturn_t inthandler3(void);         
 69 asmlinkage irqreturn_t inthandler4(void);         
 70 asmlinkage irqreturn_t inthandler5(void);         
 71 asmlinkage irqreturn_t inthandler6(void);         
 72 asmlinkage irqreturn_t inthandler7(void);         
 73                                                   
 74 /* The 68k family did not have a good way to d    
 75  * of interrupts until later in the family.  T    
 76  * not provide the vector number on the stack,    
 77  * into one vector and look in the blasted mas    
 78  * This code is designed to be fast, almost co    
 79  */                                               
 80 asmlinkage void process_int(int vec, struct pt    
 81 {                                                 
 82         int irq;                                  
 83         int mask;                                 
 84                                                   
 85         unsigned long pend = ISR;                 
 86                                                   
 87         while (pend) {                            
 88                 if (pend & 0x0000ffff) {          
 89                         if (pend & 0x000000ff)    
 90                                 if (pend & 0x0    
 91                                         mask =    
 92                                         irq =     
 93                                 } else {          
 94                                         mask =    
 95                                         irq =     
 96                                 }                 
 97                         } else {                  
 98                                 if (pend & 0x0    
 99                                         mask =    
100                                         irq =     
101                                 } else {          
102                                         mask =    
103                                         irq =     
104                                 }                 
105                         }                         
106                 } else {                          
107                         if (pend & 0x00ff0000)    
108                                 if (pend & 0x0    
109                                         mask =    
110                                         irq =     
111                                 } else {          
112                                         mask =    
113                                         irq =     
114                                 }                 
115                         } else {                  
116                                 if (pend & 0x0    
117                                         mask =    
118                                         irq =     
119                                 } else {          
120                                         mask =    
121                                         irq =     
122                                 }                 
123                         }                         
124                 }                                 
125                                                   
126                 while (! (mask & pend)) {         
127                         mask <<=1;                
128                         irq++;                    
129                 }                                 
130                                                   
131                 do_IRQ(irq, fp);                  
132                 pend &= ~mask;                    
133         }                                         
134 }                                                 
135                                                   
136 static void intc_irq_unmask(struct irq_data *d    
137 {                                                 
138         IMR &= ~(1 << d->irq);                    
139 }                                                 
140                                                   
141 static void intc_irq_mask(struct irq_data *d)     
142 {                                                 
143         IMR |= (1 << d->irq);                     
144 }                                                 
145                                                   
146 static struct irq_chip intc_irq_chip = {          
147         .name           = "M68K-INTC",            
148         .irq_mask       = intc_irq_mask,          
149         .irq_unmask     = intc_irq_unmask,        
150 };                                                
151                                                   
152 /*                                                
153  * This function should be called during kerne    
154  * the machine vector table.                      
155  */                                               
156 void __init trap_init(void)                       
157 {                                                 
158         int i;                                    
159                                                   
160         /* set up the vectors */                  
161         for (i = 72; i < 256; ++i)                
162                 _ramvec[i] = (e_vector) bad_in    
163                                                   
164         _ramvec[32] = system_call;                
165                                                   
166         _ramvec[65] = (e_vector) inthandler1;     
167         _ramvec[66] = (e_vector) inthandler2;     
168         _ramvec[67] = (e_vector) inthandler3;     
169         _ramvec[68] = (e_vector) inthandler4;     
170         _ramvec[69] = (e_vector) inthandler5;     
171         _ramvec[70] = (e_vector) inthandler6;     
172         _ramvec[71] = (e_vector) inthandler7;     
173 }                                                 
174                                                   
175 void __init init_IRQ(void)                        
176 {                                                 
177         int i;                                    
178                                                   
179         IVR = 0x40; /* Set DragonBall IVR (int    
180                                                   
181         /* turn off all interrupts */             
182         IMR = ~0;                                 
183                                                   
184         for (i = 0; (i < NR_IRQS); i++) {         
185                 irq_set_chip(i, &intc_irq_chip    
186                 irq_set_handler(i, handle_leve    
187         }                                         
188 }                                                 
189                                                   
190                                                   

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