[PATCH 2/3] ARM: dts: sun8i: add FriendlyARM NanoPi Duo2

2018-12-18 Thread Karl Palsson
This is an Allwinner H3 based board, with 512MB ram, a USB OTG port, microsd slot, an onboard AP6212A wifi/bluetooth module, and a CSI connector. Full details and schematic available from vendor: http://wiki.friendlyarm.com/wiki/index.php/NanoPi_Duo2 Signed-off-by: Karl Palsson ---

[PATCH 1/2] selftests: rtc: rtctest: fix alarm tests

2018-12-18 Thread Alexandre Belloni
Return values for select are not checked properly and timeouts may not be detected. Signed-off-by: Alexandre Belloni --- tools/testing/selftests/rtc/rtctest.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/rtc/rtctest.c

[PATCH 2/2] selftests: rtc: rtctest: add alarm test on minute boundary

2018-12-18 Thread Alexandre Belloni
Unfortunately, some RTC don't have a second resolution for alarm so also test for alarm on a minute boundary. Signed-off-by: Alexandre Belloni --- tools/testing/selftests/rtc/rtctest.c | 102 ++ 1 file changed, 102 insertions(+) diff --git

[PATCH 3/3] ARM: dts: sun8i: add FriendlyARM NanoPi Duo2-IoT Box

2018-12-18 Thread Karl Palsson
The IoT-Box is a dock for the NanoPi Duo2, adding two USB host ports, a 10/100 ethernet port, a variety of pin headers for i2c and uarts, and a quad band 2G GSM module, a SIM800C. Full documentation and schematics available from vendor:

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Andi Kleen
> I misunderstood, you mean 32bit kernel, not 32bit machine. Theoretically 32bit > kernel can use AVX512, but not sure if anyone use it like this. > get_jiffies_64() > includes jiffies_lock ops so not good in context switch. So I want to use raw > jiffies_64 here. jiffies is a good candidate but

[PATCH v2] include/linux/nodemask.h: Use nr_node_ids (not MAX_NUMNODES) in __nodemask_pr_numnodes()

2018-12-18 Thread Waiman Long
When viewing the /proc//status file, one can see output lines like Cpus_allowed: ,, Cpus_allowed_list:0-95 Mems_allowed:

Re: dm: give req_size precisely given by user

2018-12-18 Thread Jaegeuk Kim
On 12/18, Mike Snitzer wrote: > On Tue, Dec 18 2018 at 12:45pm -0500, > Jens Axboe wrote: > > > On 12/18/18 10:25 AM, Jaegeuk Kim wrote: > > > This patch makes dm be aware of io_pages to assign sane req_size for > > > reads. > > > > Reviewed-by: Jens Axboe > > > > I've applied this, see: >

Re: [PATCH] sysfs: Disable lockdep for driver bind/unbind files

2018-12-18 Thread Rafael J. Wysocki
On Tue, Dec 18, 2018 at 9:14 PM Daniel Vetter wrote: > > This is the much more correct fix for my earlier attempt at: > > https://lkml.org/lkml/2018/12/10/118 > > Short recap: > > - There's not actually a locking issue, it's just lockdep being a bit > too eager to complain about a possible

[GIT PULL] PCI fixes for v4.20

