[PATCH v3 0/3] lib: find_*_bit reimplementation

2015-02-08 Thread Yury Norov
changed to not appeal to file name and so let to produce clean diff in case of rename (patch 2); * patch 3 is generated with '-M' option to detect renaming and drop file content; * this cover added. Yury Norov (3): lib: find_*_bit reimplementation lib: move find_last_bit to lib

[PATCH v3 3/3] lib: rename lib/find_next_bit.c to lib/find_bit.c

2015-02-08 Thread Yury Norov
This file contains implementation for all find_*_bit{,_le} So giving it more generic name looks reasonable. Signed-off-by: Yury Norov yury.no...@gmail.com --- lib/Makefile| 2 +- lib/{find_next_bit.c = find_bit.c} | 0 2 files changed, 1 insertion(+), 1 deletion

[PATCH v3 2/3] lib: move find_last_bit to lib/find_next_bit.c

2015-02-08 Thread Yury Norov
Currently all 'find_*_bit' family is located in lib/find_next_bit.c, except 'find_last_bit', which is in lib/find_last_bit.c. It seems, there's no major benefit to have it separated. Signed-off-by: Yury Norov yury.no...@gmail.com --- lib/Makefile| 2 +- lib/find_last_bit.c | 35

[PATCH v3 1/3] lib: find_*_bit reimplementation

2015-02-08 Thread Yury Norov
New implementations takes less space in source file (see diffstat) and in object. For me it's 710 vs 453 bytes of text. It also shows better performance. Signed-off-by: Yury Norov yury.no...@gmail.com --- lib/find_last_bit.c | 30 ++ lib/find_next_bit.c | 275

[PATCH] lib: find_*_bit reimplementation

2015-01-19 Thread Yury Norov
New implementation takes less space, and, I hope, easier to understand. Signed-off-by: Yury Norov yury.no...@gmail.com --- lib/find_next_bit.c | 265 +++- 1 file changed, 73 insertions(+), 192 deletions(-) diff --git a/lib/find_next_bit.c b/lib

[PATCH v4 1/3] lib: find_*_bit reimplementation

2015-02-16 Thread Yury Norov
-by: Yury Norov yury.no...@gmail.com --- include/linux/bitops.h | 4 +- lib/find_last_bit.c| 37 +++ lib/find_next_bit.c| 269 ++--- 3 files changed, 94 insertions(+), 216 deletions(-) diff --git a/include/linux/bitops.h b/include/linux/bitops.h

[PATCH v4 0/3] lib: find_*_bit reimplementation

2015-02-16 Thread Yury Norov
); * #include linux/bitops.h restored (patch 1); * lib/find_next_bit descriptor changed to not appeal to file name and so let to produce clean diff in case of rename (patch 2); * patch 3 is generated with '-M' option to detect renaming and drop file content; * this cover added. Yury Norov (3): lib

[PATCH v4 2/3] lib: move find_last_bit to lib/find_next_bit.c

