Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-24 Thread H. Peter Anvin
On 02/24/2015 01:48 PM, Ross Zwisler wrote: > On Tue, 2015-02-24 at 13:41 -0800, H. Peter Anvin wrote: >> On 02/24/2015 01:40 PM, H. Peter Anvin wrote: >>> On 02/24/2015 01:30 AM, Borislav Petkov wrote: On Mon, Feb 23, 2015 at 03:14:01PM -0800, H. Peter Anvin wrote: > That may cause the

Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-24 Thread Ross Zwisler
On Tue, 2015-02-24 at 13:41 -0800, H. Peter Anvin wrote: > On 02/24/2015 01:40 PM, H. Peter Anvin wrote: > > On 02/24/2015 01:30 AM, Borislav Petkov wrote: > >> On Mon, Feb 23, 2015 at 03:14:01PM -0800, H. Peter Anvin wrote: > >>> That may cause the same line to be flushed twice. I would suggest,

Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-24 Thread H. Peter Anvin
On 02/24/2015 01:40 PM, H. Peter Anvin wrote: > On 02/24/2015 01:30 AM, Borislav Petkov wrote: >> On Mon, Feb 23, 2015 at 03:14:01PM -0800, H. Peter Anvin wrote: >>> That may cause the same line to be flushed twice. I would suggest, >>> instead, also removing the arithmetic on void *: >> >> Btw,

Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-24 Thread H. Peter Anvin
On 02/24/2015 01:30 AM, Borislav Petkov wrote: > On Mon, Feb 23, 2015 at 03:14:01PM -0800, H. Peter Anvin wrote: >> That may cause the same line to be flushed twice. I would suggest, >> instead, also removing the arithmetic on void *: > > Btw, should we hold down all those suggested usages

Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-24 Thread Borislav Petkov
On Mon, Feb 23, 2015 at 03:14:01PM -0800, H. Peter Anvin wrote: > That may cause the same line to be flushed twice. I would suggest, > instead, also removing the arithmetic on void *: Btw, should we hold down all those suggested usages somewhere in Documentation/x86/ as commit messages are

Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-24 Thread H. Peter Anvin
On 02/24/2015 01:40 PM, H. Peter Anvin wrote: On 02/24/2015 01:30 AM, Borislav Petkov wrote: On Mon, Feb 23, 2015 at 03:14:01PM -0800, H. Peter Anvin wrote: That may cause the same line to be flushed twice. I would suggest, instead, also removing the arithmetic on void *: Btw, should we

Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-24 Thread H. Peter Anvin
On 02/24/2015 01:30 AM, Borislav Petkov wrote: On Mon, Feb 23, 2015 at 03:14:01PM -0800, H. Peter Anvin wrote: That may cause the same line to be flushed twice. I would suggest, instead, also removing the arithmetic on void *: Btw, should we hold down all those suggested usages somewhere in

Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-24 Thread H. Peter Anvin
On 02/24/2015 01:48 PM, Ross Zwisler wrote: On Tue, 2015-02-24 at 13:41 -0800, H. Peter Anvin wrote: On 02/24/2015 01:40 PM, H. Peter Anvin wrote: On 02/24/2015 01:30 AM, Borislav Petkov wrote: On Mon, Feb 23, 2015 at 03:14:01PM -0800, H. Peter Anvin wrote: That may cause the same line to be

Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-24 Thread Ross Zwisler
On Tue, 2015-02-24 at 13:41 -0800, H. Peter Anvin wrote: On 02/24/2015 01:40 PM, H. Peter Anvin wrote: On 02/24/2015 01:30 AM, Borislav Petkov wrote: On Mon, Feb 23, 2015 at 03:14:01PM -0800, H. Peter Anvin wrote: That may cause the same line to be flushed twice. I would suggest,

Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-24 Thread Borislav Petkov
On Mon, Feb 23, 2015 at 03:14:01PM -0800, H. Peter Anvin wrote: That may cause the same line to be flushed twice. I would suggest, instead, also removing the arithmetic on void *: Btw, should we hold down all those suggested usages somewhere in Documentation/x86/ as commit messages are

Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-23 Thread H. Peter Anvin
On 02/20/2015 02:31 AM, tip-bot for Ross Zwisler wrote: > > This function shows how to properly use clwb/clflushopt/clflush > and pcommit with appropriate fencing: > > void flush_and_commit_buffer(void *vaddr, unsigned int size) > { > void *vend = vaddr + size - 1; > > for (; vaddr

Re: [tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-23 Thread H. Peter Anvin
On 02/20/2015 02:31 AM, tip-bot for Ross Zwisler wrote: This function shows how to properly use clwb/clflushopt/clflush and pcommit with appropriate fencing: void flush_and_commit_buffer(void *vaddr, unsigned int size) { void *vend = vaddr + size - 1; for (; vaddr vend;

[tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-20 Thread tip-bot for Ross Zwisler
Commit-ID: 719d359dc7b6be3e43d6661f192ceb980b10ee26 Gitweb: http://git.kernel.org/tip/719d359dc7b6be3e43d6661f192ceb980b10ee26 Author: Ross Zwisler AuthorDate: Thu, 19 Feb 2015 10:37:28 -0700 Committer: Ingo Molnar CommitDate: Fri, 20 Feb 2015 09:43:36 +0100 x86/asm: Add support for

[tip:x86/asm] x86/asm: Add support for the pcommit instruction

2015-02-20 Thread tip-bot for Ross Zwisler
Commit-ID: 719d359dc7b6be3e43d6661f192ceb980b10ee26 Gitweb: http://git.kernel.org/tip/719d359dc7b6be3e43d6661f192ceb980b10ee26 Author: Ross Zwisler ross.zwis...@linux.intel.com AuthorDate: Thu, 19 Feb 2015 10:37:28 -0700 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 20 Feb