linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Tong Tiangen <tongtiangen@huawei.com>,
	Mark Rutland <mark.rutland@arm.com>,
	James Morse <james.morse@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Xie XiuQi <xiexiuqi@huawei.com>
Subject: Re: [RFC PATCH -next V3 6/6] arm64: add cow to machine check safe
Date: Tue, 12 Apr 2022 17:39:04 +0100	[thread overview]
Message-ID: <a58b640d-e12a-7b9d-2ab0-d95a3ae6950e@arm.com> (raw)
In-Reply-To: <20220412072552.2526871-7-tongtiangen@huawei.com>

On 12/04/2022 8:25 am, Tong Tiangen wrote:
[...]
> +100:	ldp	x2, x3, [x1]
> +101:	ldp	x4, x5, [x1, #16]
> +102:	ldp	x6, x7, [x1, #32]
> +103:	ldp	x8, x9, [x1, #48]
> +104:	ldp	x10, x11, [x1, #64]
> +105:	ldp	x12, x13, [x1, #80]
> +106:	ldp	x14, x15, [x1, #96]
> +107:	ldp	x16, x17, [x1, #112]
> +
> +	add	x0, x0, #256
> +	add	x1, x1, #128
> +1:
> +	tst	x0, #(PAGE_SIZE - 1)
> +
> +alternative_if ARM64_HAS_NO_HW_PREFETCH
> +	prfm	pldl1strm, [x1, #384]
> +alternative_else_nop_endif
> +
> +	stnp	x2, x3, [x0, #-256]
> +200:	ldp	x2, x3, [x1]
> +	stnp	x4, x5, [x0, #16 - 256]
> +201:	ldp	x4, x5, [x1, #16]
> +	stnp	x6, x7, [x0, #32 - 256]
> +202:	ldp	x6, x7, [x1, #32]
> +	stnp	x8, x9, [x0, #48 - 256]
> +203:	ldp	x8, x9, [x1, #48]
> +	stnp	x10, x11, [x0, #64 - 256]
> +204:	ldp	x10, x11, [x1, #64]
> +	stnp	x12, x13, [x0, #80 - 256]
> +205:	ldp	x12, x13, [x1, #80]
> +	stnp	x14, x15, [x0, #96 - 256]
> +206:	ldp	x14, x15, [x1, #96]
> +	stnp	x16, x17, [x0, #112 - 256]
> +207:	ldp	x16, x17, [x1, #112]
> +
> +	add	x0, x0, #128
> +	add	x1, x1, #128
> +
> +	b.ne	1b
> +
> +	stnp	x2, x3, [x0, #-256]
> +	stnp	x4, x5, [x0, #16 - 256]
> +	stnp	x6, x7, [x0, #32 - 256]
> +	stnp	x8, x9, [x0, #48 - 256]
> +	stnp	x10, x11, [x0, #64 - 256]
> +	stnp	x12, x13, [x0, #80 - 256]
> +	stnp	x14, x15, [x0, #96 - 256]
> +	stnp	x16, x17, [x0, #112 - 256]
> +
> +300:	ret
> +
> +_asm_extable_copy_page_mc 100b, 300b
> +_asm_extable_copy_page_mc 101b, 300b
> +_asm_extable_copy_page_mc 102b, 300b
> +_asm_extable_copy_page_mc 103b, 300b
> +_asm_extable_copy_page_mc 104b, 300b
> +_asm_extable_copy_page_mc 105b, 300b
> +_asm_extable_copy_page_mc 106b, 300b
> +_asm_extable_copy_page_mc 107b, 300b
> +_asm_extable_copy_page_mc 200b, 300b
> +_asm_extable_copy_page_mc 201b, 300b
> +_asm_extable_copy_page_mc 202b, 300b
> +_asm_extable_copy_page_mc 203b, 300b
> +_asm_extable_copy_page_mc 204b, 300b
> +_asm_extable_copy_page_mc 205b, 300b
> +_asm_extable_copy_page_mc 206b, 300b
> +_asm_extable_copy_page_mc 207b, 300b


Please add a USER_MC() macro to parallel the existing USER() one (we can 
worry about names and eventually consolidating things later), then use 
that to save all the label mess here.

Thanks,
Robin.


      reply	other threads:[~2022-04-12 16:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  7:25 [RFC PATCH -next V3 0/6]arm64: add machine check safe support Tong Tiangen
2022-04-12  7:25 ` [RFC PATCH -next V3 1/6] x86: fix function define in copy_mc_to_user Tong Tiangen
2022-04-12 11:49   ` Kefeng Wang
2022-04-13  6:01     ` Tong Tiangen
2022-04-12  7:25 ` [RFC PATCH -next V3 2/6] arm64: fix types in copy_highpage() Tong Tiangen
2022-04-12 11:50   ` Kefeng Wang
2022-04-12  7:25 ` [RFC PATCH -next V3 3/6] arm64: add support for machine check error safe Tong Tiangen
2022-04-12 13:08   ` Kefeng Wang
2022-04-13 14:41     ` Tong Tiangen
2022-04-12  7:25 ` [RFC PATCH -next V3 4/6] arm64: add copy_{to, from}_user to machine check safe Tong Tiangen
2022-04-12 17:08   ` Robin Murphy
2022-04-12 17:17     ` Robin Murphy
2022-04-16  7:41       ` Tong Tiangen
2022-04-13  6:36     ` Tong Tiangen
2022-04-13  7:30     ` Tong Tiangen
2022-04-12  7:25 ` [RFC PATCH -next V3 5/6] arm64: add {get, put}_user " Tong Tiangen
2022-04-12  7:25 ` [RFC PATCH -next V3 6/6] arm64: add cow " Tong Tiangen
2022-04-12 16:39   ` Robin Murphy [this message]

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=a58b640d-e12a-7b9d-2ab0-d95a3ae6950e@arm.com \
    --to=robin.murphy@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tongtiangen@huawei.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wangkefeng.wang@huawei.com \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=xiexiuqi@huawei.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