blob: 3ca3f3c8af687b47c763c78a8d1b161cbb5ea47d [file] [log] [blame]
Stephen Warrenb9ae6412016-10-19 15:18:45 -06001/*
2 * Copyright (c) 2016, NVIDIA CORPORATION.
3 *
4 * SPDX-License-Identifier: GPL-2.0
5 */
6
7#include <config.h>
8#include <linux/linkage.h>
9
10#define SMC_SIP_INVOKE_MCE 0x82FFFF00
11#define MCE_SMC_ROC_FLUSH_CACHE (SMC_SIP_INVOKE_MCE | 11)
12
Stephen Warren1ab557a2016-10-19 15:18:46 -060013ENTRY(__asm_flush_l3_dcache)
Stephen Warrenb9ae6412016-10-19 15:18:45 -060014 mov x0, #(MCE_SMC_ROC_FLUSH_CACHE & 0xffff)
15 movk x0, #(MCE_SMC_ROC_FLUSH_CACHE >> 16), lsl #16
16 mov x1, #0
17 mov x2, #0
18 mov x3, #0
19 mov x4, #0
20 mov x5, #0
21 mov x6, #0
22 smc #0
23 mov x0, #0
24 ret
Stephen Warren1ab557a2016-10-19 15:18:46 -060025ENDPROC(__asm_flush_l3_dcache)