2015-02-16 Thread Yury Norov
/find_last_bit.c +++ /dev/null @@ -1,42 +0,0 @@ -/* find_last_bit.c: fallback find next bit implementation - * - * Copyright (C) 2008 IBM Corporation - * Written by Rusty Russell ru...@rustcorp.com.au - * (Inspired by David Howell's find_next_bit implementation) - * - * Rewritten by Yury Norov

[PATCH v4 3/3] lib: rename lib/find_next_bit.c to lib/find_bit.c

2015-02-16 Thread Yury Norov
This file contains implementation for all find_*_bit{,_le} family. So giving it more generic name looks reasonable. --- lib/Makefile| 2 +- lib/{find_next_bit.c = find_bit.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename lib/{find_next_bit.c = find_bit.c}

[PATCH v2 1/3] lib: find_*_bit reimplementation

2015-01-31 Thread yury . norov
From: Yury Norov y.no...@samsung.com New implementations takes less space in source file (see diffstat) and in object. For me it's 710 vs 453 bytes of text. Patch was boot-tested on x86_64 and MIPS (big-endian) machines. Performance tests were ran on userspace with code like

[PATCH v2 2/3] lib: move find_last_bit to lib/find_next_bit.c

2015-01-31 Thread yury . norov
From: Yury Norov yury.no...@gmail.com Currently all 'find_*_bit' family is located in lib/find_next_bit.c, except 'find_last_bit', which is in lib/find_last_bit.c. It seems, there's no major benefit to have it separated. Signed-off-by: Yury Norov yury.no...@gmail.com --- lib/Makefile

[PATCH v2 3/3] lib: rename lib/find_next_bit.c to lib/find_bit.c

2015-01-31 Thread yury . norov
From: Yury Norov yury.no...@gmail.com This file contains implementation for: - find_last_bit; - find_first_zero_bit; - find_first_bit; - find_next_zero_bit; - find_next_bit. So giving more generic name looks reasonable. Signed-off-by: Yury Norov yury.no...@gmail.com --- lib/Makefile

[PATCH] lib: bitmap_[empty,full]: remove code duplication

2015-03-16 Thread Yury Norov
Function 'bitmap_empty' has it's own implementation. But it's clearly as simple as: find_first_bit(src, nbits) == nbits The same is true for 'bitmap_full'. Underscored versions of 'bitmap_[empty,full]' are not needed anymore and so removed too. Boot-tested on Core i7-2630QM. ---

Re: [PATCH v5 0/3] lib: find_*_bit reimplementation

2015-03-08 Thread Yury Norov
); + +MODULE_AUTHOR(Yury Norov yury.no...@gmail.com); +MODULE_LICENSE(GPL); -- 2.1.0 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ

[PATCH v2] lib: bitmap_[empty,full]: remove code duplication

2015-03-28 Thread Yury Norov
Function 'bitmap_empty' has it's own implementation. But it's clearly as simple as: find_first_bit(src, nbits) == nbits The same is true for 'bitmap_full'. --- include/linux/bitmap.h | 8 lib/bitmap.c | 30 -- 2 files changed, 4

[PATCH v5 1/3] lib: find_*_bit reimplementation

2015-02-22 Thread Yury Norov
New implementations takes less space in source file (see diffstat) and in object. For me it's 710 vs 453 bytes of text. It also shows better performance. find_last_bit description fixed due to obvious typo. Signed-off-by: Yury Norov yury.no...@gmail.com --- include/linux/bitops.h | 4 +- lib

[PATCH v5 2/3] lib: move find_last_bit to lib/find_next_bit.c

2015-02-22 Thread Yury Norov
/find_last_bit.c +++ /dev/null @@ -1,40 +0,0 @@ -/* find_last_bit.c: fallback find next bit implementation - * - * Copyright (C) 2008 IBM Corporation - * Written by Rusty Russell ru...@rustcorp.com.au - * (Inspired by David Howell's find_next_bit implementation) - * - * Rewritten by Yury Norov yury.no

[PATCH v5 0/3] lib: find_*_bit reimplementation

2015-02-22 Thread Yury Norov
' option to detect renaming and drop file content; * this cover added. Yury Norov (3): lib: find_*_bit reimplementation lib: move find_last_bit to lib/find_next_bit.c lib: rename lib/find_next_bit.c to lib/find_bit.c include/linux/bitops.h | 4 +- lib/Makefile | 2 +- lib

[PATCH v5 3/3] lib: rename lib/find_next_bit.c to lib/find_bit.c

2015-02-22 Thread Yury Norov
This file contains implementation for all find_*_bit{,_le} So giving it more generic name looks reasonable. --- lib/Makefile| 2 +- lib/{find_next_bit.c = find_bit.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename lib/{find_next_bit.c = find_bit.c} (100%)

[PATCH] lib: delete lib/find_last_bit.c

2015-04-20 Thread Yury Norov
File find_next_bit.c was deleted in patch lib: move find_last_bit to lib/find_next_bit.c from Feb, 22, but not in master (commit 8f6f19dd51). This is just a fix for wrong merge. Signed-off-by: Yury Norov yury.no...@gmail.com --- lib/find_last_bit.c | 41

[PATCH] signal: optimize 'sigaction' call path

2015-04-04 Thread Yury Norov
out of 'do_sigaction' to a small function 'user_signal'. So we can call it before any copying. Signed-off-by: Yury Norov yury.no...@gmail.com --- arch/alpha/kernel/signal.c | 19 +++--- arch/mips/kernel/signal.c| 10 +--- arch/mips/kernel/signal32.c | 10

[PATCH] powerpc: remove unneeded check in spu_gang_remove_ctx

2015-06-22 Thread Yury Norov
()' check completely and decrease 'spu_gang_remove_ctx()' function size, and (sometimes) avoid branch predictor misses. Signed-off-by: Yury Norov yury.no...@gmail.com --- arch/powerpc/platforms/cell/spufs/gang.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc

Re: [PATCH] lib/bitmap.c: return -EINVAL for grouping errors in __bitmap_parselist

2015-06-30 Thread Yury Norov
2015-07-01 4:37 GMT+03:00 Pan Xinhui xinhuix@intel.com: hi, Yury thanks for your nice reply. On 2015年06月29日 21:39, Yury Norov wrote: Sometimes the input from user may cause an unexpected result. Could you please provide specific example? I wrote some scripts to do some tests

Re: [PATCH] lib/bitmap.c: return -EINVAL for grouping errors in __bitmap_parselist

2015-06-29 Thread Yury Norov
Sometimes the input from user may cause an unexpected result. Could you please provide specific example? just like __bitmap_parse, we return -EINVAL if there is no avaiable digit in each parsing procedures. Signed-off-by: Pan Xinhui xinhuix@intel.com Hello, Pan. (Adding Alexey

Re: [RFC PATCH v6 00/17] ILP32 for ARM64

2015-11-09 Thread Yury Norov
On Mon, Nov 09, 2015 at 06:50:42PM +0300, Yury Norov wrote: > On Mon, Nov 09, 2015 at 10:52:32PM +0800, pins...@gmail.com wrote: > > > > > > > On Nov 9, 2015, at 10:36 PM, Arnd Bergmann <a...@arndb.de> wrote: > > > > > >> On Monday 09 Novem

Re: [RFC PATCH v6 00/17] ILP32 for ARM64

2015-11-09 Thread Yury Norov
ites: > >> > >>>> On Monday 09 November 2015 14:23:59 Andreas Schwab wrote: > >>>> Yury Norov <yno...@caviumnetworks.com> writes: > >>>> > >>>>> This is what I run: > >>>>> https://github.com/norov/g

[PATCH v6 05/17] arm64:ilp32: share signal structures between ILP32 and LP64 ABIs

2015-11-02 Thread Yury Norov
com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com> Reviewed-by: David Daney <david.da...@cavium.com> --- arch/arm64/include/uapi/asm/siginfo.h | 21 + arch/a

[PATCH v6 06/17] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)

2015-11-02 Thread Yury Norov
oph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com> Reviewed-by: David Daney <david.da...@cavium.com> --- arch/arm64/include/asm/compat.h | 31 +++

[PATCH v6 09/17] arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads

2015-11-02 Thread Yury Norov
ems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com> Reviewed-by: David Daney <david.da...@cavium.com> --- arch/arm64/include/asm/processor.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/a

[PATCH v6 07/17] arm64:ilp32: add is_ilp32_compat_{task,thread} and TIF_32BIT_AARCH64

2015-11-02 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: A

[PATCH v6 08/17] arm64:ilp32: share HWCAP between LP64 and ILP32

2015-11-02 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: A

[PATCH v6 16/17] arm64:ilp32: change COMPAT_ELF_PLATFORM to report a a subplatform for ILP32

2015-11-02 Thread Yury Norov
m> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com> Reviewed-by: David Daney <david.da...@cavium.com> --- arch/arm64/include/a

[PATCH v6 13/17] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2015-11-02 Thread Yury Norov
oph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com> Reviewed-by: David Daney <david.da...@cavium.com> --- arch/arm64/include/asm/unistd.h | 7 +- arch/arm6

[PATCH v6 12/17] ilp32: common 32-bit wrappers

2015-11-02 Thread Yury Norov
From: Jan Dakinevich <jan.dakinev...@gmail.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Jan Dakinevich <jan.dakinev...@gmail.com> Reviewed-by: David Daney <david.da...@cavium.com> --- arch/arm64/kernel/Makefile | 1 + arch/arm64/kern

[PATCH v6 10/17] arm64:ilp32: support core dump generation for ILP32

2015-11-02 Thread Yury Norov
; Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com> Reviewed-by: David Daney <david.da...@cavium.com> --

[PATCH v6 15/17] arm64:ilp32: use the native siginfo instead of the compat siginfo

2015-11-02 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Set COMPAT_USE_NATIVE_SIGINFO to be true for non AARCH32 tasks. Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-b

[PATCH v6 14/17] aarch64: ilp32: use generic stat64 structure

2015-11-02 Thread Yury Norov
it, because it's more flexible to have independend support for ABIs. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Reviewed-by: David Daney <david.da...@cavium.com> --- arch/arm64/kernel/sys_ilp32.c | 57 + include/uapi/asm-generic/stat.h |

[RFC PATCH v6 00/17] ILP32 for ARM64

2015-11-02 Thread Yury Norov
to Kconfig Jan Dakinevich (1): ilp32: common 32-bit wrappers Philipp Tomsich (2): arm64:ilp32: add documentation on the ILP32 ABI for ARM64 arm64:ilp32: change COMPAT_ELF_PLATFORM to report a a subplatform for ILP32 Yury Norov (1): aarch64: ilp32: use generic stat64 structure

[PATCH v6 01/17] arm64:ilp32: add documentation on the ILP32 ABI for ARM64

2015-11-02 Thread Yury Norov
m> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com> Reviewed-by: David Daney <david.da...@cavium.com> ---

[PATCH v6 02/17] arm64: ensure the kernel is compiled for LP64

2015-11-02 Thread Yury Norov
hilipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: Andrew Pinski <andrew.pin...@caviumnetworks.com> Reviewed-by: David Daney <

[PATCH v6 04/17] arm64: change some CONFIG_COMPAT over to use CONFIG_AARCH32_EL0 instead

2015-11-02 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: A

[PATCH v6 03/17] arm64: rename COMPAT to AARCH32_EL0 in Kconfig

2015-11-02 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Signed-off-by: A

[PATCH v6 17/17] arm64:ilp32: add ARM64_ILP32 to Kconfig

2015-11-02 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> This patch adds the config option for ILP32. Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviu

[PATCH v6 11/17] ptrace: Allow compat to use the native siginfo

2015-11-02 Thread Yury Norov
IGINFO and if it is true then read/write in the compat case as it was the non-compat case. Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com&g

Re: [RFC PATCH v6 00/17] ILP32 for ARM64

2015-11-05 Thread Yury Norov
On Thu, Nov 05, 2015 at 09:39:51PM +0800, Andrew Pinski wrote: > On Thu, Nov 5, 2015 at 7:36 PM, Andreas Schwab <sch...@suse.de> wrote: > > Yury Norov <yno...@caviumnetworks.com> writes: > > > >> v6: > >> - time_t, __kenel_off_t and other types

Re: [PATCH v5 00/23] ILP32 for ARM64

2015-10-05 Thread Yury Norov
On Fri, Oct 02, 2015 at 12:49:46AM +0300, Pinski, Andrew wrote: [...] > Ok, we will rewrite these patches using 32bit time_t and 32bit off_t and > redo the toolchain support for them. Note this is going back to the abi > I had originally done when I submitted my original version when it was >

Re: [PATCH v5 10/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)

2015-10-07 Thread Yury Norov
On Tue, Oct 06, 2015 at 12:21:33PM +0300, Andrey Konovalov wrote: > Hi Yury, > > With this patch set 4.3 kernel fails to build with > arch/arm64/configs/defconfig plus CONFIG_AARCH32_EL0=y > and CONFIG_ARM64_ILP32=y giving the following three errors (the 3d one is > warning actually): [...] >

Re: [PATCH v6 18/19] arm64:ilp32: change COMPAT_ELF_PLATFORM to report a a subplatform for ILP32

2015-11-18 Thread Yury Norov
On Wed, Nov 18, 2015 at 03:21:05AM -0800, pins...@gmail.com wrote: > > > > On Nov 18, 2015, at 12:11 AM, Zhangjian (Bamvor) > > <bamvor.zhangj...@huawei.com> wrote: > > > > Hi, Yury > > > >> On 2015/11/18 5:16, Yury Norov wrote: &g

Re: [PATCH v6 16/19] aarch64: ilp32: use generic stat64 structure

2015-11-18 Thread Yury Norov
On Tue, Nov 17, 2015 at 11:09:05PM +0100, Arnd Bergmann wrote: > On Wednesday 18 November 2015 00:16:56 Yury Norov wrote: > > Generic 32-bit and AARCH32 stat64 structures has same names. > > ILP32 needs generic stat64. So we can either make ILP32 mutual > > exclusive with

[PATCH v3 1/2] arm64: cpufeature.h: resolve hidden header dependencies

2015-09-02 Thread Yury Norov
BLY__" guard as it depends on , and can be used in C files only. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Reviewed-by: Mark Rutland <mark.rutl...@arm.com> --- arch/arm64/include/asm/cpufeature.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --gi

[PATCH v3 0/2] arm64: introduce run-time detection of aarch32 support

2015-09-02 Thread Yury Norov
in id_aa64pfr0_aarch32_el0(). V2: - add missing for the __attribute_const__ on cpuid_feature_extract_field; - move cpu_feature macro under the __ASSEMBLY__ guard. - check that all CPUs support AArch32, not the current only, the same way as for endianness support. Signed-off-by: Yury Norov <

[PATCH v3 2/2] arm64: don't load 32-bit binaries if platform has no aarch32_el0

2015-09-02 Thread Yury Norov
, system_supports_aarch32_el0() is introduced to detect aarch32 support at run-time. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/cpufeature.h | 1 + arch/arm64/include/asm/cputype.h| 9 + arch/arm64/include/asm/elf.h| 6 -- arch/arm64/kernel/cpu

[RFC PATCH] arm64: cpuinfo: reduce cache contention on update_{feature}_support

2015-09-04 Thread Yury Norov
, it may become a trouble on large-scale SOCs. The fix is trivial, though: do system-wide marker update conditionally, and preserve corresponding cache line in shared state for all update() calls, except, probably, one. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/kernel/cpu

Re: [RFC PATCH] arm64: cpuinfo: reduce cache contention on update_{feature}_support

2015-09-04 Thread Yury Norov
On Fri, Sep 04, 2015 at 05:40:57PM +0100, Suzuki K. Poulose wrote: > On 04/09/15 17:04, Yury Norov wrote: > >This patch is on top of https://lkml.org/lkml/2015/9/2/413 > > > >In master, there's only a single function - > > update_mixed_endian_el0_support > >

[PATCH v2 0/2] arm64: introduce run-time detection of aarch32 support

2015-09-02 Thread Yury Norov
. - check that all CPUs support AArch32, not the current only, the same way as for endianness support. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Yury Norov (2): arm64: cpufeature.h: resolve hidden header dependencies arm64: don't load 32-bit binaries if platfo

[PATCH v2 2/2] arm64: don't load 32-bit binaries if platform has no aarch32_el0

2015-09-02 Thread Yury Norov
, system_supports_aarch32_el0() is introduced to detect aarch32 support at run-time. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/cpufeature.h | 1 + arch/arm64/include/asm/cputype.h| 8 arch/arm64/include/asm/elf.h| 6 -- arch/arm64/kernel/cpu

[PATCH v2 1/2] arm64: cpufeature.h: resolve hidden header dependencies

2015-09-02 Thread Yury Norov
Functions implemented in cpufeature.h depend on some headers, but cpufeature.h does not include them. This may cause build failure if cpufeature.h user does not include that headers by itself. (Like it happens in next patch of this series.) Signed-off-by: Yury Norov <yno...@caviumnetworks.

[PATCH 2/2] arm64: don't load 32-bit binaries if platform has no aarch32_el0

2015-09-01 Thread Yury Norov
, system_supports_aarch32_el0() is introduced to detect aarch32 support at run-time. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/cpufeature.h | 1 + arch/arm64/include/asm/elf.h| 6 -- arch/arm64/kernel/cpuinfo.c | 9 + 3 files changed, 14 inse

[PATCH 1/2] arm64: cpufeature.h: resolve hidden header dependencies

2015-09-01 Thread Yury Norov
Functions implemented in cpufeature.h depend on some headers, but cpufeature.h does not include them. This may cause build failure if cpufeature.h user does not include that headers by itself. (Like it happens in next patch of this series.) Signed-off-by: Yury Norov <yno...@caviumnetworks.

[PATCH 0/2] arm64: introduce run-time detection of aarch32 support

2015-09-01 Thread Yury Norov
applies second patch only. Second patch adds run-time detection of aarch32 support, and rejects kernel to load such binaries, if not supported. Tested on ThunderX. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> Yury Norov (2): arm64: cpufeature.h: resolve hidden header dependencies

Re: [PATCH v2 2/2] arm64: don't load 32-bit binaries if platform has no aarch32_el0

2015-09-02 Thread Yury Norov
On Wed, Sep 02, 2015 at 04:15:52PM +0200, Ard Biesheuvel wrote: > On 2 September 2015 at 16:00, Yury Norov <yno...@caviumnetworks.com> wrote: > > Kernel option COMPAT defines the ability of executing aarch32 binaries. > > Some platforms does not support aarch32 mode,

[PATCH v5 00/23] ILP32 for ARM64

2015-09-29 Thread Yury Norov
a a subplatform for ILP32 Yury Norov (1): aarch64: ilp32: msgrcv, msgsnd handlers Documentation/arm64/ilp32.txt | 64 ++ arch/arm64/Kconfig | 14 +- arch/arm64/Makefile| 6 +- arch/arm64/include/asm

[PATCH v5 01/23] arm64:ilp32: add documentation on the ILP32 ABI for ARM64

2015-09-29 Thread Yury Norov
m> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> create mode 100644 Documentation/arm64/ilp32.txt diff --git a/Documentation/arm64/ilp32.txt b/Documentation/arm64/ilp32.txt new file mode 10064

[PATCH v5 08/23] arm64:ilp32: use 64bit syscall-names for ILP32 when passing 64bit registers

2015-09-29 Thread Yury Norov
; Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index ee12400..97b0438 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/

[PATCH v5 10/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)

2015-09-29 Thread Yury Norov
oph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index 7fbed69..3a2976d 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/com

[PATCH v5 04/23] arm64: change some CONFIG_COMPAT over to use CONFIG_AARCH32_EL0 instead

2015-09-29 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/

[PATCH v5 16/23] arm64: add support for starting ILP32 (ELFCLASS32) binaries

2015-09-29 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Handle ILP32 (AArch64, but ELFCLASS32) binaries on ARM64. Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-b

[PATCH v5 19/23] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2015-09-29 Thread Yury Norov
-flags in the el0_svc-handler and simply relies on the flags having been read by the kernel_entry macro. Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno.

[PATCH v5 13/23] arm64:ilp32: share HWCAP between LP64 and ILP32

2015-09-29 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/in

[PATCH v5 06/23] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64

2015-09-29 Thread Yury Norov
lipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/include/uapi/asm/bitsperlong.h b/arch/arm64/include/uapi/asm/bitsperlong.h index fce9c29..4

[PATCH v5 15/23] arm64:ilp32: support core dump generation for ILP32

2015-09-29 Thread Yury Norov
; Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index 9ecbaf2..d4d53c91a 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/inc

[PATCH v5 02/23] arm64: ensure the kernel is compiled for LP64

2015-09-29 Thread Yury Norov
hilipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index f9914d7..d7a13ce 100644 --- a/arch/a

[PATCH v5 03/23] arm64: rename COMPAT to AARCH32_EL0 in Kconfig

2015-09-29 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/Kcon

[PATCH v5 12/23] arm64:ilp32: COMPAT_USE_64BIT_TIME is true for ILP32 tasks

2015-09-29 Thread Yury Norov
e. x32) for such an implementation both in the kernel and in glibc. Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/include/a

[PATCH v5 22/23] aarch64: ilp32: msgrcv, msgsnd handlers

2015-09-29 Thread Yury Norov
msgsnd and msgrcv syscall arguments are different in lp64 and ilp32 ABIs. In this patch, ilp32-specific handlers introduced to take it into account. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/kernel/sys_ilp32.c b/arch/arm64/kernel/sys_ilp32.c index 6

[PATCH v5 07/23] arm64:ilp32: share signal structures between ILP32 and LP64 ABIs

2015-09-29 Thread Yury Norov
com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/include/uapi/asm/siginfo.h b/arch/arm64/include/uapi/asm/siginfo.h index 5a74a08..1a6aa32 100644 --- a/arch/arm64/include/uapi/asm/siginfo.h +++ b/arch/arm64/include/uapi/asm/siginfo.h @@ -1,5 +1,6 @@ /* * Co

[PATCH v5 21/23] arm64:ilp32: change COMPAT_ELF_PLATFORM to report a a subplatform for ILP32

2015-09-29 Thread Yury Norov
m> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index 9a854f9..8ef8fc5 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch

[PATCH v5 05/23] arm64:ilp32: expose 'kernel_long' as 'long long' for ILP32

2015-09-29 Thread Yury Norov
; Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/include/uapi/asm/posix_types.h b/arch/arm64/include/uapi/asm/posix_types.h index 7985ff6..d6a7cb5 100644 --- a/arch/arm64/includ

[PATCH v5 11/23] arm64:ilp32: add is_ilp32_compat_{task,thread} and TIF_32BIT_AARCH64

2015-09-29 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/inc

[PATCH v5 09/23] arm64:ilp32: use non-compat syscall names for ILP32 as for LP64

2015-09-29 Thread Yury Norov
com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/include/uapi/asm/unistd.h b/arch/arm64/include/uapi/asm/unistd.h index 1caadc2..067eab0 100644 --- a/arch/arm64/include/uapi/asm/unistd.h +++ b/arch/arm64/include/uapi/asm/unistd.h @@ -1,5 +1,6 @@ /* * Co

[PATCH v5 14/23] arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads

2015-09-29 Thread Yury Norov
ems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index f1bba0c..d766f29 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -28,6 +28,7 @@ #ifde

[PATCH v5 17/23] arm64:ilp32: add vdso-ilp32 and use for signal return

2015-09-29 Thread Yury Norov
oph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> create mode 100644 arch/arm64/kernel/vdso-ilp32/.gitignore create mode 100644 arch/arm64/kernel/vdso-ilp32/Makefile copy arch/arm64/{include/asm/vdso.h => kernel/vdso-ilp32/vdso-ilp32.S

[PATCH v5 20/23] arm64:ilp32: use the native siginfo instead of the compat siginfo

2015-09-29 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Set COMPAT_USE_NATIVE_SIGINFO to be true for non AARCH32 tasks. Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-b

[PATCH v5 18/23] ptrace: Allow compat to use the native siginfo

2015-09-29 Thread Yury Norov
IGINFO and if it is true then read/write in the compat case as it was the non-compat case. Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@caviumnetworks.com> di

[PATCH v5 23/23] arm64:ilp32: add ARM64_ILP32 to Kconfig

2015-09-29 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> This patch adds the config option for ILP32. Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov <yno...@cavi

Re: [PATCH v5 00/23] ILP32 for ARM64

2015-10-01 Thread Yury Norov
On Wed, Sep 30, 2015 at 11:19:19AM +0100, Catalin Marinas wrote: > On Wed, Sep 30, 2015 at 01:13:57AM +0300, Yury Norov wrote: > > V5 reincarnation for ILP32. > > > > This is mostly the same code as Andrew suggested in v3: > > https://lkml.org/lkml/2014/

Re: [PATCH v5 17/23] arm64:ilp32: add vdso-ilp32 and use for signal return

2015-10-01 Thread Yury Norov
On Tue, Sep 29, 2015 at 11:06:13PM -0500, Nathan Lynch wrote: > On 09/29/2015 05:14 PM, Yury Norov wrote: > > From: Philipp Tomsich <philipp.toms...@theobroma-systems.com> > > > > Adjusted to move the move data page before code pa

Re: [PATCH v5 00/23] ILP32 for ARM64

2015-10-01 Thread Yury Norov
On Wed, Sep 30, 2015 at 05:41:03PM +0100, Mark Brown wrote: > On Wed, Sep 30, 2015 at 11:19:19AM +0100, Catalin Marinas wrote: > > On Wed, Sep 30, 2015 at 01:13:57AM +0300, Yury Norov wrote: > > > > - What for ILP32 on ARM64? > > > See https://lkml.org/lkml/

Re: [PATCH v6 14/19] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2015-12-01 Thread Yury Norov
> > +#define compat_sys_shmat sys_shmat > > What's special about compat_sys_shmat? > It's about SHMLBA definition. For aarch32 glibc defines it as (__getpagesize () << 2). For ILP32 there's no definition, and so generic one is used: (__getpagesize ()). In kernel, for ARM64,

Re: [PATCH v6 14/19] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2015-12-02 Thread Yury Norov
On Wed, Dec 02, 2015 at 09:37:05AM +0100, Arnd Bergmann wrote: > On Wednesday 02 December 2015 02:35:03 Yury Norov wrote: > > On Tue, Dec 01, 2015 at 11:39:42PM +0100, Arnd Bergmann wrote: > > > On Wednesday 02 December 2015 00:29:04 Yury Norov wrote: > > > I'm not

Re: [PATCH v6 14/19] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2015-12-01 Thread Yury Norov
On Tue, Dec 01, 2015 at 11:39:42PM +0100, Arnd Bergmann wrote: > On Wednesday 02 December 2015 00:29:04 Yury Norov wrote: > > > > +#define compat_sys_shmat sys_shmat > > > > > > What's special about compat_sys_shmat? > > > > > >

Re: [PATCH v6 14/19] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2015-12-01 Thread Yury Norov
On Tue, Dec 01, 2015 at 12:30:56PM +0100, Arnd Bergmann wrote: > On Tuesday 01 December 2015 12:01:12 Andreas Schwab wrote: > > Arnd Bergmann <a...@arndb.de> writes: > > > > > On Tuesday 01 December 2015 10:20:59 Andreas Schwab wrote: > > >> Yur

Re: [RFC2 PATCH v6 00/19] ILP32 for ARM64

2015-12-04 Thread Yury Norov
On Thu, Dec 03, 2015 at 05:59:55PM +, Catalin Marinas wrote: > On Wed, Nov 18, 2015 at 12:16:40AM +0300, Yury Norov wrote: > > - ILP32 VDSO code excluded. It's not mandatory, and caused questions > >during review process. We definitely make sure we will follow up > >

Re: [PATCH v6 07/19] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)

2015-12-04 Thread Yury Norov
On Thu, Dec 03, 2015 at 12:13:03PM +, Catalin Marinas wrote: > On Wed, Nov 18, 2015 at 12:16:47AM +0300, Yury Norov wrote: > > diff --git a/arch/arm64/include/asm/compat.h > > b/arch/arm64/include/asm/compat.h > > index 7fbed69..9700e5e 100644 > > --- a/arch

Re: [PATCH v6 04/19] arm64: change some CONFIG_COMPAT over to use CONFIG_AARCH32_EL0 instead

2015-12-04 Thread Yury Norov
On Thu, Dec 03, 2015 at 12:02:27PM +, Catalin Marinas wrote: > On Wed, Nov 18, 2015 at 12:16:44AM +0300, Yury Norov wrote: > > From: Andrew Pinski <apin...@cavium.com> > > > > Reviewed-by: David Daney <dda...@caviumnetworks.com> > > > >

Re: [RFC PATCH v6 00/17] ILP32 for ARM64

2015-12-03 Thread Yury Norov
[Please don't drop people from CC.] On Tue, Dec 01, 2015 at 02:55:56PM -0800, Iosif Harutyunov wrote: > Sonicwall is very interested in ILP32, is there a way we can get access to > the SuSe builds? > > Thanks > Iosif,_ > > -- > To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH v6 14/19] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2015-12-03 Thread Yury Norov
On Thu, Dec 03, 2015 at 05:47:08PM +, Catalin Marinas wrote: > On Wed, Dec 02, 2015 at 12:29:04AM +0300, Yury Norov wrote: > > My question. Why aarch64 defines COMPAT_SHMLBA as 0x4000? > > This was done to match the arch/arm value of 4 * 4K. The historical > 32-bit

Re: [PATCH v6 14/19] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2015-12-02 Thread Yury Norov
On Tue, Nov 17, 2015 at 10:57:52PM +0100, Arnd Bergmann wrote: It looks, all them are needed. > > +asmlinkage long compat_sys_mmap2_wrapper(void); > > +#define sys_mmap2 compat_sys_mmap2_wrapper This wrapper checks alignement of pgoff, if page sise is greater than 4K > >

Re: [PATCH v6 14/19] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it

2015-12-02 Thread Yury Norov
and just use sys_shmat as your v6 patch does. > Arnd If you feel ARMv6 fix for caches will come soon, just ignore it. Otherwise, please pull it because compat_sys_shmat is broken now for 64K pages. Signed-off-by: Yury Norov <yno...@caviumnetworks.com> --- arch/arm64/include/asm/shmp

[PATCH v6 04/20] arm64: change some CONFIG_COMPAT over to use CONFIG_AARCH32_EL0 instead

2015-12-15 Thread Yury Norov
From: Andrew Pinski <apin...@cavium.com> Reviewed-by: David Daney <dda...@caviumnetworks.com> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muell...@theobroma-systems.com> Signed-off-by: Yury Norov &l

  1   2   3   4   5   6   7   8   9   10   >