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

TOMOYO Linux Cross Reference
Linux/arch/x86/mm/iomap_32.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/x86/mm/iomap_32.c (Architecture ppc) and /arch/sparc/mm/iomap_32.c (Architecture sparc)


  1 // SPDX-License-Identifier: GPL-2.0-or-later        1 
  2 /*                                                
  3  * Copyright © 2008 Ingo Molnar                  
  4  */                                               
  5                                                   
  6 #include <asm/iomap.h>                            
  7 #include <asm/memtype.h>                          
  8 #include <linux/export.h>                         
  9 #include <linux/highmem.h>                        
 10                                                   
 11 static int is_io_mapping_possible(resource_siz    
 12 {                                                 
 13 #if !defined(CONFIG_X86_PAE) && defined(CONFIG    
 14         /* There is no way to map greater than    
 15         if (base + size > 0x100000000ULL)         
 16                 return 0;                         
 17 #endif                                            
 18         return 1;                                 
 19 }                                                 
 20                                                   
 21 int iomap_create_wc(resource_size_t base, unsi    
 22 {                                                 
 23         enum page_cache_mode pcm = _PAGE_CACHE    
 24         int ret;                                  
 25                                                   
 26         if (!is_io_mapping_possible(base, size    
 27                 return -EINVAL;                   
 28                                                   
 29         ret = memtype_reserve_io(base, base +     
 30         if (ret)                                  
 31                 return ret;                       
 32                                                   
 33         *prot = __pgprot(__PAGE_KERNEL | cache    
 34         /* Filter out unsupported __PAGE_KERNE    
 35         pgprot_val(*prot) &= __default_kernel_    
 36                                                   
 37         return 0;                                 
 38 }                                                 
 39 EXPORT_SYMBOL_GPL(iomap_create_wc);               
 40                                                   
 41 void iomap_free(resource_size_t base, unsigned    
 42 {                                                 
 43         memtype_free_io(base, base + size);       
 44 }                                                 
 45 EXPORT_SYMBOL_GPL(iomap_free);                    
 46                                                   
 47 void __iomem *__iomap_local_pfn_prot(unsigned     
 48 {                                                 
 49         /*                                        
 50          * For non-PAT systems, translate non-    
 51          * case the caller set the PWT bit to     
 52          * pgprot_writecombine(). UC- translat    
 53          * is UC or WC. UC- gets the real inte    
 54          * "WC if the MTRR is WC, UC if you ca    
 55          */                                       
 56         if (!pat_enabled() && pgprot2cachemode    
 57                 prot = __pgprot(__PAGE_KERNEL     
 58                                 cachemode2prot    
 59                                                   
 60         /* Filter out unsupported __PAGE_KERNE    
 61         pgprot_val(prot) &= __default_kernel_p    
 62                                                   
 63         return (void __force __iomem *)__kmap_    
 64 }                                                 
 65 EXPORT_SYMBOL_GPL(__iomap_local_pfn_prot);        
 66                                                   

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