Skip to content

Commit

Permalink
doc: update plic comments for new clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ppannuto committed Nov 21, 2024
1 parent 19d55df commit f8ca36c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions chips/sifive/src/plic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ use kernel::utilities::StaticRef;
const MAX_INTERRUPTS: usize = 1023;
/// maximum number of bit-coded registers, 1 bit per interrupt
const MAX_BIT_REGS: usize = MAX_INTERRUPTS.div_ceil(32);

/// PLIC registers for *machine mode* context only at this time.
///
/// The spec defines extra sets of registers for additional contexts,
/// that is supervisor, user and other modes, but these aren't supported
/// by the current code.
Expand Down Expand Up @@ -101,9 +103,11 @@ register_bitfields![u32,
]
];

/// A PLIC instance should take a generic parameter indicating the total of interrupt sources
/// implemented on the specific chip. 51 is a default for backwards compatibility with the SiFive
/// based platforms implemented without the generic parameter.
/// The PLIC instance generic parameter indicates the total number of
/// interrupt sources implemented on the specific chip.
///
/// 51 is a default for backwards compatibility with the SiFive based
/// platforms implemented without the generic parameter.
pub struct Plic<const TOTAL_INTS: usize = 51> {
registers: RegsWrapper,
saved: [VolatileCell<LocalRegisterCopy<u32>>; 2],
Expand Down

0 comments on commit f8ca36c

Please sign in to comment.