函数源码 |
Source File:lib\ioremap.c |
Create Date:2022-07-27 07:13:06 |
首页 | Copyright©Brick |
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | #endif #endif /* _LINUX_IO_H */ #include <linux/export.h> #include <asm/cacheflush.h> #include <asm/pgtable.h> #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP static int __read_mostly ioremap_p4d_capable; static int __read_mostly ioremap_pud_capable; static int __read_mostly ioremap_pmd_capable; static int __read_mostly ioremap_huge_disabled; static int __init set_nohugeiomap( char *str) { ioremap_huge_disabled = 1; return 0; } early_param( "nohugeiomap" , set_nohugeiomap); void __init ioremap_huge_init( void ) { if (!ioremap_huge_disabled) { if (arch_ioremap_p4d_supported()) ioremap_p4d_capable = 1; if (arch_ioremap_pud_supported()) ioremap_pud_capable = 1; if (arch_ioremap_pmd_supported()) ioremap_pmd_capable = 1; } } static inline int ioremap_p4d_enabled( void ) { return ioremap_p4d_capable; } static inline int ioremap_pud_enabled( void ) { return ioremap_pud_capable; } static inline int ioremap_pmd_enabled( void ) { return ioremap_pmd_capable; } #else /* !CONFIG_HAVE_ARCH_HUGE_VMAP */ static inline int ioremap_p4d_enabled( void ) { return 0; } |