18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _ASM_X86_SWIOTLB_H 38c2ecf20Sopenharmony_ci#define _ASM_X86_SWIOTLB_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/swiotlb.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifdef CONFIG_SWIOTLB 88c2ecf20Sopenharmony_ciextern int swiotlb; 98c2ecf20Sopenharmony_ciextern int __init pci_swiotlb_detect_override(void); 108c2ecf20Sopenharmony_ciextern int __init pci_swiotlb_detect_4gb(void); 118c2ecf20Sopenharmony_ciextern void __init pci_swiotlb_init(void); 128c2ecf20Sopenharmony_ciextern void __init pci_swiotlb_late_init(void); 138c2ecf20Sopenharmony_ci#else 148c2ecf20Sopenharmony_ci#define swiotlb 0 158c2ecf20Sopenharmony_cistatic inline int pci_swiotlb_detect_override(void) 168c2ecf20Sopenharmony_ci{ 178c2ecf20Sopenharmony_ci return 0; 188c2ecf20Sopenharmony_ci} 198c2ecf20Sopenharmony_cistatic inline int pci_swiotlb_detect_4gb(void) 208c2ecf20Sopenharmony_ci{ 218c2ecf20Sopenharmony_ci return 0; 228c2ecf20Sopenharmony_ci} 238c2ecf20Sopenharmony_cistatic inline void pci_swiotlb_init(void) 248c2ecf20Sopenharmony_ci{ 258c2ecf20Sopenharmony_ci} 268c2ecf20Sopenharmony_cistatic inline void pci_swiotlb_late_init(void) 278c2ecf20Sopenharmony_ci{ 288c2ecf20Sopenharmony_ci} 298c2ecf20Sopenharmony_ci#endif 308c2ecf20Sopenharmony_ci#endif /* _ASM_X86_SWIOTLB_H */ 31