Re: [PATCH] Add Zhaoxin support to enable tsc_reliable and arch_random features

Jens Axboe <[email protected]>
Newsgroups org.kernel.vger.fio
Message-ID <[email protected]>
On 5/20/25 8:04 PM, Runa Guo-oc wrote:
> Signed-off-by: Runa Guo-oc <[email protected]>

This is literally the same as the intel one, why duplicate all
of that? Just do:

diff --git a/arch/arch-x86-common.h b/arch/arch-x86-common.h
index f32835cce33b..ac26126ae84a 100644
--- a/arch/arch-x86-common.h
+++ b/arch/arch-x86-common.h
@@ -68,7 +68,8 @@ static inline void arch_init(char *envp[])
 			 (unsigned int *) &str[4]);
 
 	str[12] = '\0';
-	if (!strcmp(str, "GenuineIntel"))
+	if (!strcmp(str, "GenuineIntel") || !strcmp(str, "  Shanghai  ") ||
+	    !strcmp(str, "CentaurHauls"))
 		arch_init_intel();
 	else if (!strcmp(str, "AuthenticAMD") || !strcmp(str, "HygonGenuine"))
 		arch_init_amd();

-- 
Jens Axboe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.