All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file
       [not found] <b3b31fab04814140b1feb13887c4aa2a@zhaoxin.com>
@ 2019-05-23 10:18 ` gregkh
  2019-05-23 10:19 ` gregkh
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: gregkh @ 2019-05-23 10:18 UTC (permalink / raw)
  To: TonyWWang-oc
  Cc: tglx, mingo, hpa, x86, linux-kernel, rjw, lenb, David Wang,
	Cooper Yan(BJ-RD), Qiyuan Wang(BJ-RD), Herry Yang(BJ-RD)

On Thu, May 23, 2019 at 10:10:52AM +0000, TonyWWang-oc wrote:
> 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_ZHAOXIN
> for system recognition.
> 
> Signed-off-by: TonyWWang <TonyWWang-oc@zhaoxin.com>
> ---
> 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.c
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 0c55b0f..cab21a4 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -17460,6 +17460,12 @@ Q: https://patchwork.linuxtv.org/project/linux-media/list/
> S: Maintained
> F: drivers/media/dvb-frontends/zd1301_demod*
> +ZHAOXIN PROCESSOR SUPPORT
> +M: TonyWWang <TonyWWang-oc@zhaoxin.com>
> +L: linux-kernel@vger.kernel.org
> +S: Maintained
> +F: arch/x86/kernel/cpu/zhaoxin.c
> +
> ZPOOL COMPRESSED PAGE STORAGE API
> M: Dan Streetman <ddstreet@ieee.org>
> L: linux-mm@kvack.org

