Explicit casts between enum types in IPI
Depending on the platform, IPI has a slightly different interface. Explicitly cast from the more speific enum type to the generic and vice versa when calling in and out of generic code. Another possibility would be to typedef a specific enum on RISCV platforms that aliases the one currently used. Then casting would only have to take place when passing args to function calls.
This commit is contained in:
parent
680ce96b59
commit
5a2251a56d
4 changed files with 9 additions and 9 deletions
|
|
@ -29,17 +29,17 @@ typedef enum {
|
|||
|
||||
static void inline doRemoteInvalidateTLBEntry(vptr_t vptr, word_t mask)
|
||||
{
|
||||
doRemoteMaskOp1Arg(IpiRemoteCall_InvalidateTLBEntry, vptr, mask);
|
||||
doRemoteMaskOp1Arg((IpiRemoteCall_t)IpiRemoteCall_InvalidateTLBEntry, vptr, mask);
|
||||
}
|
||||
|
||||
static void inline doRemoteInvalidatePageStructureCache(word_t mask)
|
||||
{
|
||||
doRemoteMaskOp0Arg(IpiRemoteCall_InvalidatePageStructureCache, mask);
|
||||
doRemoteMaskOp0Arg((IpiRemoteCall_t)IpiRemoteCall_InvalidatePageStructureCache, mask);
|
||||
}
|
||||
|
||||
static void inline doRemoteInvalidateTLB(word_t mask)
|
||||
{
|
||||
doRemoteMaskOp0Arg(IpiRemoteCall_InvalidateTLB, mask);
|
||||
doRemoteMaskOp0Arg((IpiRemoteCall_t)IpiRemoteCall_InvalidateTLB, mask);
|
||||
}
|
||||
|
||||
void Mode_handleRemoteCall(IpiModeRemoteCall_t call, word_t arg0, word_t arg1, word_t arg2);
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ void Mode_handleRemoteCall(IpiModeRemoteCall_t call, word_t arg0, word_t arg1, w
|
|||
|
||||
static inline void doRemoteInvalidatePCID(word_t type, void *vaddr, asid_t asid, word_t mask)
|
||||
{
|
||||
doRemoteMaskOp3Arg(IpiRemoteCall_InvalidatePCID, type, (word_t)vaddr, asid, mask);
|
||||
doRemoteMaskOp3Arg((IpiRemoteCall_t)IpiRemoteCall_InvalidatePCID, type, (word_t)vaddr, asid, mask);
|
||||
}
|
||||
|
||||
static inline void doRemoteInvalidateASID(vspace_root_t *vspace, asid_t asid, word_t mask)
|
||||
{
|
||||
doRemoteMaskOp2Arg(IpiRemoteCall_InvalidateASID, (word_t)vspace, asid, mask);
|
||||
doRemoteMaskOp2Arg((IpiRemoteCall_t)IpiRemoteCall_InvalidateASID, (word_t)vspace, asid, mask);
|
||||
}
|
||||
|
||||
#endif /* ENABLE_SMP_SUPPORT */
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@
|
|||
|
||||
static IpiModeRemoteCall_t remoteCall; /* the remote call being requested */
|
||||
|
||||
static inline void init_ipi_args(IpiModeRemoteCall_t func,
|
||||
static inline void init_ipi_args(IpiRemoteCall_t func,
|
||||
word_t data1, word_t data2, word_t data3,
|
||||
word_t mask)
|
||||
{
|
||||
remoteCall = func;
|
||||
remoteCall = (IpiModeRemoteCall_t)func;
|
||||
ipi_args[0] = data1;
|
||||
ipi_args[1] = data2;
|
||||
ipi_args[2] = data3;
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@
|
|||
|
||||
static IpiModeRemoteCall_t remoteCall; /* the remote call being requested */
|
||||
|
||||
static inline void init_ipi_args(IpiModeRemoteCall_t func,
|
||||
static inline void init_ipi_args(IpiRemoteCall_t func,
|
||||
word_t data1, word_t data2, word_t data3,
|
||||
word_t mask)
|
||||
{
|
||||
remoteCall = func;
|
||||
remoteCall = (IpiModeRemoteCall_t)func;
|
||||
ipi_args[0] = data1;
|
||||
ipi_args[1] = data2;
|
||||
ipi_args[2] = data3;
|
||||
|
|
|
|||
Loading…
Reference in a new issue