2018-12-18 Thread Bjorn Helgaas
PCI fixes: - Fix the ACPI APEI error path, which previously queued several uninitialized events (Yanjiang Jin) The following changes since commit b07b864ee4232b03125992a8f6a490b040adcb6a: Revert "PCI/ASPM: Do not initialize link state when aspm_disabled is set" (2018-12-03 18:05:17

Re: [PATCH] include/linux/nodemask.h: Use nr_node_ids instead of MAX_NUMNODES in nodemask_pr_args

2018-12-18 Thread Waiman Long
On 12/18/2018 03:41 PM, Andrew Morton wrote: > On Tue, 18 Dec 2018 12:30:31 -0500 Waiman Long wrote: > >> When viewing the /proc//status file, one can see output lines like >> >> Cpus_allowed: ,, >> Cpus_allowed_list: 0-95 >> Mems_allowed: >>

[PATCH] rtc: pcf2123: Add Microcrystal rv2123

2018-12-18 Thread Alexandre Belloni
Add a compatible string for Microcrystal rv2123 as the reset procedure seem to be differing. However, the current driver works just fine. Signed-off-by: Alexandre Belloni --- Documentation/devicetree/bindings/rtc/nxp,rtc-2123.txt | 1 + drivers/rtc/rtc-pcf2123.c | 1

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Dave Hansen
On 12/18/18 1:38 PM, Andi Kleen wrote: >> I misunderstood, you mean 32bit kernel, not 32bit machine. Theoretically >> 32bit >> kernel can use AVX512, but not sure if anyone use it like this. >> get_jiffies_64() >> includes jiffies_lock ops so not good in context switch. So I want to use raw >>

Re: [RFC/RFT 00/10] i2c: move handling of suspended adapters to the core

2018-12-18 Thread Hans de Goede
Hi, On 18-12-18 21:17, Wolfram Sang wrote: Hans, all, ... this. I don't know what these flags do (and reading SMART in there gives me more a 'uh-oh' feeling) On x86 the lines between runtime suspend and system-suspend are blurring with technologies like "connected standby" and in general

Re: [PATCH v2] mm, page_alloc: Fix has_unmovable_pages for HugePages

2018-12-18 Thread Andrew Morton
On Tue, 18 Dec 2018 08:36:55 +0100 Michal Hocko wrote: > > > Signed-off-by: Oscar Salvador > > Acked-by: Michal Hocko Thanks. > > cc:stable? > > See http://lkml.kernel.org/r/20181217152936.gr30...@dhcp22.suse.cz. I > believe nobody is simply using gigantic pages and hotplug at the same >

Re: [PATCH v2] mm, page_alloc: Fix has_unmovable_pages for HugePages

2018-12-18 Thread Oscar Salvador
On Mon, Dec 17, 2018 at 03:07:26PM -0800, Andrew Morton wrote: > On Mon, 17 Dec 2018 23:51:13 +0100 Oscar Salvador wrote: > > > v1 -> v2: > > - Fix the logic for skipping pages by Michal > > > > --- > > Please be careful with the "^---$". It signifies end-of-changelog, so > I ended up

[PATCH] rtc: pcf8523: Add rv8523 compatible

2018-12-18 Thread Alexandre Belloni
The Microcrystal RV-8523 is compatible with the PCF8523. Signed-off-by: Alexandre Belloni --- Documentation/devicetree/bindings/rtc/rtc.txt | 1 + drivers/rtc/rtc-pcf8523.c | 1 + 2 files changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/rtc/rtc.txt

Re: [WIP PATCH 06/15] drm/i915: Keep malloc references to MST ports

2018-12-18 Thread Lyude Paul
On Fri, 2018-12-14 at 10:32 +0100, Daniel Vetter wrote: > On Thu, Dec 13, 2018 at 08:25:35PM -0500, Lyude Paul wrote: > > So that the ports stay around until we've destroyed the connectors, in > > order to ensure that we don't pass an invalid pointer to any MST helpers > > once we introduce the

Re: WIP Droid 4 voice calls, GNSS & PM with a TS 27.010 serdev driver

2018-12-18 Thread Tony Lindgren
* Pavel Machek [181218 20:22]: > Hi! > > > > # commit 0c1bc81ba976bcd480d6e3c3009a28589f8427c0 (patch) > > > # mfd: motmdm: Add Motorola TS 27.010 serdev driver for devices like > > > droid4 > > > > > > Oh, that is a lot of fun. Especially state machine for parsing modem > > > responses.

[RFC] Fix failure path in alloc_pid()

2018-12-18 Thread Matthew Wilcox
The failure path removes the allocated PIDs from the wrong namespace. I believe this is correct, but have not tested it. Spotted by inspection, do we have a test suite for PID namespaces? Some error injection, perhaps? Fixes: 95846ecf9dac ("pid: replace pid bitmap implementation with IDR

Re: [RFC] LKML Archive in Maildir Format

2018-12-18 Thread Jasper Spaans
Hi Joey, On Sun, Dec 16, 2018 at 09:21:35AM -1000, Joey Pabalinas wrote: > > > I spent a lot of time trying to find an LKML archive in Maildir format > > > that I could use for local searches with nutmuch or something, but all > > > the links I was able to find were all dead. > > > > You might

Re: [Xen-devel] [PATCH -next] x86/xen: Fix read buffer overflow

2018-12-18 Thread Dan Carpenter
On Tue, Dec 18, 2018 at 12:35:34PM -0500, Boris Ostrovsky wrote: > On 12/18/18 6:28 AM, Andrew Cooper wrote: > > On 18/12/2018 10:42, YueHaibing wrote: > >> On 2018/12/18 16:31, Juergen Gross wrote: > >>> On 18/12/2018 09:19, YueHaibing wrote: > Fix smatch warning: > >

Re: objtool warnings for kernel/trace/trace_selftest_dynamic.o

2018-12-18 Thread Steven Rostedt
On Tue, 18 Dec 2018 13:15:01 -0800 Andi Kleen wrote: > > > > > I am the developer who introduced attribute noclone to GCC and also the > > one who advises against using it :-) ...at least without also using the > > noinline attribute, the combination means " > > The function in question

[RESEND PATCH v3 1/2] drivers: amba: Updates to component identification for driver matching.

2018-12-18 Thread Mike Leach
The CoreSight specification (ARM IHI 0029E), updates the ID register requirements for components on an AMBA bus, to cover both traditional ARM Primecell type devices, and newer CoreSight and other components. The Peripheral ID (PID) / Component ID (CID) pair is extended in certain cases to

[RESEND PATCH v3 0/2] Update AMBA driver for enhanced component ID spec.

2018-12-18 Thread Mike Leach
The latest ARM CoreSight specification updates the component identification requirements for all components attached to an AMBA bus. (ARM IHI 0029E) This specification defines bits 15:12 in the ComponentID (CID) value as the device class. Identification requirements now depend on this class.

[RESEND PATCH v3 2/2] coresight: etmv4: Update ID register table to add UCI support

2018-12-18 Thread Mike Leach
Updates the ID register tables to contain a UCI entry for the A35 ETM device to allow correct matching of driver in the amba bus code. Signed-off-by: Mike Leach Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm4x.c | 18 +- 1 file changed, 17

Re: [WIP PATCH 05/15] drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs

2018-12-18 Thread Lyude Paul
On Fri, 2018-12-14 at 10:38 +0100, Daniel Vetter wrote: > On Thu, Dec 13, 2018 at 08:25:34PM -0500, Lyude Paul wrote: > > Up until now, freeing payloads on remote MST hubs that just had ports > > removed has almost never worked because we've been relying on port > > validation in order to stop us

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Andi Kleen
On Tue, Dec 18, 2018 at 01:44:41PM -0800, Dave Hansen wrote: > On 12/18/18 1:38 PM, Andi Kleen wrote: > >> I misunderstood, you mean 32bit kernel, not 32bit machine. Theoretically > >> 32bit > >> kernel can use AVX512, but not sure if anyone use it like this. > >> get_jiffies_64() > >> includes

Re: [PATCH] device property: fix fwnode_graph_get_next_endpoint documentation

2018-12-18 Thread Sakari Ailus
On Tue, Dec 18, 2018 at 10:33:07PM +0100, Rafael J. Wysocki wrote: > On Tue, Dec 18, 2018 at 4:52 PM Marco Felsch wrote: > > > > Sync documentation with code. > > > > Fixes: 07bb80d40b0e ("device property: Add support for remote endpoints") > > Signed-off-by: Marco Felsch > > I'll pick up this

Re: [PATCH v2 1/5] gpio: Add support for hierarchical IRQ domains

2018-12-18 Thread Thierry Reding
On Fri, Dec 14, 2018 at 02:41:01PM +0100, Linus Walleij wrote: > Hi Thierry! > > thanks a lot for the patch! This is really in the right direction > of how I want things to go with hierarchical IRQs. > > Some comments: > > On Thu, Nov 29, 2018 at 6:03 PM Thierry Reding > wrote: > > > config

[GIT PULL 00/63] perf/core improvements and fixes

2018-12-18 Thread Arnaldo Carvalho de Melo
/acme/linux into perf/core (2018-12-18 14:39:00 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.21-20181218 for you to fetch changes up to 89a0948984896352cac1ebe079cb3d64d6c3adc6: tools uapi asm: Update

[PATCH 01/63] perf dso: Export data_file_size() method there are no symbols

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Adrian Hunter Will be used outside dso.c in a followup patch, so rename it and make it non-static. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20181127084634.12469-1-adrian.hun...@intel.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de

[PATCH 07/63] perf trace: Allow selecting use the use of the ordered_events code

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo I was trigger happy on this one, as using ordered_events as implemented by Jiri for use with the --block code under discussion on lkml incurs in delaying processing to form batches that then get ordered and then printed. With 'perf trace' we want to process the

[PATCH 03/63] perf tests: Use shebangs in the shell scripts

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Michael Petlan Since the first line was used as a test identification, it needs to be skipped by shell_test__description() function now. Further notes from Hendrik: It might be worth to note that adding the shebang is necessary to spot them as scripts. Using /bin/sh looks fine to. Just

[PATCH 13/63] tools lib subcmd: Don't add the kernel sources to the include path

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo At some point we decided not to directly include kernel sources files when building tools/perf/, but when tools/lib/subcmd/ was forked from tools/perf it somehow ended up adding it via these two lines in its Makefile: CFLAGS += -I$(srctree)/include/uapi CFLAGS

[PATCH 11/63] perf trace: Beautify renameat2's flags argument

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo # strace -e renameat2 -f perf trace -e rename* mv c /tmp strace: Process 10824 attached [pid 10824] renameat2(AT_FDCWD, "c", AT_FDCWD, "/tmp", RENAME_NOREPLACE) = -1 EXDEV (Invalid cross-device link) [pid 10824] renameat2(AT_FDCWD, "c", AT_FDCWD, "/tmp/c",

[PATCH 02/63] perf auxtrace: Alter addr_filter__entire_dso() to work if there are no symbols

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Adrian Hunter addr_filter__entire_dso() uses the first and last symbols from a dso, and so does not work when there are no symbols. Alter it to filter the whole file instead. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Fixes: 1b36c03e3569

Re: [ANNOUNCE] 4.14.87-rt49

2018-12-18 Thread Sebastian Andrzej Siewior
On 2018-12-18 15:40:34 [-0500], Steven Rostedt wrote: > > Dear RT Folks, > > I'm pleased to announce the 4.14.87-rt49 stable release. This contains also commit e8499ab5b93ac ("x86/fpu: Disable bottom halves while loading FPU registers") which means you need commit [PATCH] x86/fpu: Disable

[PATCH 12/63] perf trace beauty: renameat's newdirfd may also be AT_FDCWD

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Noticed while working on renameat2. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-8omchrcjcvlwoxxv6wrje...@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-trace.c | 3 ++- 1 file changed, 2

[PATCH 06/63] perf trace: Rename delivery functions to ease making ordered_events selectable

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Just hide a bit more how events gets delivered, hiding ordered_events details from the main loop. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-lxwwf3238ta4neq2zh1y1...@git.kernel.org Signed-off-by: Arnaldo Carvalho de

[PATCH 04/63] perf stat: Avoid segfaults caused by negated options

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Michael Petlan Some 'perf stat' options do not make sense to be negated (event, cgroup), some do not have negated path implemented (metrics). Due to that, it is better to disable the "no-" prefix for them, since otherwise, the later opt-parsing segfaults. Before: $ perf stat

[PATCH 05/63] tools lib traceevent: Fix processing of dereferenced args in bprintk events

2018-12-18 Thread Arnaldo Carvalho de Melo
From: "Steven Rostedt (VMware)" In the case that a bprintk event has a dereferenced pointer that is stored as a string, and there's more values to process (more args), the arg was not updated to point to the next arg after processing the dereferenced pointer, and it screwed up what was to be

[PATCH 10/63] perf beauty: Wire up the renameat flags table generator to the Makefile

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Now when we run 'make -C tools/perf O=/tmp/build/perf' we end up with: $ cat /tmp/build/perf/trace/beauty/generated/rename_flags_array.c static const char *rename_flags[] = { [0 + 1] = "NOREPLACE", [1 + 1] = "EXCHANGE", [2 + 1] =

[PATCH 09/63] perf beauty: Add a string table generator for renameat2's flags constants

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Using the already copied tools/include/uapi/linux/fs.h file: $ tools/perf/trace/beauty/rename_flags.sh static const char *rename_flags[] = { [0 + 1] = "NOREPLACE", [1 + 1] = "EXCHANGE", [2 + 1] = "WHITEOUT", }; $ Cc: Adrian Hunter

[PATCH 14/63] perf tools: Add missing sigqueue() prototype for systems lacking it

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo There are systems such as the Android NDK API level 24 has the sigqueue() function but doesn't provide a prototype, adding noise to the build: util/evlist.c: In function 'perf_evlist__prepare_workload': util/evlist.c:1494:4: warning: implicit declaration of

[PATCH 15/63] perf header: Fix up argument to ctime()

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Reducing this noise when cross building to the Android NDK: util/header.c: In function 'perf_header__fprintf_info': util/header.c:2710:45: warning: pointer targets in passing argument 1 of 'ctime' differ in signedness [-Wpointer-sign] fprintf(fp, "#

[PATCH 16/63] perf tools: Add missing open_memstream() prototype for systems lacking it

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo There are systems such as the Android NDK API level 24 has the open_memstream() function but doesn't provide a prototype, adding noise to the build: builtin-timechart.c: In function 'cat_backtrace': builtin-timechart.c:486:2: warning: implicit declaration of

[PATCH 20/63] perf trace: Rename set_ev_qualifier_filter to clarify its a tracepoint filter

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Rename it to trace__set_ev_qualifier_tp_filter(), as this just sets up tracepoint filters on the raw_syscalls:sys_{enter,exit} tracepoints, and since we're going to do the same for the augmented_raw_syscalls codepath, when used, rename it to clarify. Cc: Adrian

[PATCH 18/63] tools lib traceevent: Use LDFLAGS in the build commands

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa So that the user can specify outside LDFLAGS values. Keeping the CFLAGS in there as well, so we don't break existing scripts. Signed-off-by: Jiri Olsa Acked-by: Steven Rostedt (VMware) Cc: Herton Krzesinski Cc: Tzvetomir Stoyanov (VMware) Link:

[PATCH 17/63] perf tools: Cast off_t to s64 to avoid warning on bionic libc

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To avoid this warning: CC /tmp/build/perf/util/s390-cpumsf.o util/s390-cpumsf.c: In function 's390_cpumsf_samples': util/s390-cpumsf.c:508:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'off_t'

[PATCH 21/63] perf trace: Avoid using raw_syscalls in duplicity with eBPF augmentation

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo So when we do something like: # perf trace -e open*,augmented_raw_syscalls.o We need to set trace->trace_syscalls because there is logic that use that when mixing strace-like output with other events, such as scheduler tracepoints, but with that set we ended

[PATCH 24/63] perf augmented_syscalls: Switch to using a struct for the syscalls map values

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo We'll start adding more perf-syscall stuff, so lets do this prep step so that the next ones are just about adding more fields. Run it with the .c file once to cache the .o file: # trace --filter-pids 2834,2199 -e openat,augmented_raw_syscalls.c LLVM: dumping

[PATCH 25/63] perf trace: Switch to using a struct for the aumented_raw_syscalls syscalls map values

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo We'll start adding more perf-syscall stuff, so lets do this prep step so that the next ones are just about adding more fields. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link:

[PATCH 22/63] perf trace: Implement syscall filtering in augmented_syscalls

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Just another map, this time an BPF_MAP_TYPE_ARRAY, stating with one bool per syscall, stating if it should be filtered or not. So, with a pre-built augmented_raw_syscalls.o file, we use: # perf trace -e open*,augmented_raw_syscalls.o 0.000 ( 0.016 ms): DNS

[PATCH 23/63] perf bpf: Move perf_event_output() from stdio.h to bpf.h

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo So that we don't always carry that __bpf_output__ map, leaving that to the scripts wanting to use that facility. 'perf trace' will be changed to look if that map is present and only setup the bpf-output events if so. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung

[PATCH 19/63] perf tools: Link libperf-jvmti.so with LDFLAGS variable

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa So we could propagate distro flags into libperf-jvmti.so library. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20181212132940.840-1-jo...@kernel.org Signed-off-by: Arnaldo Carvalho de Melo ---

[PATCH 26/63] perf cs-etm: Correct packets swapping in cs_etm__flush()

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Leo Yan The structure cs_etm_queue uses 'prev_packet' to point to previous packet, this can be used to combine with new coming packet to generate samples. In function cs_etm__flush() it swaps packets only when the flag 'etm->synth_opts.last_branch' is true, this means that it will not

[PATCH 27/63] perf cs-etm: Avoid stale branch samples when flush packet

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Leo Yan At the end of trace buffer handling, function cs_etm__flush() is invoked to flush any remaining branch stack entries. As a side effect, it also generates branch sample, because the 'etmq->packet' doesn't contains any new coming packet but point to one stale packet after packets

[PATCH 28/63] perf cs-etm: Remove unused 'trace_on' in cs_etm_decoder

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Leo Yan cs_etm_decoder::trace_on is being assigned when TRACE_ON or NO_SYNC element is coming, but it is never used hence it is redundant and can be removed. So let's remove 'trace_on' field from cs_etm_decoder struct. Suggested-by: Mathieu Poirier Signed-off-by: Leo Yan Reviewed-by:

[PATCH 30/63] perf cs-etm: Rename CS_ETM_TRACE_ON to CS_ETM_DISCONTINUITY

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Leo Yan TRACE_ON element is used at the beginning of trace, it also can be appeared in the middle of trace data to indicate discontinuity; for example, it's possible to see multiple TRACE_ON elements in the trace stream if the trace is being limited by address range filtering.

[PATCH 29/63] perf cs-etm: Refactor enumeration cs_etm_sample_type

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Leo Yan The values in enumeration cs_etm_sample_type are defined with setting bit N for each packet type, this is not suggested in the usual case. This patch refactor cs_etm_sample_type by converting from bit shifting values to continuous numbers. Signed-off-by: Leo Yan Reviewed-by:

[PATCH 31/63] perf cs-etm: Treat NO_SYNC element as trace discontinuity

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Leo Yan The CoreSight tracer driver might insert barrier packets between different buffers, thus the decoder can spot the boundaries based on the barrier packet; it is possible for the decoder to hit a barrier packet and emit a NO_SYNC element, then the decoder will find a periodic

[PATCH 08/63] perf trace beauty: Beautify renameat2's fd arg wrt AT_FDCWD

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Just like is done with the 'renameat' syscall. # strace -e renameat2 -f perf trace -e rename* mv c /tmp [pid 12334] renameat2(AT_FDCWD, "c", AT_FDCWD, "/tmp", RENAME_NOREPLACE) = -1 EXDEV (Invalid cross-device link) [pid 12334] renameat2(AT_FDCWD, "c",

Re: [PATCH 2/3] hugetlbfs: Use i_mmap_rwsem to fix page fault/truncate race

2018-12-18 Thread Andrew Morton
On Mon, 17 Dec 2018 16:17:52 -0800 Mike Kravetz wrote: > ... > > > As you suggested in a comment to the subsequent patch, it would be better to > > combine the patches and remove the dead code when it becomes dead. I will > > work on that. Actually some of the code in patch 3 applies to patch

[PATCH 33/63] perf cs-etm: Generate branch sample for exception packet

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Leo Yan The exception packet appears as one element with 'elem_type' == OCSD_GEN_TRC_ELEM_EXCEPTION or OCSD_GEN_TRC_ELEM_EXCEPTION_RET, which is present for exception entry and exit respectively. The decoder sets the packet fields 'packet->exc' and 'packet->exc_ret' to indicate the

[PATCH 34/63] perf augmented_raw_syscalls: Do not include stdio.h

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo We're not using that puts() thing, and thus we don't need to define the __bpf_stdout__ map, reducing the setup time. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link:

[PATCH 32/63] perf cs-etm: Treat EO_TRACE element as trace discontinuity

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Leo Yan If the decoder outputs an EO_TRACE element, it means the end of the trace buffer; this is a discontinuity and in this case the end of trace data needs to be saved. This patch generates a CS_ETM_DISCONTINUITY packet for the EO_TRACE element hereby flushing the end of trace data in

[PATCH 35/63] perf trace: Allow specifying a set of events to add in perfconfig

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To add augmented_raw_syscalls to the events speficied by the user, or be the only one if no events were specified by the user, one can add this to perfconfig: # cat ~/.perfconfig [trace] add_events =

[PATCH 36/63] perf trace: Allow configuring if zeroed syscall args should be printed

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo The default so far, since we show argument names followed by its values, was to make the output more compact by suppressing most zeroed args. Make this configurable so that users can choose what best suit their needs. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis

Re: [PATCH bpf-next v2] bpf: support raw tracepoints in modules

2018-12-18 Thread Alexei Starovoitov
On Wed, Dec 12, 2018 at 04:42:37PM -0800, Matt Mullins wrote: > Distributions build drivers as modules, including network and filesystem > drivers which export numerous tracepoints. This enables > bpf(BPF_RAW_TRACEPOINT_OPEN) to attach to those tracepoints. > > Signed-off-by: Matt Mullins > ---

[PATCH 38/63] perf config: Show the configuration when no arguments are provided

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo More convenient thah having to recall what letter is about showing/listing/dumping the configuration, i.e. no arguments means -l/--list: # perf config llvm.dump-obj=true

[PATCH 37/63] perf trace: Allow configuring if the syscall duration should be printed

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo # perf config trace.show_duration=no # perf config -l | grep trace trace.default_events=/home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o trace.show_zeros=true trace.show_duration=no # trace -e *sleep sleep 1 0.000 sleep/8729

[PATCH 40/63] perf trace: Allow configuring if the syscall start timestamp should be printed

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo # trace -e open*,close,*sleep sleep 1 0.000 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC ) = 3 0.016 close(fd: 3 ) = 0 0.024 openat(dfd: CWD, filename:

[PATCH 41/63] perf trace: Allow suppressing the syscall argument names

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To show just the values: Default: # trace -e open*,close,*sleep sleep 1 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC ) = 3 close(fd: 3 ) = 0 openat(dfd: CWD, filename:

Re: objtool warnings for kernel/trace/trace_selftest_dynamic.o

2018-12-18 Thread Andi Kleen
On Tue, Dec 18, 2018 at 04:57:13PM -0500, Steven Rostedt wrote: > Hmm, how does that work? When does LTO do its linker magic? Because the > fentry/mcounts are added when the object is created. Are they removed > if the compiler sees that it can be inlined? Or does LTO just compile > everything in

[PATCH 42/63] perf trace: Make the alignment of the syscall args be configurable

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Since the start 'perf trace' aligns the parens enclosing the list of syscall args to align the syscall results, allow this to be configurable, keeping the default of 70. Using: # perf config llvm.dump-obj=true

[PATCH 39/63] perf trace: Allow configuring default for perf_event_attr.inherit

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo I.f. if children should inherit the parent perf_event configuration, i.e. if we should trace children as well or just the parent. The default is to follow children, to disable this and have a behaviour similar to strace, set this config option or use the

[PATCH 43/63] perf trace: Enclose strings with double quotes

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To match 'strace' output, helping with upcoming regression tests comparing both outputs. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-jab52t1dcuh6vlztqle9g...@git.kernel.org

[PATCH 44/63] perf trace: Add a prefix member to the strarray class

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo So that the user, in an upcoming patch, can select printing it to get the full string as used in the source code, not one with a common prefix chopped off so as to make the output more compact. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc:

[PATCH 46/63] perf trace beauty: Print O_RDONLY when (flags & O_ACCMODE) == 0

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo And there are more flags, to match strace's output. openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 Also to help with regression tests. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link:

[PATCH 45/63] perf trace: Allow asking for not suppressing common string prefixes

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo So far we've been suppressing common stuff such as "MAP_" in the mmap flags, showing "SHARED" instead of "MAP_SHARED", allow for those prefixes (and a few suffixes) to be shown: # trace -e *map,open*,*seek sleep 1 openat("/etc/ld.so.cache", CLOEXEC) = 3

Re: [ANNOUNCE] 4.14.87-rt49

2018-12-18 Thread Steven Rostedt
On Tue, 18 Dec 2018 23:08:36 +0100 Sebastian Andrzej Siewior wrote: > On 2018-12-18 15:40:34 [-0500], Steven Rostedt wrote: > > > > Dear RT Folks, > > > > I'm pleased to announce the 4.14.87-rt49 stable release. > > This contains also commit > e8499ab5b93ac ("x86/fpu: Disable bottom

[PATCH 47/63] perf trace: Add alignment spaces after the closing parens

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To use strace's style, helping in comparing the output of 'perf trace' with the one from 'strace', to help in upcoming regression tests. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link:

[PATCH 48/63] perf augmented_raw_syscalls: Copy 'access' arg as well

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo This will all come from userspace, but to test the changes to make 'perf trace' output similar to strace's, do this one more now manually. To update the precompiled augmented_raw_syscalls.o binary I just run: # perf record -e

[PATCH 50/63] perf trace: Show NULL when syscall pointer args are 0

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Matching strace's output format. The 'format' file for the syscall tracepoints have an indication if the arg is a pointer, with some exceptions like 'mmap' that has its first arg as an 'unsigned long', so use a heuristic using the argument name, i.e. if it contains

[PATCH 49/63] perf trace: Enclose the errno strings with ()

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To match strace, now both emit the same line for calls like: access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link:

[PATCH 51/63] tools include arch: Grab a copy of x86's prctl.h

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo We need it to generate the tables for the 'code' arch_prctl's syscall argument. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-vu890pi18fpd4eyz61caz...@git.kernel.org Signed-off-by:

[PATCH 52/63] perf beauty: Add a string table generator for x86's 'arch_prctl' codes

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo $ tools/perf/trace/beauty/x86_arch_prctl.sh #define x86_arch_prctl_codes_1_offset 0x1001 static const char *x86_arch_prctl_codes_1[] = { [0x1001 - 0x1001]= "SET_GS", [0x1002 - 0x1001]= "SET_FS", [0x1003 - 0x1001]= "GET_FS",

[PATCH 54/63] perf trace: Move strarrays to beauty.h for further reuse

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo We'll use it in the upcoming arch_prctl() 'code' arg beautifier. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-6e4tj2fjen8qa73gy4u49...@git.kernel.org Signed-off-by: Arnaldo

[PATCH 53/63] perf beauty: Wire up the x86_arch prctl code table generator

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo $ cat /tmp/build/perf/trace/beauty/generated/x86_arch_prctl_code_array.c #define x86_arch_prctl_codes_1_offset 0x1001 static const char *x86_arch_prctl_codes_1[] = { [0x1001 - 0x1001]= "SET_GS", [0x1002 - 0x1001]= "SET_FS", [0x1003 -

[PATCH 55/63] perf trace: When showing string prefixes show prefix + ??? for unknown entries

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To match 'strace' output, like in: arch_prctl(0x3001 /* ARCH_??? */, 0x7ffc8a92dc80) = -1 EINVAL (Invalid argument) Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link:

[PATCH 56/63] perf trace beauty: Beautify arch_prctl()'s arguments

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo This actually so far, AFAIK is available only in x86, so the code was put in place with x86 prefixes, in arches where it is not available it will just not be called, so no further mechanisms are needed at this time. Later, when other arches wire this up, we'll

Re: objtool warnings for kernel/trace/trace_selftest_dynamic.o

2018-12-18 Thread Steven Rostedt
On Tue, 18 Dec 2018 14:13:38 -0800 Andi Kleen wrote: > > Again, that's not the ftrace case. It doesn't care about more than one > > out of line instance. Thus, for this particular use, "used" should be > > good enough. > > You mean noinline used? I thought that someone said that "used"

[PATCH 57/63] perf beauty mmap: Print PROT_READ before PROT_EXEC to match strace output

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Helps with comparing 'strace' and 'perf trace' output, for mutual regression testing. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-va0qe95xbhep5hy52aq5q...@git.kernel.org

[PATCH 58/63] perf beauty mmap: Print mmap's 'offset' arg in hexadecimal

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Also to make it match 'strace' output, for regression testing. Both now produce this option, when 'perf trace' uses a .perfconfig asking for the strace like output: mmap(0x7faf66e6a000, 1363968, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,

[PATCH 61/63] perf trace: Wire up the fadvise 'advice' table generator

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo That ends up generating this: $ cat /tmp/build/perf/trace/beauty/generated/fadvise_advice_array.c static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] =

[PATCH 59/63] tools headers uapi: Grab a copy of fadvise.h

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Will be used to generate the string table for fadvise64's 'advice' argument. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-muswpnft8q9krktv052yr...@git.kernel.org Signed-off-by:

[PATCH 62/63] perf symbols: Relax checks on perf-PID.map ownership

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Those are simple enough, and usually not produced by root, instead by whatever user is running java, rust, Node.js JIT code that end up generating those /tmp/perf-PID.map for resolution of symbols in the anonymous executable maps. Having to use --force to resolve

[PATCH 60/63] perf beauty: Add generator for fadvise64's 'advice' arg constants

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ This has a hack wrt

[PATCH 63/63] tools uapi asm: Update asm-generic/unistd.h copy

2018-12-18 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To get the change in: b7d624ab4312 ("asm-generic: unistd.h: fixup broken macro include.") That doesn't imply in any changes in the tools. This silences the following perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h'

[tip:locking/urgent] futex: Cure exit race

2018-12-18 Thread tip-bot for Thomas Gleixner
Commit-ID: da791a667536bf8322042e38ca85d55a78d3c273 Gitweb: https://git.kernel.org/tip/da791a667536bf8322042e38ca85d55a78d3c273 Author: Thomas Gleixner AuthorDate: Mon, 10 Dec 2018 14:35:14 +0100 Committer: Thomas Gleixner CommitDate: Tue, 18 Dec 2018 23:13:15 +0100 futex: Cure exit

<    5   6   7   8   9   10   11   12   13   >