x86/cpu: Create Zhaoxin processors architecture support file
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 30 lines · TonyWWang-oc
Add x86 architecture support for new Zhaoxin processors. Carve out initialization code needed by Zhaoxin processors into a separate compilation unit.
To identify Zhaoxin CPU, add a new vendor type
X86_VENDOR_ZHAOXINfor system recognition.Signed-off-by TonyWWang <[email protected]>---
MAINTAINERS | 6 ++ arch/x86/Kconfig.cpu | 13 +++ arch/x86/include/asm/processor.h | 3 +- arch/x86/kernel/cpu/Makefile | 1 + arch/x86/kernel/cpu/zhaoxin.c | 178 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 200 insertions(+), 1 deletion(-)create mode 100644
arch/x86/kernel/cpu/zhaoxin.cMAINTAINERS +0
-0@@ -17460,6 +17460,12 @@ Q: https://patchwork.linuxtv.org/project/linux-media/list/S: Maintained
F:drivers/media/dvb-frontends/zd1301_demod*MAINTAINERS +6
-0+ZHAOXIN PROCESSOR SUPPORT +M: TonyWWang <[email protected]> +L: [email protected] +S: Maintained +F: arch/x86/kernel/cpu/zhaoxin.c +
Quoted 3 lines
ZPOOL COMPRESSED PAGE STORAGE API
M: Dan Streetman <[email protected]>
L: [email protected]
I think your email client ate the leading space here :(
Anyway, you need a blank line before your entry.
thanks,
greg k-h
arch/x86/kernel/cpu/zhaoxin.c line 1
Quoted 4 lines · TonyWWang-oc
arch/x86/kernel/cpu/zhaoxin.c new file +1
-0@@ -0,0 +1,178 @@ +// SPDX-License-Identifier: GPL-2.0
Nice, but:
arch/x86/kernel/cpu/zhaoxin.c line 10
Quoted 9 lines
arch/x86/kernel/cpu/zhaoxin.c new file +9
-0+/* +* Zhaoxin Processor Support for Linux +* +* Copyright (c) 2019 Shanghai Zhaoxin Semiconductor Co., Ltd. +* +* Author: David Wang <[email protected]> +* +* This file is licensed under the terms of the GNU General +* License v2.0 or later. See file COPYING for details.
That contridicts the first line of the file :(
Please sort this out with your lawyers and resend it corrected.
Also, gpl "boilerplate" text like this does not need to be in the file if you just include the spdx line.
thanks,
greg k-h
Quoted 9 lines · On Thu, May 23, 2019, [email protected] wrote:
Quoted 2 lines
+ * This file is licensed under the terms of the GNU General
+ * License v2.0 or later. See file COPYING for details.That contridicts the first line of the file :(
Please sort this out with your lawyers and resend it corrected.
Also, gpl "boilerplate" text like this does not need to be in the file if you just include the spdx line.
Ok, I will sort this out with our lawyers, then adjust this text correctly before resend it.
Thanks
TonyWWang-oc
Quoted 8 lines · TonyWWang-oc
Add x86 architecture support for new Zhaoxin processors. Carve out initialization code needed by Zhaoxin processors into a separate compilation unit.
To identify Zhaoxin CPU, add a new vendor type
X86_VENDOR_ZHAOXINfor system recognition.Signed-off-by TonyWWang <[email protected]>
Some basic patch tips. Your From: line needs to match the signed-off-by line, which is not true here. Also, please use your name with ' ' characters.
Review
Quoted 7 lines
(quoted diff) +7
-0+static void init_zhaoxin_cap(struct cpuinfo_x86 *c) +{ + u32 lo, hi; + + /* Test for Extended Feature Flags presence */ + if (cpuid_eax(0xC0000000) >= 0xC0000001) { + u32 tmp = cpuid_edx(0xC0000001);
This patch is totally corrupted, with leading spaces dropped and tabs turned into spaces. Please read the email client documentation in the kernel directory for how to fix your email client, or just use 'git send-email' to send the patches out directly.
thanks,
greg k-h
Quoted 4 lines · On Thu, May 23, 2019 at 12:24:17PM +0200, [email protected] wrote:
This patch is totally corrupted, with leading spaces dropped and tabs turned into spaces. Please read the email client documentation in the kernel directory for how to fix your email client, or just use 'git send-email' to send the patches out directly.
.. and before you do that, run them all through checkpatch.pl and apply common sense when fixing the warnings from it:
ERROR: patch seems to be corrupt (line wrapped?)
#42: FILE: MAINTAINERS:17459:
S: Maintained
WARNING: MAINTAINERS entries use one tab after TYPE:
#45: FILE: MAINTAINERS:17461:
+M: TonyWWang <[email protected]>
WARNING: MAINTAINERS entries use one tab after TYPE:
#46: FILE: MAINTAINERS:17462:
+L: [email protected]
WARNING: MAINTAINERS entries use one tab after TYPE:
#47: FILE: MAINTAINERS:17463:
+S: Maintained
WARNING: MAINTAINERS entries use one tab after TYPE:
#48: FILE: MAINTAINERS:17464:
+F: arch/x86/kernel/cpu/zhaoxin.c
WARNING: prefer 'help' over '---help---' for new help texts #61: FILE: arch/x86/Kconfig.cpu:483:
+config CPU_SUP_ZHAOXIN
WARNING: please, no spaces at the start of a line
#140: FILE: arch/x86/kernel/cpu/zhaoxin.c:39:
+ u32 lo, hi;$
WARNING: please, no spaces at the start of a line
#143: FILE: arch/x86/kernel/cpu/zhaoxin.c:42:
+ if (cpuid_eax(0xC0000000) >= 0xC0000001) {$
WARNING: suspect code indent for conditional statements (3, 6) #143: FILE: arch/x86/kernel/cpu/zhaoxin.c:42:
+ if (cpuid_eax(0xC0000000) >= 0xC0000001) {
+ u32 tmp = cpuid_edx(0xC0000001);
WARNING: please, no spaces at the start of a line
#144: FILE: arch/x86/kernel/cpu/zhaoxin.c:43:
+ u32 tmp = cpuid_edx(0xC0000001);$
WARNING: please, no spaces at the start of a line
#147: FILE: arch/x86/kernel/cpu/zhaoxin.c:46:
+ if ((tmp & (ACE_PRESENT | ACE_ENABLED)) == ACE_PRESENT) {$
WARNING: suspect code indent for conditional statements (6, 10) #147: FILE: arch/x86/kernel/cpu/zhaoxin.c:46:
+ if ((tmp & (ACE_PRESENT | ACE_ENABLED)) == ACE_PRESENT) {
+ rdmsr(MSR_ZHAOXIN_FCR57, lo, hi);
ERROR: code indent should use tabs where possible
#148: FILE: arch/x86/kernel/cpu/zhaoxin.c:47:
+ rdmsr(MSR_ZHAOXIN_FCR57, lo, hi);$
WARNING: please, no spaces at the start of a line
#148: FILE: arch/x86/kernel/cpu/zhaoxin.c:47:
+ rdmsr(MSR_ZHAOXIN_FCR57, lo, hi);$
ERROR: code indent should use tabs where possible
#149: FILE: arch/x86/kernel/cpu/zhaoxin.c:48:
+ lo |= ACE_FCR; /* enable ACE unit */$
WARNING: please, no spaces at the start of a line
#149: FILE: arch/x86/kernel/cpu/zhaoxin.c:48:
+ lo |= ACE_FCR; /* enable ACE unit */$
ERROR: code indent should use tabs where possible
#150: FILE: arch/x86/kernel/cpu/zhaoxin.c:49:
+ wrmsr(MSR_ZHAOXIN_FCR57, lo, hi);$
WARNING: please, no spaces at the start of a line
#150: FILE: arch/x86/kernel/cpu/zhaoxin.c:49:
+ wrmsr(MSR_ZHAOXIN_FCR57, lo, hi);$
ERROR: code indent should use tabs where possible
#151: FILE: arch/x86/kernel/cpu/zhaoxin.c:50:
+ pr_info("CPU: Enabled ACE h/w crypto\n");$
WARNING: please, no spaces at the start of a line
#151: FILE: arch/x86/kernel/cpu/zhaoxin.c:50:
+ pr_info("CPU: Enabled ACE h/w crypto\n");$
WARNING: please, no spaces at the start of a line
#152: FILE: arch/x86/kernel/cpu/zhaoxin.c:51:
+ }$
WARNING: please, no spaces at the start of a line
#155: FILE: arch/x86/kernel/cpu/zhaoxin.c:54:
+ if ((tmp & (RNG_PRESENT | RNG_ENABLED)) == RNG_PRESENT) {$
WARNING: suspect code indent for conditional statements (6, 10) #155: FILE: arch/x86/kernel/cpu/zhaoxin.c:54:
+ if ((tmp & (RNG_PRESENT | RNG_ENABLED)) == RNG_PRESENT) {
+ rdmsr(MSR_ZHAOXIN_FCR57, lo, hi);
ERROR: code indent should use tabs where possible
#156: FILE: arch/x86/kernel/cpu/zhaoxin.c:55:
+ rdmsr(MSR_ZHAOXIN_FCR57, lo, hi);$
WARNING: please, no spaces at the start of a line
#156: FILE: arch/x86/kernel/cpu/zhaoxin.c:55:
+ rdmsr(MSR_ZHAOXIN_FCR57, lo, hi);$
ERROR: code indent should use tabs where possible
#157: FILE: arch/x86/kernel/cpu/zhaoxin.c:56:
+ lo |= RNG_ENABLE; /* enable RNG unit */$
WARNING: please, no spaces at the start of a line
#157: FILE: arch/x86/kernel/cpu/zhaoxin.c:56:
+ lo |= RNG_ENABLE; /* enable RNG unit */$
ERROR: code indent should use tabs where possible
#158: FILE: arch/x86/kernel/cpu/zhaoxin.c:57:
+ wrmsr(MSR_ZHAOXIN_FCR57, lo, hi);$
WARNING: please, no spaces at the start of a line
#158: FILE: arch/x86/kernel/cpu/zhaoxin.c:57:
+ wrmsr(MSR_ZHAOXIN_FCR57, lo, hi);$
ERROR: code indent should use tabs where possible
#159: FILE: arch/x86/kernel/cpu/zhaoxin.c:58:
+ pr_info("CPU: Enabled h/w RNG\n");$
WARNING: please, no spaces at the start of a line
#159: FILE: arch/x86/kernel/cpu/zhaoxin.c:58:
+ pr_info("CPU: Enabled h/w RNG\n");$
WARNING: please, no spaces at the start of a line
#160: FILE: arch/x86/kernel/cpu/zhaoxin.c:59:
+ }$
WARNING: Block comments should align the * on each line #163: FILE: arch/x86/kernel/cpu/zhaoxin.c:62:
+ /* store Extended Feature Flags as
+ * word 5 of the CPU capability bit array
WARNING: please, no spaces at the start of a line
#165: FILE: arch/x86/kernel/cpu/zhaoxin.c:64:
+ c->x86_capability[CPUID_C000_0001_EDX] = cpuid_edx(0xC0000001);$
WARNING: please, no spaces at the start of a line
#166: FILE: arch/x86/kernel/cpu/zhaoxin.c:65:
+ }$
WARNING: please, no spaces at the start of a line
#168: FILE: arch/x86/kernel/cpu/zhaoxin.c:67:
+ if (c->x86 >= 0x6) {$
WARNING: suspect code indent for conditional statements (3, 6) #168: FILE: arch/x86/kernel/cpu/zhaoxin.c:67:
+ if (c->x86 >= 0x6) {
+ set_cpu_cap(c, X86_FEATURE_REP_GOOD);
WARNING: braces {} are not necessary for single statement blocks #168: FILE: arch/x86/kernel/cpu/zhaoxin.c:67:
+ if (c->x86 >= 0x6) {
+ set_cpu_cap(c, X86_FEATURE_REP_GOOD);
+ }
WARNING: please, no spaces at the start of a line
#169: FILE: arch/x86/kernel/cpu/zhaoxin.c:68:
+ set_cpu_cap(c, X86_FEATURE_REP_GOOD);$
WARNING: please, no spaces at the start of a line
#170: FILE: arch/x86/kernel/cpu/zhaoxin.c:69:
+ }$
WARNING: please, no spaces at the start of a line
#172: FILE: arch/x86/kernel/cpu/zhaoxin.c:71:
+ cpu_detect_cache_sizes(c);$
WARNING: please, no spaces at the start of a line
#177: FILE: arch/x86/kernel/cpu/zhaoxin.c:76:
+ if (c->x86 >= 0x6) {$
WARNING: suspect code indent for conditional statements (3, 6) #177: FILE: arch/x86/kernel/cpu/zhaoxin.c:76:
+ if (c->x86 >= 0x6) {
+ set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
WARNING: braces {} are not necessary for single statement blocks #177: FILE: arch/x86/kernel/cpu/zhaoxin.c:76:
+ if (c->x86 >= 0x6) {
+ set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
+ }
WARNING: please, no spaces at the start of a line
#178: FILE: arch/x86/kernel/cpu/zhaoxin.c:77:
+ set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);$
WARNING: please, no spaces at the start of a line
#179: FILE: arch/x86/kernel/cpu/zhaoxin.c:78:
+ }$
WARNING: please, no spaces at the start of a line
#181: FILE: arch/x86/kernel/cpu/zhaoxin.c:80:
+ set_cpu_cap(c, X86_FEATURE_SYSENTER32);$
WARNING: please, no spaces at the start of a line
#183: FILE: arch/x86/kernel/cpu/zhaoxin.c:82:
+ if (c->x86_power & (1 << 8)) {$
WARNING: suspect code indent for conditional statements (3, 6) #183: FILE: arch/x86/kernel/cpu/zhaoxin.c:82:
+ if (c->x86_power & (1 << 8)) {
+ set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
WARNING: please, no spaces at the start of a line
#184: FILE: arch/x86/kernel/cpu/zhaoxin.c:83:
+ set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);$
WARNING: please, no spaces at the start of a line
#185: FILE: arch/x86/kernel/cpu/zhaoxin.c:84:
+ set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC);$
WARNING: please, no spaces at the start of a line
#186: FILE: arch/x86/kernel/cpu/zhaoxin.c:85:
+ }$
WARNING: please, no spaces at the start of a line
#188: FILE: arch/x86/kernel/cpu/zhaoxin.c:87:
+ if (c->cpuid_level >= 0x00000001) {$
WARNING: suspect code indent for conditional statements (3, 6) #188: FILE: arch/x86/kernel/cpu/zhaoxin.c:87:
+ if (c->cpuid_level >= 0x00000001) {
+ u32 eax, ebx, ecx, edx;
WARNING: please, no spaces at the start of a line
#189: FILE: arch/x86/kernel/cpu/zhaoxin.c:88:
+ u32 eax, ebx, ecx, edx;$
WARNING: please, no spaces at the start of a line
#191: FILE: arch/x86/kernel/cpu/zhaoxin.c:90:
+ cpuid(0x00000001, &eax, &ebx, &ecx, &edx);$
WARNING: Block comments should align the * on each line #193: FILE: arch/x86/kernel/cpu/zhaoxin.c:92:
+ /*
+ * If HTT (EDX[28]) is set EBX[16:23] contain the number of
WARNING: please, no spaces at the start of a line
#197: FILE: arch/x86/kernel/cpu/zhaoxin.c:96:
+ if (edx & (1U << 28))$
WARNING: suspect code indent for conditional statements (6, 10) #197: FILE: arch/x86/kernel/cpu/zhaoxin.c:96:
+ if (edx & (1U << 28))
+ c->x86_coreid_bits = get_count_order((ebx >> 16) & 0xff);
ERROR: code indent should use tabs where possible
#198: FILE: arch/x86/kernel/cpu/zhaoxin.c:97:
+ c->x86_coreid_bits = get_count_order((ebx >> 16) & 0xff);$
WARNING: please, no spaces at the start of a line
#198: FILE: arch/x86/kernel/cpu/zhaoxin.c:97:
+ c->x86_coreid_bits = get_count_order((ebx >> 16) & 0xff);$
WARNING: please, no spaces at the start of a line
#199: FILE: arch/x86/kernel/cpu/zhaoxin.c:98:
+ }$
WARNING: please, no spaces at the start of a line
#205: FILE: arch/x86/kernel/cpu/zhaoxin.c:104:
+ u32 vmx_msr_low, vmx_msr_high, msr_ctl, msr_ctl2;$
WARNING: please, no spaces at the start of a line
#207: FILE: arch/x86/kernel/cpu/zhaoxin.c:106:
+ rdmsr(MSR_IA32_VMX_PROCBASED_CTLS, vmx_msr_low, vmx_msr_high);$
WARNING: please, no spaces at the start of a line
#208: FILE: arch/x86/kernel/cpu/zhaoxin.c:107:
+ msr_ctl = vmx_msr_high | vmx_msr_low;$
WARNING: please, no spaces at the start of a line
#210: FILE: arch/x86/kernel/cpu/zhaoxin.c:109:
+ if (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_TPR_SHADOW)$
WARNING: suspect code indent for conditional statements (3, 6) #210: FILE: arch/x86/kernel/cpu/zhaoxin.c:109:
+ if (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_TPR_SHADOW)
+ set_cpu_cap(c, X86_FEATURE_TPR_SHADOW);
WARNING: please, no spaces at the start of a line
#211: FILE: arch/x86/kernel/cpu/zhaoxin.c:110:
+ set_cpu_cap(c, X86_FEATURE_TPR_SHADOW);$
WARNING: please, no spaces at the start of a line
#212: FILE: arch/x86/kernel/cpu/zhaoxin.c:111:
+ if (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_VNMI)$
WARNING: suspect code indent for conditional statements (3, 6) #212: FILE: arch/x86/kernel/cpu/zhaoxin.c:111:
+ if (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_VNMI)
+ set_cpu_cap(c, X86_FEATURE_VNMI);
WARNING: please, no spaces at the start of a line
#213: FILE: arch/x86/kernel/cpu/zhaoxin.c:112:
+ set_cpu_cap(c, X86_FEATURE_VNMI);$
WARNING: please, no spaces at the start of a line
#214: FILE: arch/x86/kernel/cpu/zhaoxin.c:113:
+ if (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_2ND_CTLS) {$
WARNING: suspect code indent for conditional statements (3, 6) #214: FILE: arch/x86/kernel/cpu/zhaoxin.c:113:
+ if (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_2ND_CTLS) {
+ rdmsr(MSR_IA32_VMX_PROCBASED_CTLS2,
WARNING: please, no spaces at the start of a line
#215: FILE: arch/x86/kernel/cpu/zhaoxin.c:114:
+ rdmsr(MSR_IA32_VMX_PROCBASED_CTLS2,$
ERROR: code indent should use tabs where possible
#216: FILE: arch/x86/kernel/cpu/zhaoxin.c:115:
+ vmx_msr_low, vmx_msr_high);$
WARNING: please, no spaces at the start of a line
#216: FILE: arch/x86/kernel/cpu/zhaoxin.c:115:
+ vmx_msr_low, vmx_msr_high);$
WARNING: please, no spaces at the start of a line
#217: FILE: arch/x86/kernel/cpu/zhaoxin.c:116:
+ msr_ctl2 = vmx_msr_high | vmx_msr_low;$
WARNING: please, no spaces at the start of a line
#218: FILE: arch/x86/kernel/cpu/zhaoxin.c:117:
+ if ((msr_ctl2 & X86_VMX_FEATURE_PROC_CTLS2_VIRT_APIC) &&$
WARNING: suspect code indent for conditional statements (6, 10) #218: FILE: arch/x86/kernel/cpu/zhaoxin.c:117:
+ if ((msr_ctl2 & X86_VMX_FEATURE_PROC_CTLS2_VIRT_APIC) &&
[...]
+ set_cpu_cap(c, X86_FEATURE_FLEXPRIORITY);
ERROR: code indent should use tabs where possible
#219: FILE: arch/x86/kernel/cpu/zhaoxin.c:118:
+ (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_TPR_SHADOW))$
WARNING: please, no spaces at the start of a line
#219: FILE: arch/x86/kernel/cpu/zhaoxin.c:118:
+ (msr_ctl & X86_VMX_FEATURE_PROC_CTLS_TPR_SHADOW))$
ERROR: code indent should use tabs where possible
#220: FILE: arch/x86/kernel/cpu/zhaoxin.c:119:
+ set_cpu_cap(c, X86_FEATURE_FLEXPRIORITY);$
WARNING: please, no spaces at the start of a line
#220: FILE: arch/x86/kernel/cpu/zhaoxin.c:119:
+ set_cpu_cap(c, X86_FEATURE_FLEXPRIORITY);$
WARNING: please, no spaces at the start of a line
#221: FILE: arch/x86/kernel/cpu/zhaoxin.c:120:
+ if (msr_ctl2 & X86_VMX_FEATURE_PROC_CTLS2_EPT)$
WARNING: suspect code indent for conditional statements (6, 10) #221: FILE: arch/x86/kernel/cpu/zhaoxin.c:120:
+ if (msr_ctl2 & X86_VMX_FEATURE_PROC_CTLS2_EPT)
+ set_cpu_cap(c, X86_FEATURE_EPT);
ERROR: code indent should use tabs where possible
#222: FILE: arch/x86/kernel/cpu/zhaoxin.c:121:
+ set_cpu_cap(c, X86_FEATURE_EPT);$
WARNING: please, no spaces at the start of a line
#222: FILE: arch/x86/kernel/cpu/zhaoxin.c:121:
+ set_cpu_cap(c, X86_FEATURE_EPT);$
WARNING: please, no spaces at the start of a line
#223: FILE: arch/x86/kernel/cpu/zhaoxin.c:122:
+ if (msr_ctl2 & X86_VMX_FEATURE_PROC_CTLS2_VPID)$
WARNING: suspect code indent for conditional statements (6, 10) #223: FILE: arch/x86/kernel/cpu/zhaoxin.c:122:
+ if (msr_ctl2 & X86_VMX_FEATURE_PROC_CTLS2_VPID)
+ set_cpu_cap(c, X86_FEATURE_VPID);
ERROR: code indent should use tabs where possible
#224: FILE: arch/x86/kernel/cpu/zhaoxin.c:123:
+ set_cpu_cap(c, X86_FEATURE_VPID);$
WARNING: please, no spaces at the start of a line
#224: FILE: arch/x86/kernel/cpu/zhaoxin.c:123:
+ set_cpu_cap(c, X86_FEATURE_VPID);$
WARNING: please, no spaces at the start of a line
#225: FILE: arch/x86/kernel/cpu/zhaoxin.c:124:
+ }$
WARNING: please, no spaces at the start of a line
#230: FILE: arch/x86/kernel/cpu/zhaoxin.c:129:
+ early_init_zhaoxin(c);$
WARNING: please, no spaces at the start of a line
#231: FILE: arch/x86/kernel/cpu/zhaoxin.c:130:
+ init_intel_cacheinfo(c);$
WARNING: please, no spaces at the start of a line
#232: FILE: arch/x86/kernel/cpu/zhaoxin.c:131:
+ detect_num_cpu_cores(c);$
WARNING: please, no spaces at the start of a line
#234: FILE: arch/x86/kernel/cpu/zhaoxin.c:133:
+ detect_ht(c);$
WARNING: please, no spaces at the start of a line
#237: FILE: arch/x86/kernel/cpu/zhaoxin.c:136:
+ if (c->cpuid_level > 9) {$
WARNING: suspect code indent for conditional statements (3, 6) #237: FILE: arch/x86/kernel/cpu/zhaoxin.c:136:
+ if (c->cpuid_level > 9) {
+ unsigned int eax = cpuid_eax(10);
WARNING: please, no spaces at the start of a line
#238: FILE: arch/x86/kernel/cpu/zhaoxin.c:137:
+ unsigned int eax = cpuid_eax(10);$
WARNING: Block comments should align the * on each line #241: FILE: arch/x86/kernel/cpu/zhaoxin.c:140:
+ /*
+ * Check for version and the number of counters
WARNING: please, no spaces at the start of a line
#245: FILE: arch/x86/kernel/cpu/zhaoxin.c:144:
+ if ((eax & 0xff) && (((eax >> 8) & 0xff) > 1))$
WARNING: suspect code indent for conditional statements (6, 10) #245: FILE: arch/x86/kernel/cpu/zhaoxin.c:144:
+ if ((eax & 0xff) && (((eax >> 8) & 0xff) > 1))
+ set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON);
ERROR: code indent should use tabs where possible
#246: FILE: arch/x86/kernel/cpu/zhaoxin.c:145:
+ set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON);$
WARNING: please, no spaces at the start of a line
#246: FILE: arch/x86/kernel/cpu/zhaoxin.c:145:
+ set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON);$
WARNING: please, no spaces at the start of a line
#247: FILE: arch/x86/kernel/cpu/zhaoxin.c:146:
+ }$
WARNING: please, no spaces at the start of a line
#249: FILE: arch/x86/kernel/cpu/zhaoxin.c:148:
+ if (c->x86 >= 0x6) {$
WARNING: suspect code indent for conditional statements (3, 6) #249: FILE: arch/x86/kernel/cpu/zhaoxin.c:148:
+ if (c->x86 >= 0x6) {
+ init_zhaoxin_cap(c);
WARNING: braces {} are not necessary for single statement blocks #249: FILE: arch/x86/kernel/cpu/zhaoxin.c:148:
+ if (c->x86 >= 0x6) {
+ init_zhaoxin_cap(c);
+ }
WARNING: please, no spaces at the start of a line
#250: FILE: arch/x86/kernel/cpu/zhaoxin.c:149:
+ init_zhaoxin_cap(c);$
WARNING: please, no spaces at the start of a line
#251: FILE: arch/x86/kernel/cpu/zhaoxin.c:150:
+ }$
WARNING: please, no spaces at the start of a line
#253: FILE: arch/x86/kernel/cpu/zhaoxin.c:152:
+ set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);$
WARNING: please, no spaces at the start of a line
#256: FILE: arch/x86/kernel/cpu/zhaoxin.c:155:
+ if (cpu_has(c, X86_FEATURE_VMX))$
WARNING: suspect code indent for conditional statements (3, 6) #256: FILE: arch/x86/kernel/cpu/zhaoxin.c:155:
+ if (cpu_has(c, X86_FEATURE_VMX))
+ zhaoxin_detect_vmx_virtcap(c);
WARNING: please, no spaces at the start of a line
#257: FILE: arch/x86/kernel/cpu/zhaoxin.c:156:
+ zhaoxin_detect_vmx_virtcap(c);$
WARNING: please, no spaces at the start of a line
#264: FILE: arch/x86/kernel/cpu/zhaoxin.c:163:
+ return size;$
WARNING: please, no spaces at the start of a line
#269: FILE: arch/x86/kernel/cpu/zhaoxin.c:168:
+ .c_vendor = "zhaoxin",$
WARNING: please, no spaces at the start of a line
#270: FILE: arch/x86/kernel/cpu/zhaoxin.c:169:
+ .c_ident = { " Shanghai " },$
WARNING: please, no spaces at the start of a line
#271: FILE: arch/x86/kernel/cpu/zhaoxin.c:170:
+ .c_early_init = early_init_zhaoxin,$
WARNING: please, no spaces at the start of a line
#272: FILE: arch/x86/kernel/cpu/zhaoxin.c:171:
+ .c_init = init_zhaoxin,$
WARNING: please, no spaces at the start of a line
#274: FILE: arch/x86/kernel/cpu/zhaoxin.c:173:
+ .legacy_cache_size = zhaoxin_size_cache,$
WARNING: please, no spaces at the start of a line
#276: FILE: arch/x86/kernel/cpu/zhaoxin.c:175:
+ .c_x86_vendor = X86_VENDOR_ZHAOXIN,$
WARNING: Missing Signed-off-by: line by nominal patch author 'TonyWWang-oc <[email protected]>'
total: 16 errors, 106 warnings, 226 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
NOTE: Whitespace errors detected.
You may wish to use scripts/cleanpatch or scripts/cleanfile
/tmp/tonywwang-oc has style problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
Signature · 4 lines
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply. Srsly.Quoted 7 lines · Borislav Petkov
Quoted 4 lines
This patch is totally corrupted, with leading spaces dropped and tabs turned into spaces. Please read the email client documentation in the kernel directory for how to fix your email client, or just use 'git send-email' to send the patches out directly.
.. and before you do that, run them all through checkpatch.pl and apply common sense when fixing the warnings from it:
Ok, I will run my patches through checkpatch.pl and modify them properly before resend.
Thanks
TonyWWang-oc
Quoted 8 lines · On Thu, May 23, 2019, [email protected] wrote:
Quoted 4 lines
To identify Zhaoxin CPU, add a new vendor type
X86_VENDOR_ZHAOXINfor system recognition.Signed-off-by TonyWWang <[email protected]>Some basic patch tips. Your From: line needs to match the signed-off-by line, which is not true here. Also, please use your name with ' ' characters.
Thank you, I will follow these tips.
Quoted 13 lines
Review
Quoted 8 lines
(quoted diff) +7
-0+static void init_zhaoxin_cap(struct cpuinfo_x86 *c) +{ + u32 lo, hi; + + /* Test for Extended Feature Flags presence */ + if (cpuid_eax(0xC0000000) >= 0xC0000001) { + u32 tmp = cpuid_edx(0xC0000001);This patch is totally corrupted, with leading spaces dropped and tabs turned into spaces. Please read the email client documentation in the kernel directory for how to fix your email client, or just use 'git send-email' to send the patches out directly.
Sorry for that! I was made a mistake to send the patch with HTML format. I will set up my email client correctly.
Thanks
TonyWWang-oc
arch/x86/kernel/cpu/zhaoxin.c line 10
Quoted 13 lines · TonyWWang-oc
arch/x86/kernel/cpu/zhaoxin.c new file +10
-0@@ -0,0 +1,178 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Zhaoxin Processor Support for Linux +* +* Copyright (c) 2019 Shanghai Zhaoxin Semiconductor Co., Ltd. +* +* Author: David Wang <[email protected]> +* +* This file is licensed under the terms of the GNU General +* License v2.0 or later. See file COPYING for details.
Please remove this boilerplate text. The SPDX license identifier is sufficient, but looking at that:
arch/x86/kernel/cpu/zhaoxin.c line 11
Quoted 1 line
arch/x86/kernel/cpu/zhaoxin.c new file +1
-0+// SPDX-License-Identifier: GPL-2.0
That clearly disagrees with your boilerplate text which says 'v2.0 or later'. Assumed that you want or later, then the SPDX id needs to say so.
// SPDX-License-Identifier: GPL-2.0-or-later
Thanks,
tglx
Quoted 6 lines · Thomas Gleixner
Quoted 2 lines
+ * This file is licensed under the terms of the GNU General
+ * License v2.0 or later. See file COPYING for details.Please remove this boilerplate text. The SPDX license identifier is sufficient, but looking at that:
Quoted 6 lines
Quoted 1 line
+// SPDX-License-Identifier: GPL-2.0
That clearly disagrees with your boilerplate text which says 'v2.0 or later'. Assumed that you want or later, then the SPDX id needs to say so.
// SPDX-License-Identifier: GPL-2.0-or-later
Ok, I will adjust this text after sort this out with our lawyers.
Thanks
TonyWWang-oc