Skip to content

Commit

Permalink
risc-v: cleanup includes and guard
Browse files Browse the repository at this point in the history
- prototype for ipi_send_target() is in include/smp/ipi.h
- add comment what conditional block ended
- avoid unnecessary includes

Signed-off-by: Axel Heider <axelheider@gmx.de>
  • Loading branch information
axel-h committed Nov 29, 2023
1 parent 024d844 commit 4cc2c6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion include/arch/riscv/arch/smp/ipi.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <config.h>

#ifdef ENABLE_SMP_SUPPORT

typedef enum {
IpiRemoteCall_Stall,
IpiRemoteCall_switchFpuOwner,
Expand All @@ -18,5 +19,5 @@ typedef enum {
void ipi_send_target(irq_t irq, word_t cpuTargetList);
irq_t ipi_get_irq(void);
void ipi_clear_irq(irq_t irq);
#endif

#endif /* ENABLE_SMP_SUPPORT */
7 changes: 4 additions & 3 deletions src/arch/riscv/smp/ipi.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
*/

#include <config.h>

#ifdef ENABLE_SMP_SUPPORT

#include <mode/smp/ipi.h>
#include <smp/lock.h>
#include <util.h>

#ifdef ENABLE_SMP_SUPPORT

/* the remote call being requested */
static volatile IpiRemoteCall_t remoteCall;
static volatile irq_t ipiIrq[CONFIG_MAX_NUM_NODES];
Expand Down Expand Up @@ -88,4 +89,4 @@ void ipi_send_target(irq_t irq, word_t hart_id)
sbi_send_ipi(hart_mask);
}

#endif
#endif /* ENABLE_SMP_SUPPORT */

0 comments on commit 4cc2c6c

Please sign in to comment.