2019-11-12 06:03:21 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _ASM_X86_IOBITMAP_H
|
|
|
|
#define _ASM_X86_IOBITMAP_H
|
|
|
|
|
2019-11-12 06:03:25 +08:00
|
|
|
#include <linux/refcount.h>
|
2019-11-12 06:03:21 +08:00
|
|
|
#include <asm/processor.h>
|
|
|
|
|
|
|
|
struct io_bitmap {
|
2019-11-12 06:03:22 +08:00
|
|
|
u64 sequence;
|
2019-11-12 06:03:25 +08:00
|
|
|
refcount_t refcnt;
|
2019-11-12 06:03:21 +08:00
|
|
|
/* The maximum number of bytes to copy so all zero bits are covered */
|
|
|
|
unsigned int max;
|
|
|
|
unsigned long bitmap[IO_BITMAP_LONGS];
|
|
|
|
};
|
|
|
|
|
2019-11-12 06:03:25 +08:00
|
|
|
struct task_struct;
|
|
|
|
|
2019-11-13 04:40:33 +08:00
|
|
|
#ifdef CONFIG_X86_IOPL_IOPERM
|
2019-11-12 06:03:25 +08:00
|
|
|
void io_bitmap_share(struct task_struct *tsk);
|
2019-11-12 06:03:24 +08:00
|
|
|
void io_bitmap_exit(void);
|
|
|
|
|
2019-11-12 06:03:23 +08:00
|
|
|
void tss_update_io_bitmap(void);
|
2019-11-13 04:40:33 +08:00
|
|
|
#else
|
|
|
|
static inline void io_bitmap_share(struct task_struct *tsk) { }
|
|
|
|
static inline void io_bitmap_exit(void) { }
|
|
|
|
static inline void tss_update_io_bitmap(void) { }
|
|
|
|
#endif
|
2019-11-12 06:03:23 +08:00
|
|
|
|
2019-11-12 06:03:21 +08:00
|
|
|
#endif
|