Browse Source

ipi: rename `send_ipi_many` to `send_ipi`

luojia65 2 years ago
parent
commit
dff1b66727
4 changed files with 7 additions and 6 deletions
  1. 1 0
      CHANGELOG.md
  2. 2 2
      src/ecall/mod.rs
  3. 1 1
      src/ecall/spi.rs
  4. 3 3
      src/ipi.rs

+ 1 - 0
CHANGELOG.md

@@ -17,6 +17,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 - Probe function now returns if legacy extensions are available
 - Update to `riscv` crate 0.9.0, sbi-spec crate version 0.0.3
+- Rename `send_ipi_many` to `send_ipi`
 
 ### Removed
 

+ 2 - 2
src/ecall/mod.rs

@@ -17,7 +17,7 @@ mod pmu;
 
 #[cfg(feature = "legacy")]
 use crate::{
-    ipi::send_ipi_many, legacy_stdio_getchar, legacy_stdio_putchar, reset::legacy_reset, HartMask,
+    ipi::send_ipi, legacy_stdio_getchar, legacy_stdio_putchar, reset::legacy_reset, HartMask,
 };
 use sbi_spec::{self as spec, binary::SbiRet};
 
@@ -113,7 +113,7 @@ pub fn handle_ecall(extension: usize, function: usize, param: [usize; 6]) -> Sbi
         },
         #[cfg(feature = "legacy")]
         spec::legacy::LEGACY_SEND_IPI => {
-            send_ipi_many(unsafe { HartMask::legacy_from_addr(param[0]) });
+            send_ipi(unsafe { HartMask::legacy_from_addr(param[0]) });
             SbiRet {
                 error: param[0],
                 value: param[1],

+ 1 - 1
src/ecall/spi.rs

@@ -6,7 +6,7 @@ pub(super) fn handle_ecall(function: usize, param0: usize, param1: usize) -> Sbi
     use crate::ipi::*;
     use sbi_spec::spi::*;
     match function {
-        SEND_IPI => send_ipi_many(HartMask::from_mask_base(param0, param1)),
+        SEND_IPI => send_ipi(HartMask::from_mask_base(param0, param1)),
         _ => SbiRet::not_supported(),
     }
 }

+ 3 - 3
src/ipi.rs

@@ -10,7 +10,7 @@ pub trait Ipi: Send + Sync {
     /// # Return value
     ///
     /// Should return error code `SBI_SUCCESS` if IPI was sent to all the targeted harts successfully.
-    fn send_ipi_many(&self, hart_mask: HartMask) -> SbiRet;
+    fn send_ipi(&self, hart_mask: HartMask) -> SbiRet;
 }
 
 static IPI: AmoOnceRef<dyn Ipi> = AmoOnceRef::new();
@@ -27,9 +27,9 @@ pub(crate) fn probe_ipi() -> bool {
     IPI.get().is_some()
 }
 
-pub(crate) fn send_ipi_many(hart_mask: HartMask) -> SbiRet {
+pub(crate) fn send_ipi(hart_mask: HartMask) -> SbiRet {
     if let Some(ipi) = IPI.get() {
-        return ipi.send_ipi_many(hart_mask);
+        return ipi.send_ipi(hart_mask);
     }
     SbiRet::not_supported()
 }