Kernel: Mark more of the kernel initialization as UNMAP_AFTER_INIT

This commit is contained in:
Brian Gianforcaro 2021-03-03 00:54:36 -08:00 committed by Andreas Kling
parent 84a399de5d
commit 0f424afd5a
Notes: sideshowbarker 2024-07-18 21:45:25 +09:00
2 changed files with 8 additions and 8 deletions

View file

@ -59,7 +59,7 @@ bool StorageManagement::boot_argument_contains_partition_uuid()
return m_boot_argument.starts_with("PARTUUID=");
}
NonnullRefPtrVector<StorageController> StorageManagement::enumerate_controllers(bool force_pio) const
UNMAP_AFTER_INIT NonnullRefPtrVector<StorageController> StorageManagement::enumerate_controllers(bool force_pio) const
{
NonnullRefPtrVector<StorageController> controllers;
if (kernel_command_line().is_ide_enabled()) {
@ -73,7 +73,7 @@ NonnullRefPtrVector<StorageController> StorageManagement::enumerate_controllers(
return controllers;
}
NonnullRefPtrVector<StorageDevice> StorageManagement::enumerate_storage_devices() const
UNMAP_AFTER_INIT NonnullRefPtrVector<StorageDevice> StorageManagement::enumerate_storage_devices() const
{
VERIFY(!m_controllers.is_empty());
NonnullRefPtrVector<StorageDevice> devices;
@ -88,7 +88,7 @@ NonnullRefPtrVector<StorageDevice> StorageManagement::enumerate_storage_devices(
return devices;
}
OwnPtr<PartitionTable> StorageManagement::try_to_initialize_partition_table(const StorageDevice& device) const
UNMAP_AFTER_INIT OwnPtr<PartitionTable> StorageManagement::try_to_initialize_partition_table(const StorageDevice& device) const
{
auto mbr_table_or_result = MBRPartitionTable::try_to_initialize(device);
if (!mbr_table_or_result.is_error())
@ -108,7 +108,7 @@ OwnPtr<PartitionTable> StorageManagement::try_to_initialize_partition_table(cons
return {};
}
NonnullRefPtrVector<DiskPartition> StorageManagement::enumerate_disk_partitions() const
UNMAP_AFTER_INIT NonnullRefPtrVector<DiskPartition> StorageManagement::enumerate_disk_partitions() const
{
VERIFY(!m_storage_devices.is_empty());
NonnullRefPtrVector<DiskPartition> partitions;
@ -131,7 +131,7 @@ NonnullRefPtrVector<DiskPartition> StorageManagement::enumerate_disk_partitions(
return partitions;
}
void StorageManagement::determine_boot_device()
UNMAP_AFTER_INIT void StorageManagement::determine_boot_device()
{
VERIFY(!m_controllers.is_empty());
if (m_boot_argument.starts_with("/dev/")) {
@ -151,7 +151,7 @@ void StorageManagement::determine_boot_device()
}
}
void StorageManagement::determine_boot_device_with_partition_uuid()
UNMAP_AFTER_INIT void StorageManagement::determine_boot_device_with_partition_uuid()
{
VERIFY(!m_disk_partitions.is_empty());
VERIFY(m_boot_argument.starts_with("PARTUUID="));

View file

@ -219,7 +219,7 @@ Time TimeManagement::now()
return s_the.ptr()->epoch_time();
}
Vector<HardwareTimerBase*> TimeManagement::scan_and_initialize_periodic_timers()
UNMAP_AFTER_INIT Vector<HardwareTimerBase*> TimeManagement::scan_and_initialize_periodic_timers()
{
bool should_enable = is_hpet_periodic_mode_allowed();
dbgln("Time: Scanning for periodic timers");
@ -234,7 +234,7 @@ Vector<HardwareTimerBase*> TimeManagement::scan_and_initialize_periodic_timers()
return timers;
}
Vector<HardwareTimerBase*> TimeManagement::scan_for_non_periodic_timers()
UNMAP_AFTER_INIT Vector<HardwareTimerBase*> TimeManagement::scan_for_non_periodic_timers()
{
dbgln("Time: Scanning for non-periodic timers");
Vector<HardwareTimerBase*> timers;