-
Notifications
You must be signed in to change notification settings - Fork 89
drm-kmod: Build and run on ARM64 with 16.0-CURRENT #402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 6.6-lts
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1084,6 +1084,143 @@ CFLAGS.rc_calc.c= ${FPUFLAGS} -mstack-alignment=4 | |
| CFLAGS.rc_calc_dpi.c= ${FPUFLAGS} -mstack-alignment=4 | ||
| CFLAGS.rc_calc_fpu.c= ${FPUFLAGS} -mstack-alignment=4 | ||
|
|
||
| .if ${MACHINE_ARCH} == "aarch64" | ||
|
|
||
| dcn_calcs.o: dcn_calcs.c | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we avoid these duplicate rules? This is to remove
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess so. I decided to act safely and removed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean just arrange to have E.g. is there |
||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn_calc_auto.o: dcn_calc_auto.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn_calc_math.o: dcn_calc_math.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn20_fpu.o: dcn20_fpu.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn20_resource.o: dcn20_resource.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn21_resource.o: dcn21_resource.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn30_fpu.o: dcn30_fpu.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn30_resource.o: dcn30_resource.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn301_fpu.o: dcn301_fpu.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn302_fpu.o: dcn302_fpu.c | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compiling this one with -mgeneral-regs-only causes clang to produce machine code which requires __floatundidf to convert integer to double if I understand correctly, i.e. complains early about the undefined symbol. |
||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn301_resource.o: dcn301_resource.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn303_fpu.o: dcn303_fpu.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn31_fpu.o: dcn31_fpu.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn31_resource.o: dcn31_resource.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn314_fpu.o: dcn314_fpu.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn32_fpu.o: dcn32_fpu.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn32_resource.o: dcn32_resource.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn32_resource_helpers.o: dcn32_resource_helpers.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dcn321_fpu.o: dcn321_fpu.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
|
|
||
| display_mode_lib.o: display_mode_lib.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_mode_vba.o: display_mode_vba.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_mode_vba_20.o: display_mode_vba_20.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_mode_vba_21.o: display_mode_vba_21.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_mode_vba_30.o: display_mode_vba_30.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_mode_vba_31.o: display_mode_vba_31.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_mode_vba_314.o: display_mode_vba_314.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_mode_vba_32.o: display_mode_vba_32.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_mode_vba_util_32.o: display_mode_vba_util_32.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_pipe_clocks.o: display_pipe_clocks.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| dml1_display_rq_dlg_calc.o: dml1_display_rq_dlg_calc.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_rq_dlg_helpers.o: display_rq_dlg_helpers.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_rq_dlg_calc_20.o: display_rq_dlg_calc_20.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_rq_dlg_calc_21.o: display_rq_dlg_calc_21.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_rq_dlg_calc_314.o: display_rq_dlg_calc_314.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_rq_dlg_calc_32.o: display_rq_dlg_calc_32.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| soc_bounding_box.o: soc_bounding_box.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
|
|
||
| display_rq_dlg_calc_20v2.o: display_rq_dlg_calc_20v2.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_mode_vba_20v2.o: display_mode_vba_20v2.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_rq_dlg_calc_30.o: display_rq_dlg_calc_30.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| display_rq_dlg_calc_31.o: display_rq_dlg_calc_31.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
|
|
||
| rc_calc.o: rc_calc.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| rc_calc_dpi.o: rc_calc_dpi.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
| rc_calc_fpu.o: rc_calc_fpu.c | ||
| ${CC} ${STATIC_CFLAGS} ${CFLAGS:N-mgeneral-regs-only} -c ${.IMPSRC} \ | ||
| -o ${.TARGET} | ||
|
|
||
| .endif | ||
|
|
||
| .if ${MACHINE_CPUARCH} != "powerpc" | ||
| CWARNFLAGS+= -Wno-expansion-to-defined | ||
| .endif | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -311,8 +311,6 @@ static inline bool is_virtual_machine(void) | |
| { | ||
| #if defined(CONFIG_X86) | ||
| return boot_cpu_has(X86_FEATURE_HYPERVISOR); | ||
| #elif defined(CONFIG_ARM64) | ||
| return !is_kernel_in_hyp_mode(); | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is_kernel_in_hyp_mode isn't available in the LinuxKPI. I didn't know how to substitute it properly and removed for now. Any suggestions are welcome. |
||
| #else | ||
| return false; | ||
| #endif | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ | |
| */ | ||
|
|
||
| #include "dc_trace.h" | ||
| #include "dc_fpu.h" | ||
|
|
||
| #if defined(CONFIG_X86) | ||
| #include <asm/fpu/api.h> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,11 @@ | |
| #include <linux/iosys-map.h> | ||
| #include <xen/xen.h> | ||
|
|
||
| /* XXX-DSL: For FreeBSD and LinuxKPI only! */ | ||
| #if defined(CONFIG_ARM64) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'd be even more strict than "CONFIG_ARM64", I guess. I'm not sure. |
||
| #include <linux/preempt.h> | ||
| #endif | ||
|
|
||
| #include <drm/drm_cache.h> | ||
|
|
||
| /* A small bounce buffer that fits on the stack. */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost all of those files below use "double" as a type, i.e. clang blames ABI:
but it's probably misleading diagnostics: llvm/llvm-project#90001