I think your email client ate the leading space here :(

Anyway, you need a blank line before your entry.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file
       [not found] <b3b31fab04814140b1feb13887c4aa2a@zhaoxin.com>
  2019-05-23 10:18 ` [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file gregkh
@ 2019-05-23 10:19 ` gregkh
  2019-05-24  8:26   ` 答复: " TonyWWang-oc
  2019-05-23 10:24 ` gregkh
  2019-05-23 13:19 ` Thomas Gleixner
  3 siblings, 1 reply; 9+ messages in thread
From: gregkh @ 2019-05-23 10:19 UTC (permalink / raw)
  To: TonyWWang-oc
  Cc: tglx, mingo, hpa, x86, linux-kernel, rjw, lenb, David Wang,
	Cooper Yan(BJ-RD), Qiyuan Wang(BJ-RD), Herry Yang(BJ-RD)

On Thu, May 23, 2019 at 10:10:52AM +0000, TonyWWang-oc wrote:
> --- /dev/null
> +++ b/arch/x86/kernel/cpu/zhaoxin.c
> @@ -0,0 +1,178 @@
> +// SPDX-License-Identifier: GPL-2.0

Nice, but:

> +/*
> + * Zhaoxin Processor Support for Linux
> + *
> + * Copyright (c) 2019 Shanghai Zhaoxin Semiconductor Co., Ltd.
> + *
> + * Author: David Wang <davidwang@zhaoxin.com>
> + *
> + * 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file
       [not found] <b3b31fab04814140b1feb13887c4aa2a@zhaoxin.com>
  2019-05-23 10:18 ` [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file gregkh
  2019-05-23 10:19 ` gregkh
@ 2019-05-23 10:24 ` gregkh
  2019-05-23 11:40   ` Borislav Petkov
  2019-05-24  8:28   ` TonyWWang-oc
  2019-05-23 13:19 ` Thomas Gleixner
  3 siblings, 2 replies; 9+ messages in thread
From: gregkh @ 2019-05-23 10:24 UTC (permalink / raw)
  To: TonyWWang-oc
  Cc: tglx, mingo, hpa, x86, linux-kernel, rjw, lenb, David Wang,
	Cooper Yan(BJ-RD), Qiyuan Wang(BJ-RD), Herry Yang(BJ-RD)

On Thu, May 23, 2019 at 10:10:52AM +0000, TonyWWang-oc wrote:
> 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_ZHAOXIN
> for system recognition.
> 
> Signed-off-by: TonyWWang <TonyWWang-oc@zhaoxin.com>

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.

> +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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file
  2019-05-23 10:24 ` gregkh
@ 2019-05-23 11:40   ` Borislav Petkov
  2019-05-24  8:30     ` 答复: " TonyWWang-oc
  2019-05-24  8:28   ` TonyWWang-oc
  1 sibling, 1 reply; 9+ messages in thread
From: Borislav Petkov @ 2019-05-23 11:40 UTC (permalink / raw)
  To: gregkh
  Cc: TonyWWang-oc, tglx, mingo, hpa, x86, linux-kernel, rjw, lenb,
	David Wang, Cooper Yan(BJ-RD), Qiyuan Wang(BJ-RD),
	Herry Yang(BJ-RD)

On Thu, May 23, 2019 at 12:24:17PM +0200, gregkh@linuxfoundation.org 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 <TonyWWang-oc@zhaoxin.com>

WARNING: MAINTAINERS entries use one tab after TYPE:
#46: FILE: MAINTAINERS:17462:
+L: linux-kernel@vger.kernel.org

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 <TonyWWang-oc@zhaoxin.com>'

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.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply. Srsly.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file
       [not found] <b3b31fab04814140b1feb13887c4aa2a@zhaoxin.com>
                   ` (2 preceding siblings ...)
  2019-05-23 10:24 ` gregkh
@ 2019-05-23 13:19 ` Thomas Gleixner
  2019-05-24  8:32   ` 答复: " TonyWWang-oc
  3 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2019-05-23 13:19 UTC (permalink / raw)
  To: TonyWWang-oc
  Cc: mingo, hpa, x86, gregkh, linux-kernel, rjw, lenb, David Wang,
	Cooper Yan(BJ-RD), Qiyuan Wang(BJ-RD), Herry Yang(BJ-RD)

On Thu, 23 May 2019, TonyWWang-oc wrote:
> --- /dev/null
> +++ b/arch/x86/kernel/cpu/zhaoxin.c
> @@ -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 <davidwang@zhaoxin.com>
> + *
> + * 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:

> +// 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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* 答复: [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file
  2019-05-23 10:19 ` gregkh
@ 2019-05-24  8:26   ` TonyWWang-oc
  0 siblings, 0 replies; 9+ messages in thread
From: TonyWWang-oc @ 2019-05-24  8:26 UTC (permalink / raw)
  To: gregkh
  Cc: tglx, mingo, hpa, x86, linux-kernel, rjw, lenb, David Wang,
	Cooper Yan(BJ-RD), Qiyuan Wang(BJ-RD), Herry Yang(BJ-RD)

On Thu, May 23, 2019, gregkh@linuxfoundation.org wrote:
>> + * 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 答复: [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file
  2019-05-23 10:24 ` gregkh
  2019-05-23 11:40   ` Borislav Petkov
@ 2019-05-24  8:28   ` TonyWWang-oc
  1 sibling, 0 replies; 9+ messages in thread
From: TonyWWang-oc @ 2019-05-24  8:28 UTC (permalink / raw)
  To: gregkh
  Cc: tglx, mingo, hpa, x86, linux-kernel, rjw, lenb, David Wang,
	Cooper Yan(BJ-RD), Qiyuan Wang(BJ-RD), Herry Yang(BJ-RD)

On Thu, May 23, 2019, gregkh@linuxfoundation.org wrote:
>> To identify Zhaoxin CPU, add a new vendor type X86_VENDOR_ZHAOXIN
>> for system recognition.
>> 
>> Signed-off-by: TonyWWang <TonyWWang-oc@zhaoxin.com>
>
>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. 

>
>> +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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 答复: [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file
  2019-05-23 11:40   ` Borislav Petkov
@ 2019-05-24  8:30     ` TonyWWang-oc
  0 siblings, 0 replies; 9+ messages in thread
From: TonyWWang-oc @ 2019-05-24  8:30 UTC (permalink / raw)
  To: Borislav Petkov, gregkh
  Cc: tglx, mingo, hpa, x86, linux-kernel, rjw, lenb, David Wang,
	Cooper Yan(BJ-RD), Qiyuan Wang(BJ-RD), Herry Yang(BJ-RD)

On Thu, May 23, 2019, Borislav Petkov 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:

Ok, I will run my patches through checkpatch.pl and modify them properly
before resend.

Thanks
TonyWWang-oc

^ permalink raw reply	[flat|nested] 9+ messages in thread

* 答复: [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file
  2019-05-23 13:19 ` Thomas Gleixner
@ 2019-05-24  8:32   ` TonyWWang-oc
  0 siblings, 0 replies; 9+ messages in thread
From: TonyWWang-oc @ 2019-05-24  8:32 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: mingo, hpa, x86, gregkh, linux-kernel, rjw, lenb, David Wang,
	Cooper Yan(BJ-RD), Qiyuan Wang(BJ-RD), Herry Yang(BJ-RD)

On Thu, May 23, 2019, Thomas Gleixner wrote:
>> + * 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:
>
>> +// 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-05-24  8:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <b3b31fab04814140b1feb13887c4aa2a@zhaoxin.com>
2019-05-23 10:18 ` [PATCH v1 1/3] x86/cpu: Create Zhaoxin processors architecture support file gregkh
2019-05-23 10:19 ` gregkh
2019-05-24  8:26   ` 答复: " TonyWWang-oc
2019-05-23 10:24 ` gregkh
2019-05-23 11:40   ` Borislav Petkov
2019-05-24  8:30     ` 答复: " TonyWWang-oc
2019-05-24  8:28   ` TonyWWang-oc
2019-05-23 13:19 ` Thomas Gleixner
2019-05-24  8:32   ` 答复: " TonyWWang-oc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.