[PATCH] lib/raid6: Add AVX2 optimized recovery functions

2012-11-08 Thread Jim Kukunas
Optimize RAID6 recovery functions to take advantage of the 256-bit YMM integer instructions introduced in AVX2. Signed-off-by: Jim Kukunas --- arch/x86/Makefile | 5 +- include/linux/raid/pq.h | 1 + lib/raid6/Makefile | 2 +- lib/raid6/algos.c | 3 + lib/raid6

Re: [PATCH] lib/raid6: Add AVX2 optimized recovery functions

2012-11-09 Thread Jim Kukunas
tion is correct. The patch was tested and benchmarked before submission. You'll notice that this code is very similar to the SSSE3-optimized recovery routines I wrote earlier. This implementation extends that same algorithm from 128-bit registers to 256-bit registers. Thanks. -- Jim Kukunas Intel Open Source Technology Center pgplXyZIdQ4sp.pgp Description: PGP signature

[PATCH 02/11] x86/xip: Update address of sections in linker script

2015-03-23 Thread Jim Kukunas
ng of XIP_BASE isn't mapped into the linear address space. Also the initial location counter is incremented to account for the ELF header. Signed-off-by: Jim Kukunas --- arch/x86/include/asm/boot.h | 4 arch/x86/kernel/vmlinux.lds.S | 17 +++-- 2 files changed, 19 insert

[PATCH 05/11] x86/xip: reserve memblock for only data

2015-03-23 Thread Jim Kukunas
Nothing is loaded at the usual spot for .text, starting at CONFIG_PHYSICAL_START, so we don't reserve it. Additionally, the physical address of the _text isn't going to be physically contiguous with _data. Signed-off-by: Jim Kukunas --- arch/x86/kernel/setup.c | 5 + 1 file

[PATCH 11/11] x86/xip: update _va() and _pa() macros

2015-03-23 Thread Jim Kukunas
For obtaining the physical address, we always take the slow path of slow_virt_to_phys(). In the future, we should probably special case data addresses to avoid walking the page table. For obtaining a virtual address, this patch introduces a slow path of slow_xip_phys_to_virt(). Signed-off-by: Jim

[PATCH 04/11] x86/xip: XIP boot trampoline page tables

2015-03-23 Thread Jim Kukunas
Constructs the trampoline page tables for early XIP boot. Signed-off-by: Jim Kukunas --- arch/x86/kernel/head_32.S | 85 +++ 1 file changed, 85 insertions(+) diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 80f344a..642d73b

[PATCH 10/11] x86/xip: resolve alternative instructions at build

2015-03-23 Thread Jim Kukunas
ptions, it would need to run unconditionally before any of the config related Makefile targets. Signed-off-by: Jim Kukunas --- arch/x86/Kconfig | 45 + arch/x86/include/asm/alternative-xip.h | 161 + arch/x86/include/asm/alternative.h

[PATCH 08/11] x86/xip: in setup_arch(), handle resource physical addr

2015-03-23 Thread Jim Kukunas
set code_resources to proper physical addr in setup_arch() Signed-off-by: Jim Kukunas --- arch/x86/kernel/setup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 74fc6c8..f044453 100644 --- a/arch/x86/kernel/setup.c +++ b/arch

[PATCH 09/11] x86/xip: snip the kernel text out of the memory mapping

2015-03-23 Thread Jim Kukunas
-off-by: Jim Kukunas --- arch/x86/mm/init.c | 78 ++ 1 file changed, 78 insertions(+) diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index a110efc..07b20c6 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -391,6 +391,82 @@ bool

[PATCH 07/11] x86/xip: make e820_add_kernel_range() a NOP

2015-03-23 Thread Jim Kukunas
e820_add_kernel_range() checks whether the kernel text is present in the e820 map, and marked as usable RAM. If not, it modifies the e820 map accordingly. For XIP, that is unnecessary since the kernel text won't be loaded in RAM. Signed-off-by: Jim Kukunas --- arch/x86/kernel/setup.

[PATCH 01/11] x86/xip: add XIP_KERNEL and XIP_BASE options

2015-03-23 Thread Jim Kukunas
The CONFIG_XIP_KERNEL Kconfig option enables eXecute-In-Place (XIP) support. When XIP_KERNEL is set, XIP_BASE points to the physical address of the vmlinux ELF file. Signed-off-by: Jim Kukunas --- arch/x86/Kconfig | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/x86

[PATCH 06/11] x86/xip: after paging trampoline, discard PMDs above _brk

2015-03-23 Thread Jim Kukunas
In the likely case that XIP_BASE is above PAGE_OFFSET, we want to discard any early identity mappings. So rather than keeping every PMD above PAGE_OFFSET, only copy the ones from PAGE_OFFSET to the last PMD of _end. At this point, the linear address space should look normal. Signed-off-by: Jim

[RFC] x86 XIP

2015-03-23 Thread Jim Kukunas
Hi Folks, This patchset introduces eXecute-In-Place (XIP) support for x86. Right now only minimal configurations are supported (32-bit only, no SMP, no PAE, and so on). My goal is to increase the number of supported configurations in the future based on what functionality is requested. This patc

[PATCH 03/11] x86/xip: copy writable sections into RAM

2015-03-23 Thread Jim Kukunas
Loads all writable and non-zero sections into their VMA. Signed-off-by: Jim Kukunas --- arch/x86/include/asm/sections.h | 4 arch/x86/kernel/head_32.S | 22 ++ arch/x86/kernel/vmlinux.lds.S | 4 3 files changed, 30 insertions(+) diff --git a/arch/x86

[PATCH] lib/deflate: Replace UNALIGNED_OK w/ HAVE_EFFICIENT_UNALIGNED_ACCESS

2014-10-14 Thread Jim Kukunas
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, which serves the same purpose. The exact performance improvement of the word-by-word implementation is data dependant, but on x86 it is typically in the range of a 5-10% cycle reduction. The code is already there, might as well use it ... Signed-off-by: Jim Kukunas

Re: [RFC] x86 XIP

2015-03-24 Thread Jim Kukunas
On Mon, Mar 23, 2015 at 09:07:14AM +0100, Ingo Molnar wrote: > * Jim Kukunas wrote: > > > > > Hi Folks, > > > > This patchset introduces eXecute-In-Place (XIP) support for x86. > > [...] > > So we'd need a lot better high level description tha

Re: [PATCH 10/11] x86/xip: resolve alternative instructions at build

2015-03-24 Thread Jim Kukunas
On Mon, Mar 23, 2015 at 09:33:02AM +0100, Borislav Petkov wrote: > On Mon, Mar 23, 2015 at 12:46:39AM -0700, Jim Kukunas wrote: > > Since the .text section can't be updated at run-time, remove the > > .alternatives sections and update the .text at build time. To pick the >