xref: /linux/arch/hexagon/kernel/vm_ops.S (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*08dbd0f8SThomas Gleixner/* SPDX-License-Identifier: GPL-2.0-only */
2e49ee290SRichard Kuo/*
3e49ee290SRichard Kuo * Hexagon VM instruction support
4e49ee290SRichard Kuo *
5e1858b2aSRichard Kuo * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
6e49ee290SRichard Kuo */
7e49ee290SRichard Kuo
8e49ee290SRichard Kuo#include <linux/linkage.h>
9e49ee290SRichard Kuo#include <asm/hexagon_vm.h>
10e49ee290SRichard Kuo
11e49ee290SRichard Kuo/*
12e49ee290SRichard Kuo * C wrappers for virtual machine "instructions".  These
13e49ee290SRichard Kuo * could be, and perhaps some day will be, handled as in-line
14e49ee290SRichard Kuo * macros, but for tracing/debugging it's handy to have
15e49ee290SRichard Kuo * a single point of invocation for each of them.
16238034e3SAdam Buchbinder * Conveniently, they take parameters and return values
17e49ee290SRichard Kuo * consistent with the ABI calling convention.
18e49ee290SRichard Kuo */
19e49ee290SRichard Kuo
20e49ee290SRichard KuoENTRY(__vmrte)
21e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMRTE);
22e49ee290SRichard Kuo	jumpr	R31;
23e49ee290SRichard Kuo
24e49ee290SRichard KuoENTRY(__vmsetvec)
25e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMSETVEC);
26e49ee290SRichard Kuo	jumpr	R31;
27e49ee290SRichard Kuo
28e49ee290SRichard KuoENTRY(__vmsetie)
29e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMSETIE);
30e49ee290SRichard Kuo	jumpr	R31;
31e49ee290SRichard Kuo
32e49ee290SRichard KuoENTRY(__vmgetie)
33e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMGETIE);
34e49ee290SRichard Kuo	jumpr	R31;
35e49ee290SRichard Kuo
36e49ee290SRichard KuoENTRY(__vmintop)
37e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMINTOP);
38e49ee290SRichard Kuo	jumpr	R31;
39e49ee290SRichard Kuo
40e49ee290SRichard KuoENTRY(__vmclrmap)
41e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMCLRMAP);
42e49ee290SRichard Kuo	jumpr	R31;
43e49ee290SRichard Kuo
44e49ee290SRichard KuoENTRY(__vmnewmap)
45e49ee290SRichard Kuo	r1 = #VM_NEWMAP_TYPE_PGTABLES;
46e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMNEWMAP);
47e49ee290SRichard Kuo	jumpr	R31;
48e49ee290SRichard Kuo
49e49ee290SRichard KuoENTRY(__vmcache)
50e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMCACHE);
51e49ee290SRichard Kuo	jumpr	R31;
52e49ee290SRichard Kuo
53e49ee290SRichard KuoENTRY(__vmgettime)
54e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMGETTIME);
55e49ee290SRichard Kuo	jumpr	R31;
56e49ee290SRichard Kuo
57e49ee290SRichard KuoENTRY(__vmsettime)
58e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMSETTIME);
59e49ee290SRichard Kuo	jumpr	R31;
60e49ee290SRichard Kuo
61e49ee290SRichard KuoENTRY(__vmwait)
62e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMWAIT);
63e49ee290SRichard Kuo	jumpr	R31;
64e49ee290SRichard Kuo
65e49ee290SRichard KuoENTRY(__vmyield)
66e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMYIELD);
67e49ee290SRichard Kuo	jumpr	R31;
68e49ee290SRichard Kuo
69e49ee290SRichard KuoENTRY(__vmstart)
70e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMSTART);
71e49ee290SRichard Kuo	jumpr	R31;
72e49ee290SRichard Kuo
73e49ee290SRichard KuoENTRY(__vmstop)
74e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMSTOP);
75e49ee290SRichard Kuo	jumpr	R31;
76e49ee290SRichard Kuo
77e49ee290SRichard KuoENTRY(__vmvpid)
78e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMVPID);
79e49ee290SRichard Kuo	jumpr	R31;
80e49ee290SRichard Kuo
81e49ee290SRichard Kuo/*  Probably not actually going to use these; see vm_entry.S  */
82e49ee290SRichard Kuo
83e49ee290SRichard KuoENTRY(__vmsetregs)
84e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMSETREGS);
85e49ee290SRichard Kuo	jumpr	R31;
86e49ee290SRichard Kuo
87e49ee290SRichard KuoENTRY(__vmgetregs)
88e49ee290SRichard Kuo	trap1(#HVM_TRAP1_VMGETREGS);
89e49ee290SRichard Kuo	jumpr	R31;
90