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

TOMOYO Linux Cross Reference
Linux/arch/sparc/include/asm/upa.h

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/sparc/include/asm/upa.h (Architecture mips) and /arch/ppc/include/asm-ppc/upa.h (Architecture ppc)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 #ifndef _SPARC64_UPA_H                            
  3 #define _SPARC64_UPA_H                            
  4                                                   
  5 #include <asm/asi.h>                              
  6                                                   
  7 /* UPA level registers and defines. */            
  8                                                   
  9 /* UPA Config Register */                         
 10 #define UPA_CONFIG_RESV         0xffffffffc000    
 11 #define UPA_CONFIG_PCON         0x000000003fc0    
 12 #define UPA_CONFIG_MID          0x00000000003e    
 13 #define UPA_CONFIG_PCAP         0x000000000001    
 14                                                   
 15 /* UPA Port ID Register */                        
 16 #define UPA_PORTID_FNP          0xff0000000000    
 17 #define UPA_PORTID_RESV         0x00fffff80000    
 18 #define UPA_PORTID_ECCVALID     0x000000040000    
 19 #define UPA_PORTID_ONEREAD      0x000000020000    
 20 #define UPA_PORTID_PINTRDQ      0x000000018000    
 21 #define UPA_PORTID_PREQDQ       0x000000007e00    
 22 #define UPA_PORTID_PREQRD       0x0000000001e0    
 23 #define UPA_PORTID_UPACAP       0x00000000001f    
 24 #define UPA_PORTID_ID           0x000000000000    
 25                                                   
 26 /* UPA I/O space accessors */                     
 27 #if defined(__KERNEL__) && !defined(__ASSEMBLY    
 28 static inline unsigned char _upa_readb(unsigne    
 29 {                                                 
 30         unsigned char ret;                        
 31                                                   
 32         __asm__ __volatile__("lduba\t[%1] %2,     
 33                              : "=r" (ret)         
 34                              : "r" (addr), "i"    
 35                                                   
 36         return ret;                               
 37 }                                                 
 38                                                   
 39 static inline unsigned short _upa_readw(unsign    
 40 {                                                 
 41         unsigned short ret;                       
 42                                                   
 43         __asm__ __volatile__("lduha\t[%1] %2,     
 44                              : "=r" (ret)         
 45                              : "r" (addr), "i"    
 46                                                   
 47         return ret;                               
 48 }                                                 
 49                                                   
 50 static inline unsigned int _upa_readl(unsigned    
 51 {                                                 
 52         unsigned int ret;                         
 53                                                   
 54         __asm__ __volatile__("lduwa\t[%1] %2,     
 55                              : "=r" (ret)         
 56                              : "r" (addr), "i"    
 57                                                   
 58         return ret;                               
 59 }                                                 
 60                                                   
 61 static inline unsigned long _upa_readq(unsigne    
 62 {                                                 
 63         unsigned long ret;                        
 64                                                   
 65         __asm__ __volatile__("ldxa\t[%1] %2, %    
 66                              : "=r" (ret)         
 67                              : "r" (addr), "i"    
 68                                                   
 69         return ret;                               
 70 }                                                 
 71                                                   
 72 static inline void _upa_writeb(unsigned char b    
 73 {                                                 
 74         __asm__ __volatile__("stba\t%0, [%1] %    
 75                              : /* no outputs *    
 76                              : "r" (b), "r" (a    
 77 }                                                 
 78                                                   
 79 static inline void _upa_writew(unsigned short     
 80 {                                                 
 81         __asm__ __volatile__("stha\t%0, [%1] %    
 82                              : /* no outputs *    
 83                              : "r" (w), "r" (a    
 84 }                                                 
 85                                                   
 86 static inline void _upa_writel(unsigned int l,    
 87 {                                                 
 88         __asm__ __volatile__("stwa\t%0, [%1] %    
 89                              : /* no outputs *    
 90                              : "r" (l), "r" (a    
 91 }                                                 
 92                                                   
 93 static inline void _upa_writeq(unsigned long q    
 94 {                                                 
 95         __asm__ __volatile__("stxa\t%0, [%1] %    
 96                              : /* no outputs *    
 97                              : "r" (q), "r" (a    
 98 }                                                 
 99                                                   
100 #define upa_readb(__addr)               (_upa_    
101 #define upa_readw(__addr)               (_upa_    
102 #define upa_readl(__addr)               (_upa_    
103 #define upa_readq(__addr)               (_upa_    
104 #define upa_writeb(__b, __addr)         (_upa_    
105 #define upa_writew(__w, __addr)         (_upa_    
106 #define upa_writel(__l, __addr)         (_upa_    
107 #define upa_writeq(__q, __addr)         (_upa_    
108 #endif /* __KERNEL__ && !__ASSEMBLY__ */          
109                                                   
110 #endif /* !(_SPARC64_UPA_H) */                    
111                                                   

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