Commit | Line | Data |
---|---|---|
577d5cd7 TG |
1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | #ifndef _ASM_X86_IOBITMAP_H | |
3 | #define _ASM_X86_IOBITMAP_H | |
4 | ||
4804e382 | 5 | #include <linux/refcount.h> |
577d5cd7 TG |
6 | #include <asm/processor.h> |
7 | ||
8 | struct io_bitmap { | |
060aa16f | 9 | u64 sequence; |
4804e382 | 10 | refcount_t refcnt; |
577d5cd7 TG |
11 | /* The maximum number of bytes to copy so all zero bits are covered */ |
12 | unsigned int max; | |
13 | unsigned long bitmap[IO_BITMAP_LONGS]; | |
14 | }; | |
15 | ||
4804e382 TG |
16 | struct task_struct; |
17 | ||
111e7b15 | 18 | #ifdef CONFIG_X86_IOPL_IOPERM |
4804e382 | 19 | void io_bitmap_share(struct task_struct *tsk); |
ea5f1cd7 TG |
20 | void io_bitmap_exit(void); |
21 | ||
22fe5b04 | 22 | void tss_update_io_bitmap(void); |
111e7b15 TG |
23 | #else |
24 | static inline void io_bitmap_share(struct task_struct *tsk) { } | |
25 | static inline void io_bitmap_exit(void) { } | |
26 | static inline void tss_update_io_bitmap(void) { } | |
27 | #endif | |
22fe5b04 | 28 | |
577d5cd7 | 29 | #endif |