aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/io_bitmap.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-11-11 23:03:21 +0100
committerThomas Gleixner <tglx@linutronix.de>2019-11-16 11:24:02 +0100
commit577d5cd7e5851d3832066cd0422475fa7db2ee17 (patch)
tree1de44238f0b2b0db2cb4778fc374f73cb8fe69f2 /arch/x86/include/asm/io_bitmap.h
parentx86/tss: Move I/O bitmap data into a seperate struct (diff)
downloadlinux-dev-577d5cd7e5851d3832066cd0422475fa7db2ee17.tar.xz
linux-dev-577d5cd7e5851d3832066cd0422475fa7db2ee17.zip
x86/ioperm: Move iobitmap data into a struct
No point in having all the data in thread_struct, especially as upcoming changes add more. Make the bitmap in the new struct accessible as array of longs and as array of characters via a union, so both the bitmap functions and the update logic can avoid type casts. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/include/asm/io_bitmap.h')
-rw-r--r--arch/x86/include/asm/io_bitmap.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/include/asm/io_bitmap.h b/arch/x86/include/asm/io_bitmap.h
new file mode 100644
index 000000000000..1a12b9ff5e4e
--- /dev/null
+++ b/arch/x86/include/asm/io_bitmap.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_IOBITMAP_H
+#define _ASM_X86_IOBITMAP_H
+
+#include <asm/processor.h>
+
+struct io_bitmap {
+ /* The maximum number of bytes to copy so all zero bits are covered */
+ unsigned int max;
+ unsigned long bitmap[IO_BITMAP_LONGS];
+};
+
+#endif