riscv64-linux-gnu-gcc -MMD -MP -MF arch/riscv/.early_printk.o.d -DBUILD_ID
-fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable
-Wno-unused-local-typedefs -O1 -fno-omit-frame-pointer -nostdinc -fno-builtin
-fno-common -Werror -Wredundant-decls -Wno-pointer-arith -Wvla -pipe -D__XEN__
-include ./include/xen/config.h -Wa,--strip-local-absolute -g -mabi=lp64
-I./include -I./arch/riscv/include -march=rv64gc -mstrict-align -mcmodel=medany
-c arch/riscv/early_printk.c -o arch/riscv/early_printk.o
arch/riscv/early_printk.c:18:2: error: #error "early_*() can be called from
head.S with MMU-off"
18 | #error "early_*() can be called from head.S with MMU-off"
| ^~~~~
$ riscv64-linux-gnu-gcc --version
riscv64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110
The binary is otherwise correct, so remove the incorrect check.
Signed-off-by: Andrew Cooper <[email protected]>
---
CC: Bob Eshleman <[email protected]>
CC: Alistair Francis <[email protected]>
CC: Connor Davis <[email protected]>
I was honestly hoping to leave this to some poor sole in the future.
But the irony of this check, after all the argument it caused, breaking the
very case it was trying to enforce, speaks volumes.
---
xen/arch/riscv/early_printk.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/xen/arch/riscv/early_printk.c b/xen/arch/riscv/early_printk.c
index dfe4ad77e25d..b66a11f1bc1a 100644
--- a/xen/arch/riscv/early_printk.c
+++ b/xen/arch/riscv/early_printk.c
@@ -7,17 +7,6 @@
#include <asm/early_printk.h>
#include <asm/sbi.h>
-/*
- * When the MMU is off during early boot, any C function called has to
- * use PC-relative rather than absolute address because the physical address
- * may not match the virtual address.
- *
- * To guarantee PC-relative address cmodel=medany should be used
- */
-#ifndef __riscv_cmodel_medany
-#error "early_*() can be called from head.S with MMU-off"
-#endif
-
/*
* TODO:
* sbi_console_putchar is already planned for deprecation
--
2.30.2