1577d5cd7SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0 */ 2577d5cd7SThomas Gleixner #ifndef _ASM_X86_IOBITMAP_H 3577d5cd7SThomas Gleixner #define _ASM_X86_IOBITMAP_H 4577d5cd7SThomas Gleixner 54804e382SThomas Gleixner #include <linux/refcount.h> 6577d5cd7SThomas Gleixner #include <asm/processor.h> 7577d5cd7SThomas Gleixner 8577d5cd7SThomas Gleixner struct io_bitmap { 9060aa16fSThomas Gleixner u64 sequence; 104804e382SThomas Gleixner refcount_t refcnt; 11577d5cd7SThomas Gleixner /* The maximum number of bytes to copy so all zero bits are covered */ 12577d5cd7SThomas Gleixner unsigned int max; 13577d5cd7SThomas Gleixner unsigned long bitmap[IO_BITMAP_LONGS]; 14577d5cd7SThomas Gleixner }; 15577d5cd7SThomas Gleixner 164804e382SThomas Gleixner struct task_struct; 174804e382SThomas Gleixner 18*111e7b15SThomas Gleixner #ifdef CONFIG_X86_IOPL_IOPERM 194804e382SThomas Gleixner void io_bitmap_share(struct task_struct *tsk); 20ea5f1cd7SThomas Gleixner void io_bitmap_exit(void); 21ea5f1cd7SThomas Gleixner 2222fe5b04SThomas Gleixner void tss_update_io_bitmap(void); 23*111e7b15SThomas Gleixner #else 24*111e7b15SThomas Gleixner static inline void io_bitmap_share(struct task_struct *tsk) { } 25*111e7b15SThomas Gleixner static inline void io_bitmap_exit(void) { } 26*111e7b15SThomas Gleixner static inline void tss_update_io_bitmap(void) { } 27*111e7b15SThomas Gleixner #endif 2822fe5b04SThomas Gleixner 29577d5cd7SThomas Gleixner #endif 30