Stephen Warren | 8e5d804 | 2016-09-23 17:43:49 -0600 | [diff] [blame] | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. | ||||
3 | * | ||||
4 | * SPDX-License-Identifier: GPL-2.0 | ||||
5 | */ | ||||
6 | |||||
7 | #include <common.h> | ||||
8 | #include <asm/system.h> | ||||
9 | |||||
10 | #define SMC_SIP_INVOKE_MCE 0x82FFFF00 | ||||
11 | #define MCE_SMC_ROC_FLUSH_CACHE 11 | ||||
12 | |||||
13 | int __asm_flush_l3_cache(void) | ||||
14 | { | ||||
15 | struct pt_regs regs = {0}; | ||||
16 | |||||
17 | isb(); | ||||
18 | |||||
19 | regs.regs[0] = SMC_SIP_INVOKE_MCE | MCE_SMC_ROC_FLUSH_CACHE; | ||||
20 | smc_call(®s); | ||||
21 | |||||
22 | return 0; | ||||
23 | } |