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

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/i8259.h

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/x86/include/asm/i8259.h (Architecture sparc) and /arch/alpha/include/asm-alpha/i8259.h (Architecture alpha)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 #ifndef _ASM_X86_I8259_H                          
  3 #define _ASM_X86_I8259_H                          
  4                                                   
  5 #include <linux/delay.h>                          
  6 #include <asm/io.h>                               
  7                                                   
  8 extern unsigned int cached_irq_mask;              
  9                                                   
 10 #define __byte(x, y)            (((unsigned ch    
 11 #define cached_master_mask      (__byte(0, cac    
 12 #define cached_slave_mask       (__byte(1, cac    
 13                                                   
 14 /* i8259A PIC registers */                        
 15 #define PIC_MASTER_CMD          0x20              
 16 #define PIC_MASTER_IMR          0x21              
 17 #define PIC_MASTER_ISR          PIC_MASTER_CMD    
 18 #define PIC_MASTER_POLL         PIC_MASTER_ISR    
 19 #define PIC_MASTER_OCW3         PIC_MASTER_ISR    
 20 #define PIC_SLAVE_CMD           0xa0              
 21 #define PIC_SLAVE_IMR           0xa1              
 22 #define PIC_ELCR1               0x4d0             
 23 #define PIC_ELCR2               0x4d1             
 24                                                   
 25 /* i8259A PIC related value */                    
 26 #define PIC_CASCADE_IR          2                 
 27 #define MASTER_ICW4_DEFAULT     0x01              
 28 #define SLAVE_ICW4_DEFAULT      0x01              
 29 #define PIC_ICW4_AEOI           2                 
 30                                                   
 31 extern raw_spinlock_t i8259A_lock;                
 32                                                   
 33 /* the PIC may need a careful delay on some pl    
 34 static inline unsigned char inb_pic(unsigned i    
 35 {                                                 
 36         unsigned char value = inb(port);          
 37                                                   
 38         /*                                        
 39          * delay for some accesses to PIC on m    
 40          * must be at least one microsecond, s    
 41          */                                       
 42         udelay(2);                                
 43                                                   
 44         return value;                             
 45 }                                                 
 46                                                   
 47 static inline void outb_pic(unsigned char valu    
 48 {                                                 
 49         outb(value, port);                        
 50         /*                                        
 51          * delay for some accesses to PIC on m    
 52          * must be at least one microsecond, s    
 53          */                                       
 54         udelay(2);                                
 55 }                                                 
 56                                                   
 57 extern struct irq_chip i8259A_chip;               
 58                                                   
 59 struct legacy_pic {                               
 60         int nr_legacy_irqs;                       
 61         struct irq_chip *chip;                    
 62         void (*mask)(unsigned int irq);           
 63         void (*unmask)(unsigned int irq);         
 64         void (*mask_all)(void);                   
 65         void (*restore_mask)(void);               
 66         void (*init)(int auto_eoi);               
 67         int (*probe)(void);                       
 68         int (*irq_pending)(unsigned int irq);     
 69         void (*make_irq)(unsigned int irq);       
 70 };                                                
 71                                                   
 72 void legacy_pic_pcat_compat(void);                
 73                                                   
 74 extern struct legacy_pic *legacy_pic;             
 75 extern struct legacy_pic null_legacy_pic;         
 76                                                   
 77 static inline bool has_legacy_pic(void)           
 78 {                                                 
 79         return legacy_pic != &null_legacy_pic;    
 80 }                                                 
 81                                                   
 82 static inline int nr_legacy_irqs(void)            
 83 {                                                 
 84         return legacy_pic->nr_legacy_irqs;        
 85 }                                                 
 86                                                   
 87 #endif /* _ASM_X86_I8259_H */                     
 88                                                   

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