1/*
2 * Copyright 2017, Data61
3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4 * ABN 41 687 119 230.
5 *
6 * This software may be distributed and modified according to the terms of
7 * the GNU General Public License version 2. Note that NO WARRANTY is provided.
8 * See "LICENSE_GPLv2.txt" for details.
9 *
10 * @TAG(DATA61_GPL)
11 */
12
13#include <config.h>
14#include <mode/smp/ipi.h>
15
16#ifdef ENABLE_SMP_SUPPORT
17
18void Mode_handleRemoteCall(IpiModeRemoteCall_t call, word_t arg0, word_t arg1, word_t arg2)
19{
20    switch (call) {
21    case IpiRemoteCall_InvalidateTLBEntry:
22        invalidateLocalTLBEntry(arg0);
23        break;
24
25    case IpiRemoteCall_InvalidatePageStructureCache:
26        invalidateLocalPageStructureCache();
27        break;
28
29    case IpiRemoteCall_InvalidateTLB:
30        invalidateLocalTLB();
31        break;
32
33    default:
34        fail("Invalid remote call");
35    }
36}
37
38#endif /* ENABLE_SMP_SUPPORT */
39