summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2021-08-13 05:21:19 +0300
committerGunnar Beutner <gunnar@beutner.name>2021-08-13 08:06:47 +0200
commit18eb262157823531ad78974273ebae1842da1347 (patch)
tree39ace84dd2bff1d92d7f28115fb105a46a5bc83f
parentf641cc6470628cfd34b3300e342e1538784fb7ad (diff)
downloadserenity-18eb262157823531ad78974273ebae1842da1347.zip
Kernel: Move VirtIO code into the Bus source folder
The VirtIO code handles functionality related to the VirtIO bus, so it really should be in the Bus folder.
-rw-r--r--Kernel/Bus/VirtIO/VirtIO.cpp (renamed from Kernel/VirtIO/VirtIO.cpp)6
-rw-r--r--Kernel/Bus/VirtIO/VirtIO.h (renamed from Kernel/VirtIO/VirtIO.h)2
-rw-r--r--Kernel/Bus/VirtIO/VirtIOConsole.cpp (renamed from Kernel/VirtIO/VirtIOConsole.cpp)2
-rw-r--r--Kernel/Bus/VirtIO/VirtIOConsole.h (renamed from Kernel/VirtIO/VirtIOConsole.h)4
-rw-r--r--Kernel/Bus/VirtIO/VirtIOConsolePort.cpp (renamed from Kernel/VirtIO/VirtIOConsolePort.cpp)4
-rw-r--r--Kernel/Bus/VirtIO/VirtIOConsolePort.h (renamed from Kernel/VirtIO/VirtIOConsolePort.h)2
-rw-r--r--Kernel/Bus/VirtIO/VirtIOQueue.cpp (renamed from Kernel/VirtIO/VirtIOQueue.cpp)2
-rw-r--r--Kernel/Bus/VirtIO/VirtIOQueue.h (renamed from Kernel/VirtIO/VirtIOQueue.h)0
-rw-r--r--Kernel/Bus/VirtIO/VirtIORNG.cpp (renamed from Kernel/VirtIO/VirtIORNG.cpp)2
-rw-r--r--Kernel/Bus/VirtIO/VirtIORNG.h (renamed from Kernel/VirtIO/VirtIORNG.h)2
-rw-r--r--Kernel/CMakeLists.txt10
-rw-r--r--Kernel/Graphics/VirtIOGPU/FrameBufferDevice.h4
-rw-r--r--Kernel/Graphics/VirtIOGPU/GPU.h4
-rw-r--r--Kernel/init.cpp2
14 files changed, 23 insertions, 23 deletions
diff --git a/Kernel/VirtIO/VirtIO.cpp b/Kernel/Bus/VirtIO/VirtIO.cpp
index 93e813e61d..5743b308b5 100644
--- a/Kernel/VirtIO/VirtIO.cpp
+++ b/Kernel/Bus/VirtIO/VirtIO.cpp
@@ -5,11 +5,11 @@
*/
#include <Kernel/Bus/PCI/IDs.h>
+#include <Kernel/Bus/VirtIO/VirtIO.h>
+#include <Kernel/Bus/VirtIO/VirtIOConsole.h>
+#include <Kernel/Bus/VirtIO/VirtIORNG.h>
#include <Kernel/CommandLine.h>
#include <Kernel/Sections.h>
-#include <Kernel/VirtIO/VirtIO.h>
-#include <Kernel/VirtIO/VirtIOConsole.h>
-#include <Kernel/VirtIO/VirtIORNG.h>
namespace Kernel {
diff --git a/Kernel/VirtIO/VirtIO.h b/Kernel/Bus/VirtIO/VirtIO.h
index 8d15c6820c..b83b7358f5 100644
--- a/Kernel/VirtIO/VirtIO.h
+++ b/Kernel/Bus/VirtIO/VirtIO.h
@@ -9,10 +9,10 @@
#include <AK/NonnullOwnPtrVector.h>
#include <Kernel/Bus/PCI/Access.h>
#include <Kernel/Bus/PCI/Device.h>
+#include <Kernel/Bus/VirtIO/VirtIOQueue.h>
#include <Kernel/IO.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/VirtIO/VirtIOQueue.h>
namespace Kernel {
diff --git a/Kernel/VirtIO/VirtIOConsole.cpp b/Kernel/Bus/VirtIO/VirtIOConsole.cpp
index 2bf1eef65e..73195af64e 100644
--- a/Kernel/VirtIO/VirtIOConsole.cpp
+++ b/Kernel/Bus/VirtIO/VirtIOConsole.cpp
@@ -5,8 +5,8 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <Kernel/Bus/VirtIO/VirtIOConsole.h>
#include <Kernel/Sections.h>
-#include <Kernel/VirtIO/VirtIOConsole.h>
namespace Kernel {
diff --git a/Kernel/VirtIO/VirtIOConsole.h b/Kernel/Bus/VirtIO/VirtIOConsole.h
index e22c69372b..f1fb2c15b9 100644
--- a/Kernel/VirtIO/VirtIOConsole.h
+++ b/Kernel/Bus/VirtIO/VirtIOConsole.h
@@ -7,9 +7,9 @@
#pragma once
+#include <Kernel/Bus/VirtIO/VirtIO.h>
+#include <Kernel/Bus/VirtIO/VirtIOConsolePort.h>
#include <Kernel/Memory/RingBuffer.h>
-#include <Kernel/VirtIO/VirtIO.h>
-#include <Kernel/VirtIO/VirtIOConsolePort.h>
namespace Kernel {
class VirtIOConsole
diff --git a/Kernel/VirtIO/VirtIOConsolePort.cpp b/Kernel/Bus/VirtIO/VirtIOConsolePort.cpp
index 791d3ae845..571d0c95f4 100644
--- a/Kernel/VirtIO/VirtIOConsolePort.cpp
+++ b/Kernel/Bus/VirtIO/VirtIOConsolePort.cpp
@@ -5,8 +5,8 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/VirtIO/VirtIOConsole.h>
-#include <Kernel/VirtIO/VirtIOConsolePort.h>
+#include <Kernel/Bus/VirtIO/VirtIOConsole.h>
+#include <Kernel/Bus/VirtIO/VirtIOConsolePort.h>
namespace Kernel {
diff --git a/Kernel/VirtIO/VirtIOConsolePort.h b/Kernel/Bus/VirtIO/VirtIOConsolePort.h
index c866d3eafd..3f863d144c 100644
--- a/Kernel/VirtIO/VirtIOConsolePort.h
+++ b/Kernel/Bus/VirtIO/VirtIOConsolePort.h
@@ -7,10 +7,10 @@
#pragma once
+#include <Kernel/Bus/VirtIO/VirtIO.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Memory/RingBuffer.h>
-#include <Kernel/VirtIO/VirtIO.h>
namespace Kernel {
diff --git a/Kernel/VirtIO/VirtIOQueue.cpp b/Kernel/Bus/VirtIO/VirtIOQueue.cpp
index 9cad608e47..499059e8dc 100644
--- a/Kernel/VirtIO/VirtIOQueue.cpp
+++ b/Kernel/Bus/VirtIO/VirtIOQueue.cpp
@@ -5,7 +5,7 @@
*/
#include <AK/Atomic.h>
-#include <Kernel/VirtIO/VirtIOQueue.h>
+#include <Kernel/Bus/VirtIO/VirtIOQueue.h>
namespace Kernel {
diff --git a/Kernel/VirtIO/VirtIOQueue.h b/Kernel/Bus/VirtIO/VirtIOQueue.h
index 233f8ce0e2..233f8ce0e2 100644
--- a/Kernel/VirtIO/VirtIOQueue.h
+++ b/Kernel/Bus/VirtIO/VirtIOQueue.h
diff --git a/Kernel/VirtIO/VirtIORNG.cpp b/Kernel/Bus/VirtIO/VirtIORNG.cpp
index c3fbf889d6..302a054790 100644
--- a/Kernel/VirtIO/VirtIORNG.cpp
+++ b/Kernel/Bus/VirtIO/VirtIORNG.cpp
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <Kernel/Bus/VirtIO/VirtIORNG.h>
#include <Kernel/Sections.h>
-#include <Kernel/VirtIO/VirtIORNG.h>
namespace Kernel {
diff --git a/Kernel/VirtIO/VirtIORNG.h b/Kernel/Bus/VirtIO/VirtIORNG.h
index 8a4cd93148..12a2223a68 100644
--- a/Kernel/VirtIO/VirtIORNG.h
+++ b/Kernel/Bus/VirtIO/VirtIORNG.h
@@ -6,9 +6,9 @@
#pragma once
+#include <Kernel/Bus/VirtIO/VirtIO.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/Random.h>
-#include <Kernel/VirtIO/VirtIO.h>
namespace Kernel {
diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt
index b0b12804f9..2d0f3b53c3 100644
--- a/Kernel/CMakeLists.txt
+++ b/Kernel/CMakeLists.txt
@@ -37,6 +37,11 @@ set(KERNEL_SOURCES
Bus/USB/USBManagement.cpp
Bus/USB/USBPipe.cpp
Bus/USB/USBTransfer.cpp
+ Bus/VirtIO/VirtIO.cpp
+ Bus/VirtIO/VirtIOConsole.cpp
+ Bus/VirtIO/VirtIOConsolePort.cpp
+ Bus/VirtIO/VirtIOQueue.cpp
+ Bus/VirtIO/VirtIORNG.cpp
CMOS.cpp
CommandLine.cpp
ConsoleDevice.cpp
@@ -270,11 +275,6 @@ set(KERNEL_SOURCES
TimerQueue.cpp
UBSanitizer.cpp
UserOrKernelBuffer.cpp
- VirtIO/VirtIO.cpp
- VirtIO/VirtIOConsole.cpp
- VirtIO/VirtIOConsolePort.cpp
- VirtIO/VirtIOQueue.cpp
- VirtIO/VirtIORNG.cpp
WaitQueue.cpp
WorkQueue.cpp
init.cpp
diff --git a/Kernel/Graphics/VirtIOGPU/FrameBufferDevice.h b/Kernel/Graphics/VirtIOGPU/FrameBufferDevice.h
index f972a65c6b..f0a2b81231 100644
--- a/Kernel/Graphics/VirtIOGPU/FrameBufferDevice.h
+++ b/Kernel/Graphics/VirtIOGPU/FrameBufferDevice.h
@@ -6,10 +6,10 @@
#pragma once
+#include <Kernel/Bus/VirtIO/VirtIO.h>
+#include <Kernel/Bus/VirtIO/VirtIOQueue.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/Graphics/VirtIOGPU/GPU.h>
-#include <Kernel/VirtIO/VirtIO.h>
-#include <Kernel/VirtIO/VirtIOQueue.h>
namespace Kernel::Graphics::VirtIOGPU {
diff --git a/Kernel/Graphics/VirtIOGPU/GPU.h b/Kernel/Graphics/VirtIOGPU/GPU.h
index 11a55adc67..81d576b804 100644
--- a/Kernel/Graphics/VirtIOGPU/GPU.h
+++ b/Kernel/Graphics/VirtIOGPU/GPU.h
@@ -8,10 +8,10 @@
#include <AK/BinaryBufferWriter.h>
#include <AK/DistinctNumeric.h>
+#include <Kernel/Bus/VirtIO/VirtIO.h>
+#include <Kernel/Bus/VirtIO/VirtIOQueue.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/Graphics/VirtIOGPU/Protocol.h>
-#include <Kernel/VirtIO/VirtIO.h>
-#include <Kernel/VirtIO/VirtIOQueue.h>
#define VIRTIO_GPU_F_VIRGL (1 << 0)
#define VIRTIO_GPU_F_EDID (1 << 1)
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index b0a5b96927..65d737c73e 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -14,6 +14,7 @@
#include <Kernel/Bus/PCI/Access.h>
#include <Kernel/Bus/PCI/Initializer.h>
#include <Kernel/Bus/USB/USBManagement.h>
+#include <Kernel/Bus/VirtIO/VirtIO.h>
#include <Kernel/CMOS.h>
#include <Kernel/CommandLine.h>
#include <Kernel/Devices/FullDevice.h>
@@ -56,7 +57,6 @@
#include <Kernel/Tasks/FinalizerTask.h>
#include <Kernel/Tasks/SyncTask.h>
#include <Kernel/Time/TimeManagement.h>
-#include <Kernel/VirtIO/VirtIO.h>
#include <Kernel/WorkQueue.h>
#include <Kernel/kstdio.h>