From: Joe Perches <joe@perches.com>
To: David Miller <davem@davemloft.net>, Sam Ravnborg <sam@ravnborg.org>
Cc: khalid.aziz@oracle.com, dave.hansen@linux.intel.com,
mhocko@suse.com, mingo@kernel.org, gregkh@linuxfoundation.org,
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@gonehiking.org
Subject: Re: [PATCH v11 03/10] sparc64: Add support for ADI register fields, ASIs and traps
Date: Thu, 01 Feb 2018 14:09:30 -0800 [thread overview]
Message-ID: <1517522970.7489.72.camel@perches.com> (raw)
In-Reply-To: <20180201.153903.1719756519690647679.davem@davemloft.net>
On Thu, 2018-02-01 at 15:39 -0500, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> Date: Thu, 01 Feb 2018 12:32:02 -0800
>
> >> 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.
>
> Joe, this is intentional in Sparc assembler.
>
> Branches on sparc have delay slots, and this is annotated by indenting
> the delay slot instruction one space more than the branch preceeding
> it.
OK, that is new to me and seems a sensible convention.
btw:
There seem to be only a few instances where that
convention is not followed in arch/sparc/...
(maybe some missing or false positives below)
$ git ls-files arch/sparc/ | \
xargs grep-2.5.4 -P -n '^([ \t]+)b\w+,p.*\n\1[^ ]\S' | \
perl -p -e 's/(:\d+:)/\1\n/'
arch/sparc/include/asm/tsb.h:168:
brz,pn REG1, FAIL_LABEL; \
sethi %uhi(_PAGE_PUD_HUGE), REG2; \
arch/sparc/include/asm/ttable.h:281:
ba,pt %xcc, etrap_save; \
wrpr %g1, %cwp; \
arch/sparc/kernel/head_64.S:472:
bne,pn %icc, 49f
add %g7, 1, %g7
arch/sparc/kernel/head_64.S:474:
bne,pt %xcc, 41b
add %g1, 1, %g1
arch/sparc/kernel/rtrap_64.S:72:
ba,pt %xcc, rtrap_no_irq_enable
nop
arch/sparc/kernel/rtrap_64.S:161:
brz,pt %l3, 1f
mov %g6, %l2
arch/sparc/lib/GENmemcpy.S:100:
bne,pt %XCC, 1b
add %o0, 1, %o0
arch/sparc/lib/M7memcpy.S:896:
bgu,pt %xcc, .Lsmallnotalign4 ! loop til 3 or fewer bytes remain
EX_ST(STORE(stb, %o3, %o0-1), memcpy_retl_o2_plus_4)
arch/sparc/lib/M7memcpy.S:902:
bz,pt %xcc, .Lsmallx
EX_ST(STORE(stb, %o3, %o0), memcpy_retl_o2_plus_1) ! store one byte
arch/sparc/lib/M7memcpy.S:905:
bz,pt %xcc, .Lsmallx
EX_ST(STORE(stb, %o3, %o0+1), memcpy_retl_o2_plus_1)! store second byte
arch/sparc/lib/NG2memcpy.S:299:
bne,pt %XCC, 1b
add %o0, 1, %o0
arch/sparc/lib/NG4fls.S:23:
brz,pn %o0, 1f
LZCNT_O0_G2 !lzcnt %o0, %g2
arch/sparc/lib/NGmemcpy.S:216:
bne,pt %XCC, 1b
add %o0, 1, %o0
arch/sparc/lib/csum_copy.S:103:
ba,pt %xcc, 1f
LOAD(prefetch, %o0 + 0x140, #n_reads)
next prev parent reply other threads:[~2018-02-01 22:09 UTC|newest]
Thread overview: 21+ 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 ` [PATCH v11 01/10] signals, sparc: Add signal codes for ADI violations 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 ` [PATCH v11 03/10] sparc64: Add support for ADI register fields, ASIs and traps Khalid Aziz
2018-02-01 20:32 ` Joe Perches
2018-02-01 20:39 ` David Miller
2018-02-01 22:09 ` Joe Perches [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 ` [PATCH v11 05/10] sparc64: Add handler for "Memory Corruption Detected" trap 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 ` [PATCH v11 07/10] mm: Add address parameter to arch_validate_prot() 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 ` [PATCH v11 09/10] mm: Allow arch code to override copy_highpage() Khalid Aziz
2018-02-01 18:01 ` [PATCH v11 10/10] sparc64: Add support for ADI (Application Data Integrity) 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 14:13 ` Steven Sistare
2018-02-02 14:59 ` Khalid Aziz
2018-02-07 7:38 ` Eric W. Biederman
2018-02-07 16:04 ` Khalid Aziz
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=1517522970.7489.72.camel@perches.com \
--to=joe@perches.com \
--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=gregkh@linuxfoundation.org \
--cc=jane.chu@oracle.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=sam@ravnborg.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome