All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Joe Perches <joe@perches.com>
Cc: Khalid Aziz <khalid.aziz@oracle.com>,
	davem@davemloft.net, dave.hansen@linux.intel.com,
	mhocko@suse.com, mingo@kernel.org, gregkh@linuxfoundation.org,
	glx@linutronix.de, kstewart@linuxfoundation.org,
	vijay.ac.kumar@oracle.com, kirill.shutemov@linux.intel.com,
	nitin.m.gupta@oracle.com, tom.hromatka@oracle.com,
	allen.pais@oracle.com, rob.gardner@oracle.com,
	david.j.aldridge@oracle.com, babu.moger@oracle.com,
	bob.picco@oracle.com, steven.sistare@oracle.com,
	pasha.tatashin@oracle.com, vegard.nossum@oracle.com,
	pombredanne@nexb.com, jane.chu@oracle.com,
	anthony.yznaga@oracle.com, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org, Khalid Aziz <khalid@gonehiking.org>
Subject: Re: [PATCH v11 03/10] sparc64: Add support for ADI register fields, ASIs and traps
Date: Thu, 01 Feb 2018 21:49:32 +0000	[thread overview]
Message-ID: <20180201214932.GA25218@ravnborg.org> (raw)
In-Reply-To: <1517517122.7489.47.camel@perches.com>

> >  #define _PAGE_E_4V	  _AC(0x0000000000000800,UL) /* side-Effect          */
> >  #define _PAGE_CP_4V	  _AC(0x0000000000000400,UL) /* Cacheable in P-Cache */
> >  #define _PAGE_CV_4V	  _AC(0x0000000000000200,UL) /* Cacheable in V-Cache */
> > +/* Bit 9 is used to enable MCD corruption detection instead on M7 */
> > +#define _PAGE_MCD_4V      _AC(0x0000000000000200,UL) /* Memory Corruption    */
> 
> trivia:
> 
> There are some whitespace alignment issues here
Looks like you are fouled by the use of tabs.
When you apply the patch it is fine.

> 
> > diff --git a/arch/sparc/include/asm/ttable.h b/arch/sparc/include/asm/ttable.h
> []
> > @@ -219,6 +219,16 @@
> >  	nop;						\
> >  	nop;
> >  
> > +#define SUN4V_MCD_PRECISE				\
> > +	ldxa	[%g0] ASI_SCRATCHPAD, %g2;		\
> > +	ldx	[%g2 + HV_FAULT_D_ADDR_OFFSET], %g4;	\
> > +	ldx	[%g2 + HV_FAULT_D_CTX_OFFSET], %g5;	\
> > +	ba,pt	%xcc, etrap;				\
> > +	 rd	%pc, %g7;				\
> > +	ba,pt	%xcc, sun4v_mcd_detect_precise;		\
> > +	 nop;						\
> > +	nop;
> 
> and here and elsewhere.
> 
> It would be nicer to make all these use
> similar indentation.

The patch uses the sparc idiom to indent instructions
in the delay slot after a branch with one space.
So the space before the nop is mandatory and not a bug.

	Sam

WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org>
To: Joe Perches <joe@perches.com>
Cc: Khalid Aziz <khalid.aziz@oracle.com>,
	davem@davemloft.net, dave.hansen@linux.intel.com,
	mhocko@suse.com, mingo@kernel.org, gregkh@linuxfoundation.org,
	glx@linutronix.de, kstewart@linuxfoundation.org,
	vijay.ac.kumar@oracle.com, kirill.shutemov@linux.intel.com,
	nitin.m.gupta@oracle.com, tom.hromatka@oracle.com,
	allen.pais@oracle.com, rob.gardner@oracle.com,
	david.j.aldridge@oracle.com, babu.moger@oracle.com,
	bob.picco@oracle.com, steven.sistare@oracle.com,
	pasha.tatashin@oracle.com, vegard.nossum@oracle.com,
	pombredanne@nexb.com, jane.chu@oracle.com,
	anthony.yznaga@oracle.com, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org, Khalid Aziz <khalid@gonehiking.org>
Subject: Re: [PATCH v11 03/10] sparc64: Add support for ADI register fields, ASIs and traps
Date: Thu, 1 Feb 2018 22:49:32 +0100	[thread overview]
Message-ID: <20180201214932.GA25218@ravnborg.org> (raw)
In-Reply-To: <1517517122.7489.47.camel@perches.com>

> >  #define _PAGE_E_4V	  _AC(0x0000000000000800,UL) /* side-Effect          */
> >  #define _PAGE_CP_4V	  _AC(0x0000000000000400,UL) /* Cacheable in P-Cache */
> >  #define _PAGE_CV_4V	  _AC(0x0000000000000200,UL) /* Cacheable in V-Cache */
> > +/* Bit 9 is used to enable MCD corruption detection instead on M7 */
> > +#define _PAGE_MCD_4V      _AC(0x0000000000000200,UL) /* Memory Corruption    */
> 
> trivia:
> 
> There are some whitespace alignment issues here
Looks like you are fouled by the use of tabs.
When you apply the patch it is fine.

