ARM64_IMAGE_MAGIC is "ARM64", RISCV_IMAGE_MAGIC is "RISCV", so I thinkdiff --git a/arch/loongarch/kernel/head.S b/arch/loongarch/kernel/head.SIf you must use a magic number, "Loongson" is not recommended, because
new file mode 100644
index 000000000000..f0b3e76bb762
--- /dev/null
+++ b/arch/loongarch/kernel/head.S
@@ -0,0 +1,97 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
+ */
+#include <linux/init.h>
+#include <linux/threads.h>
+
+#include <asm/addrspace.h>
+#include <asm/asm.h>
+#include <asm/asmmacro.h>
+#include <asm/regdef.h>
+#include <asm/loongarch.h>
+#include <asm/stackframe.h>
+#include <generated/compile.h>
+#include <generated/utsrelease.h>
+
+#ifdef CONFIG_EFI_STUB
+
+#include "efi-header.S"
+
+ __HEAD
+
+_head:
+ .word MZ_MAGIC /* "MZ", MS-DOS header */
+ .org 0x28
+ .ascii "Loongson\0" /* Magic number for BootLoader */
this string lacks uniqueness in the Loongson/LoongArch world. Too many
things are called "Loongson foo" right now, and the string is so
ordinary people don't immediately think of it as "magic".
I recommended using some other interesting text (and encoding) for the
magic number, in a different communication venue, but I think that
proposal got ignored by you without any explanation whatsoever. For now
I'll just repeat myself:
For an interesting magic number related to Loongson/LoongArch/Loong
(like dragons but not exactly the same, let's not expand on that front)
in general, it's perhaps better to use GB18030-encoded four-character
dragon-related idioms. It's GB18030 because one Chinese character is 2
bytes in this encoding, and being non-UTF-8 it's unlikely any user input
would accidentally resemble it. So we get 8 bytes that appear as huge
negative numbers if cast into C long, and random enough that collisions
are highly unlikely.
For example, I chose 4 famous dragon-related phrases from the I Ching,
in both simplified and traditional characters:
潜龙勿用: 0xc7b1c1facef0d3c3
见龙在田: 0xbcfbc1fad4daccef
飞龙在天: 0xb7c9c1fad4daccec
亢龙有悔: 0xbfbac1fad3d0bbda
潛龍勿用: 0x9d93fd88cef0d3c3
見龍在田: 0xd28afd88d4daccef
飛龍在天: 0xef77fd88d4daccec
亢龍有悔: 0xbfbafd88d3d0bbda
and I think each of them is better than "Loongson".
we use "Loongson" as a magic is just OK.