summaryrefslogtreecommitdiff
path: root/Kernel/Storage
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-19 21:29:46 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-19 21:42:18 +0100
commit2b2828ae525d22858f303f288df69e8235d3486f (patch)
treeed2b50b39f080df29c07a54f06a356b1be345635 /Kernel/Storage
parente920c74cae13faac1ce2db6d921a5bbbcab39335 (diff)
downloadserenity-2b2828ae525d22858f303f288df69e8235d3486f.zip
Kernel: Slap UNMAP_AFTER_INIT on a bunch more functions
We're now able to unmap 100 KiB of kernel text after init. :^)
Diffstat (limited to 'Kernel/Storage')
-rw-r--r--Kernel/Storage/PATADiskDevice.cpp6
-rw-r--r--Kernel/Storage/StorageManagement.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/Storage/PATADiskDevice.cpp b/Kernel/Storage/PATADiskDevice.cpp
index 559c05944b..d246793107 100644
--- a/Kernel/Storage/PATADiskDevice.cpp
+++ b/Kernel/Storage/PATADiskDevice.cpp
@@ -33,12 +33,12 @@
namespace Kernel {
-NonnullRefPtr<PATADiskDevice> PATADiskDevice::create(const IDEController& controller, IDEChannel& channel, DriveType type, InterfaceType interface_type, u16 cylinders, u16 heads, u16 spt, u16 capabilities, int major, int minor)
+UNMAP_AFTER_INIT NonnullRefPtr<PATADiskDevice> PATADiskDevice::create(const IDEController& controller, IDEChannel& channel, DriveType type, InterfaceType interface_type, u16 cylinders, u16 heads, u16 spt, u16 capabilities, int major, int minor)
{
return adopt(*new PATADiskDevice(controller, channel, type, interface_type, cylinders, heads, spt, capabilities, major, minor));
}
-PATADiskDevice::PATADiskDevice(const IDEController& controller, IDEChannel& channel, DriveType type, InterfaceType interface_type, u16 cylinders, u16 heads, u16 spt, u16 capabilities, int major, int minor)
+UNMAP_AFTER_INIT PATADiskDevice::PATADiskDevice(const IDEController& controller, IDEChannel& channel, DriveType type, InterfaceType interface_type, u16 cylinders, u16 heads, u16 spt, u16 capabilities, int major, int minor)
: StorageDevice(controller, major, minor, 512, 0)
, m_cylinders(cylinders)
, m_heads(heads)
@@ -50,7 +50,7 @@ PATADiskDevice::PATADiskDevice(const IDEController& controller, IDEChannel& chan
{
}
-PATADiskDevice::~PATADiskDevice()
+UNMAP_AFTER_INIT PATADiskDevice::~PATADiskDevice()
{
}
diff --git a/Kernel/Storage/StorageManagement.cpp b/Kernel/Storage/StorageManagement.cpp
index 1d68b0da82..2584a6938f 100644
--- a/Kernel/Storage/StorageManagement.cpp
+++ b/Kernel/Storage/StorageManagement.cpp
@@ -41,7 +41,7 @@ namespace Kernel {
static StorageManagement* s_the;
-StorageManagement::StorageManagement(String boot_argument, bool force_pio)
+UNMAP_AFTER_INIT StorageManagement::StorageManagement(String boot_argument, bool force_pio)
: m_boot_argument(boot_argument)
, m_controllers(enumerate_controllers(force_pio))
, m_storage_devices(enumerate_storage_devices())
@@ -195,7 +195,7 @@ bool StorageManagement::initialized()
return (s_the != nullptr);
}
-void StorageManagement::initialize(String root_device, bool force_pio)
+UNMAP_AFTER_INIT void StorageManagement::initialize(String root_device, bool force_pio)
{
ASSERT(!StorageManagement::initialized());
s_the = new StorageManagement(root_device, force_pio);