> 
> > diff --git a/arch/sparc/include/asm/ttable.h b/arch/sparc/include/asm/ttable.h
> []
> > @@ -219,6 +219,16 @@
> >  	nop;						\
> >  	nop;
> >  
> > +#define SUN4V_MCD_PRECISE				\
> > +	ldxa	[%g0] ASI_SCRATCHPAD, %g2;		\
> > +	ldx	[%g2 + HV_FAULT_D_ADDR_OFFSET], %g4;	\
> > +	ldx	[%g2 + HV_FAULT_D_CTX_OFFSET], %g5;	\
> > +	ba,pt	%xcc, etrap;				\
> > +	 rd	%pc, %g7;				\
> > +	ba,pt	%xcc, sun4v_mcd_detect_precise;		\
> > +	 nop;						\
> > +	nop;
> 
> and here and elsewhere.
> 
> It would be nicer to make all these use
> similar indentation.

The patch uses the sparc idiom to indent instructions
in the delay slot after a branch with one space.
So the space before the nop is mandatory and not a bug.

	Sam

  parent reply	other threads:[~2018-02-01 21:49 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01 18:01 [PATCH v11 00/10] Application Data Integrity feature introduced by SPARC M7 Khalid Aziz
2018-02-01 18:01 ` Khalid Aziz
2018-02-01 18:01 ` Khalid Aziz
2018-02-01 18:01 ` Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 01/10] signals, sparc: Add signal codes for ADI violations Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 02/10] mm, swap: Add infrastructure for saving page metadata on swap Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 03/10] sparc64: Add support for ADI register fields, ASIs and traps Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 20:32   ` Joe Perches
2018-02-01 20:32     ` Joe Perches
2018-02-01 20:39     ` David Miller
2018-02-01 20:39       ` David Miller
2018-02-01 22:09       ` Joe Perches
2018-02-01 22:09         ` Joe Perches
2018-02-01 21:49     ` Sam Ravnborg [this message]
2018-02-01 21:49       ` Sam Ravnborg
2018-02-01 18:01 ` [PATCH v11 04/10] sparc64: Add HV fault type handlers for ADI related faults Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 05/10] sparc64: Add handler for "Memory Corruption Detected" trap Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 06/10] sparc64: Add auxiliary vectors to report platform ADI properties Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 07/10] mm: Add address parameter to arch_validate_prot() Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 08/10] mm: Clear arch specific VM flags on protection change Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 09/10] mm: Allow arch code to override copy_highpage() Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 10/10] sparc64: Add support for ADI (Application Data Integrity) Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-01 18:01   ` Khalid Aziz
2018-02-02  2:29 ` [PATCH v11 00/10] Application Data Integrity feature introduced by SPARC M7 Eric W. Biederman
2018-02-02  2:29   ` Eric W. Biederman
2018-02-02  2:29   ` Eric W. Biederman
2018-02-02  2:29   ` Eric W. Biederman
2018-02-02 14:13   ` Steven Sistare
2018-02-02 14:13     ` Steven Sistare
2018-02-02 14:13     ` Steven Sistare
2018-02-02 14:13     ` Steven Sistare
2018-02-02 14:59   ` Khalid Aziz
2018-02-02 14:59     ` Khalid Aziz
2018-02-02 14:59     ` Khalid Aziz
2018-02-02 14:59     ` Khalid Aziz
2018-02-07  7:38     ` Eric W. Biederman
2018-02-07  7:38       ` Eric W. Biederman
2018-02-07  7:38       ` Eric W. Biederman
2018-02-07  7:38       ` Eric W. Biederman
2018-02-07 16:04       ` Khalid Aziz
2018-02-07 16:04         ` Khalid Aziz
2018-02-07 16:04         ` Khalid Aziz
2018-02-07 16:04         ` Khalid Aziz
2018-02-07 17:42         ` Eric W. Biederman
2018-02-07 17:42           ` Eric W. Biederman
2018-02-07 17:42           ` Eric W. Biederman
2018-02-07 17:42           ` Eric W. Biederman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180201214932.GA25218@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=allen.pais@oracle.com \
    --cc=anthony.yznaga@oracle.com \
    --cc=babu.moger@oracle.com \
    --cc=bob.picco@oracle.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=david.j.aldridge@oracle.com \
    --cc=glx@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jane.chu@oracle.com \
    --cc=joe@perches.com \
    --cc=khalid.aziz@oracle.com \
    --cc=khalid@gonehiking.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=mingo@kernel.org \
    --cc=nitin.m.gupta@oracle.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=pombredanne@nexb.com \
    --cc=rob.gardner@oracle.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=steven.sistare@oracle.com \
    --cc=tom.hromatka@oracle.com \
    --cc=vegard.nossum@oracle.com \
    --cc=vijay.ac.kumar@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.