From e4af58b88eeb6cb8444d949a3ef61e9f4d5bf9b3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 9 Sep 2025 16:01:56 +0200 Subject: [PATCH] arch: aarch64: fdt: reduce log verbosity This module warns for a lot of routine things that the user cannot do anything about. Closes: https://github.com/cloud-hypervisor/cloud-hypervisor/issues/7220 Signed-off-by: Alyssa Ross --- arch/src/aarch64/fdt.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/arch/src/aarch64/fdt.rs b/arch/src/aarch64/fdt.rs index 1669f980b..e6b972227 100644 --- a/arch/src/aarch64/fdt.rs +++ b/arch/src/aarch64/fdt.rs @@ -110,11 +110,8 @@ pub fn get_cache_size(cache_level: CacheLevel) -> u32 { let file_path = Path::new(&file_directory); if !file_path.exists() { - warn!("File: {} does not exist.", file_directory); 0 } else { - info!("File: {} exist.", file_directory); - let src = fs::read_to_string(file_directory).expect("File not exists or file corrupted."); // The content of the file is as simple as a size, like: "32K" let src = src.trim(); @@ -144,11 +141,8 @@ pub fn get_cache_coherency_line_size(cache_level: CacheLevel) -> u32 { let file_path = Path::new(&file_directory); if !file_path.exists() { - warn!("File: {} does not exist.", file_directory); 0 } else { - info!("File: {} exist.", file_directory); - let src = fs::read_to_string(file_directory).expect("File not exists or file corrupted."); src.trim().parse::().unwrap() } @@ -167,11 +161,8 @@ pub fn get_cache_number_of_sets(cache_level: CacheLevel) -> u32 { let file_path = Path::new(&file_directory); if !file_path.exists() { - warn!("File: {} does not exist.", file_directory); 0 } else { - info!("File: {} exist.", file_directory); - let src = fs::read_to_string(file_directory).expect("File not exists or file corrupted."); src.trim().parse::().unwrap() } @@ -195,11 +186,8 @@ pub fn get_cache_shared(cache_level: CacheLevel) -> bool { let file_path = Path::new(&file_directory); if !file_path.exists() { - warn!("File: {} does not exist.", file_directory); result = false; } else { - info!("File: {} exist.", file_directory); - let src = fs::read_to_string(file_directory).expect("File not exists or file corrupted."); let src = src.trim(); if src.is_empty() { @@ -325,7 +313,6 @@ fn create_cpu_nodes( if !cache_exist { warn!("cache sysfs system does not exist."); } else { - info!("cache sysfs system exists."); // L1 Data Cache Info. l1_d_cache_size = get_cache_size(CacheLevel::L1D); l1_d_cache_line_size = get_cache_coherency_line_size(CacheLevel::L1D); @@ -426,9 +413,6 @@ fn create_cpu_nodes( fdt.end_node(l2_cache_node)?; } - if l2_cache_size != 0 && l2_cache_shared { - warn!("L2 cache shared with other cpus"); - } } fdt.end_node(cpu_node)?;