[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <01604799-b993-e530-817c-ad097d343fc4@hygon.cn>
Date: Wed, 5 Sep 2018 20:59:24 +0800
From: Pu Wen <puwen@...on.cn>
To: Borislav Petkov <bp@...en8.de>
Cc: tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
x86@...nel.org, thomas.lendacky@....com, pbonzini@...hat.com,
tony.luck@...el.com, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, linux-edac@...r.kernel.org
Subject: Re: [PATCH v5 10/16] x86/mce: enable Hygon support to MCE
infrastructure
On 2018/9/5 17:22, Borislav Petkov wrote:
>> @@ -214,6 +214,11 @@ static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { }
>> #endif
>>
>> +static inline void mce_hygon_feature_init(struct cpuinfo_x86 *c)
>> +{
>> + return mce_amd_feature_init(c);
>> +}
>> +
>
> What happens if CONFIG_X86_MCE_AMD=n ?
If CONFIG_X86_MCE_AMD=n, mce_hygon_feature_init will call the other
one mce_amd_feature_init which is a null function and located in the
else branch of "#ifdef CONFIG_X86_MCE_AMD". The compilation is OK and
the kernel will run without MCE support.
> In general, since you're using AMD code, you need to make CPU_SUP_HYGON
> depend on a bunch of AMD config items like CONFIG_X86_MCE_AMD,
> CONFIG_CPU_SUP_AMD, CONFIG_AMD_NB,... Audit your code and see what other
> config items need to be selected.
All right, will check all the config items which are necessary for
CONFIG_CPU_SUP_HYGON.
--
Regards,
Pu Wen
Powered by blists - more mailing lists