[PATCH] ARC: fix __ffs return value to avoid build warnings

2018-12-13 Thread Eugeniy Paltsev
Change __ffs return value from 'int' to 'unsigned long' as it is done in other implementations (like asm-generic, x86, etc...) to avoid build-time warnings in places where type is strictly checked. As __ffs may return values in [0-31] interval changing return type to unsigned is valid. Signed-off

[PATCH v2 1/4] ARC: perf: trivial code cleanup

2018-12-13 Thread Eugeniy Paltsev
* Use BIT(), lower_32_bits(), upper_32_bits() macroses, fix code style violations. * Use u32, u64, s64 instead of uint32_t, uint64_t, int64_t * Fix description comment as this code doesn't belong only to ARC700 anymore. * Use SPDX License Identifier. * Remove useless ifdefs. ifdef around 'arc_p

[PATCH v2 0/4] introduce Kernel PMU events support

2018-12-13 Thread Eugeniy Paltsev
Introduce Kernel PMU events support and refactor ARC-specific perf code. Eugeniy Paltsev (4): ARC: perf: trivial code cleanup ARC: perf: introduce Kernel PMU events support ARC: perf: move HW events mapping to separate function ARC: perf: avoid kernel killing where it is possible arch/a

[PATCH v2 2/4] ARC: perf: introduce Kernel PMU events support

2018-12-13 Thread Eugeniy Paltsev
Export all available ARC architected hardware events as kernel PMU events to make non-generic events accessible. ARC PMU HW allow us to read the list of all available events names. So we generate kernel PMU event list dynamically in arc_pmu_device_probe() using human-readable events names we got f

[PATCH v2 3/4] ARC: perf: move HW events mapping to separate function

2018-12-13 Thread Eugeniy Paltsev
Move HW events mapping to separate function to make code more readable. Signed-off-by: Eugeniy Paltsev --- arch/arc/kernel/perf_event.c | 48 ++-- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kerne

[PATCH v2 4/4] ARC: perf: avoid kernel killing where it is possible

2018-12-13 Thread Eugeniy Paltsev
No, not gonna die tonight. Signed-off-by: Eugeniy Paltsev --- arch/arc/kernel/perf_event.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c index 0c4714906a06..b0f7eeffde9f 100644 --- a/arch/arc/kernel/perf_even

[PATCH v6 00/27] ptrace: add PTRACE_GET_SYSCALL_INFO request

2018-12-13 Thread Dmitry V. Levin
PTRACE_GET_SYSCALL_INFO is a generic ptrace API that lets ptracer obtain details of the syscall the tracee is blocked in. There are two reasons for a special syscall-related ptrace request. Firstly, with the current ptrace API there are cases when ptracer cannot retrieve necessary information abo

[PATCH v6 05/27] arc: define syscall_get_arch()

2018-12-13 Thread Dmitry V. Levin
syscall_get_arch() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Acked-by

Re: [PATCH v2 4/4] ARC: perf: avoid kernel killing where it is possible

2018-12-13 Thread Vineet Gupta
On 12/13/18 8:56 AM, Eugeniy Paltsev wrote: > No, not gonna die tonight. > > Signed-off-by: Eugeniy Paltsev Applied. Thx, -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps

[PATCH v6 24/27] syscall_get_arch: add "struct task_struct *" argument

2018-12-13 Thread Dmitry V. Levin
This argument is required to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request: syscall_get_arch() is going to be called from ptrace_request() along with syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions with a tracee as their

Re: [PATCH v2 1/4] ARC: perf: trivial code cleanup

2018-12-13 Thread Vineet Gupta
On 12/13/18 8:56 AM, Eugeniy Paltsev wrote: > * Use BIT(), lower_32_bits(), upper_32_bits() macroses, > fix code style violations. > * Use u32, u64, s64 instead of uint32_t, uint64_t, int64_t > * Fix description comment as this code doesn't belong only to > ARC700 anymore. > * Use SPDX License

[PATCH v6 04/27] Move EM_ARCOMPACT and EM_ARCV2 to uapi/linux/elf-em.h

2018-12-13 Thread Dmitry V. Levin
These should never have been defined in the arch tree to begin with, and now uapi/linux/audit.h header is going to use EM_ARCOMPACT and EM_ARCV2 in order to define AUDIT_ARCH_ARCOMPACT and AUDIT_ARCH_ARCV2 which are needed to implement syscall_get_arch() which in turn is required to extend the gene

Re: [PATCH] ARC: fix __ffs return value to avoid build warnings

2018-12-13 Thread Vineet Gupta
On 12/13/18 7:43 AM, Eugeniy Paltsev wrote: > Change __ffs return value from 'int' to 'unsigned long' as it > is done in other implementations (like asm-generic, x86, etc...) > to avoid build-time warnings in places where type is strictly > checked. > > As __ffs may return values in [0-31] interval

Re: [PATCH v2 3/4] ARC: perf: move HW events mapping to separate function

2018-12-13 Thread Vineet Gupta
On 12/13/18 8:56 AM, Eugeniy Paltsev wrote: > Move HW events mapping to separate function to make code more readable. > > Signed-off-by: Eugeniy Paltsev Applied this as well - although out of order so needed some manual adj ! -Vineet ___ linux-snps-a