File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ # SPDX-License-Identifier: GPL-2.0-only
2
+ hyp_constants.h
Original file line number Diff line number Diff line change @@ -25,3 +25,19 @@ kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
25
25
vgic/vgic-its.o vgic/vgic-debug.o
26
26
27
27
kvm-$(CONFIG_HW_PERF_EVENTS) += pmu-emul.o
28
+
29
+ always-y := hyp_constants.h hyp-constants.s
30
+
31
+ define rule_gen_hyp_constants
32
+ $(call filechk,offsets,__HYP_CONSTANTS_H__)
33
+ endef
34
+
35
+ CFLAGS_hyp-constants.o = -I $(srctree ) /$(src ) /hyp/include
36
+ $(obj ) /hyp-constants.s : $(src ) /hyp/hyp-constants.c FORCE
37
+ $(call if_changed_dep,cc_s_c)
38
+
39
+ $(obj ) /hyp_constants.h : $(obj ) /hyp-constants.s FORCE
40
+ $(call if_changed_rule,gen_hyp_constants)
41
+
42
+ obj-kvm := $(addprefix $(obj ) /, $(kvm-y ) )
43
+ $(obj-kvm ) : $(obj ) /hyp_constants.h
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: GPL-2.0-only
2
+
3
+ #include <linux/kbuild.h>
4
+ #include <nvhe/memory.h>
5
+
6
+ int main (void )
7
+ {
8
+ DEFINE (STRUCT_HYP_PAGE_SIZE , sizeof (struct hyp_page ));
9
+ return 0 ;
10
+ }
You can’t perform that action at this time.
0 commit comments